diff --git a/libsel4/sel4_plat_include/imx8mq-evk/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/imx8mq-evk/sel4/plat/api/constants.h index 553c179a3..193e36f44 100644 --- a/libsel4/sel4_plat_include/imx8mq-evk/sel4/plat/api/constants.h +++ b/libsel4/sel4_plat_include/imx8mq-evk/sel4/plat/api/constants.h @@ -17,6 +17,14 @@ #include #endif +#define seL4_NumHWBreakpoints (10) +#define seL4_NumExclusiveBreakpoints (6) +#define seL4_NumExclusiveWatchpoints (4) +#ifdef CONFIG_HARDWARE_DEBUG_API +#define seL4_FirstWatchpoint (6) +#define seL4_NumDualFunctionMonitors (0) +#endif + #if CONFIG_WORD_SIZE == 32 /* First address in the virtual address space that is not accessible to user level */ #define seL4_UserTop 0xe0000000 diff --git a/src/plat/imx8mq-evk/config.cmake b/src/plat/imx8mq-evk/config.cmake index 92b749dd5..6079c46dc 100644 --- a/src/plat/imx8mq-evk/config.cmake +++ b/src/plat/imx8mq-evk/config.cmake @@ -12,10 +12,20 @@ cmake_minimum_required(VERSION 3.7.2) -declare_platform(imx8mq-evk KernelPlatformImx8mq-evk PLAT_IMX8MQ_EVK KernelSel4ArchAarch64) +declare_platform(imx8mq-evk KernelPlatformImx8mq-evk PLAT_IMX8MQ_EVK KernelArchARM) if(KernelPlatformImx8mq-evk) - declare_seL4_arch(aarch64) + if("${KernelSel4Arch}" STREQUAL aarch32) + declare_seL4_arch(aarch32) + elseif("${KernelSel4Arch}" STREQUAL aarch64) + declare_seL4_arch(aarch64) + else() + message( + STATUS "Selected platform ${KernelPlatform} supports multiple architectures but none were given" + ) + message(STATUS " Defaulting to aarch64") + declare_seL4_arch(aarch64) + endif() set(KernelArmCortexA53 ON) set(KernelArchArmV8a ON) config_set(KernelARMPlatform PLAT "imx8mq-evk") @@ -23,6 +33,9 @@ if(KernelPlatformImx8mq-evk) set(KernelArmPASizeBits40 ON) list(APPEND KernelDTSList "tools/dts/imx8mq-evk.dts") list(APPEND KernelDTSList "src/plat/imx8mq-evk/overlay-imx8m.dts") + if(KernelSel4ArchAarch32) + list(APPEND KernelDTSList "src/plat/imx8mq-evk/overlay-imx8m-32bit.dts") + endif() declare_default_headers( TIMER_FREQUENCY 8000000llu MAX_IRQ 160 diff --git a/src/plat/imx8mq-evk/overlay-imx8m-32bit.dts b/src/plat/imx8mq-evk/overlay-imx8m-32bit.dts new file mode 100644 index 000000000..13bfeccbd --- /dev/null +++ b/src/plat/imx8mq-evk/overlay-imx8m-32bit.dts @@ -0,0 +1,25 @@ +/* + * Copyright 2019, Data61 + * Commonwealth Scientific and Industrial Research Organisation (CSIRO) + * ABN 41 687 119 230. + * + * This software may be distributed and modified according to the terms of + * the GNU General Public License version 2. Note that NO WARRANTY is provided. + * See "LICENSE_GPLv2.txt" for details. + * + * @TAG(DATA61_GPL) + */ + +/ { + + /* 32-bit kernel platforms require memory to be clamped to the top of + * the kernel window. + */ + memory@40000000 { + device_type = "memory"; + reg = < 0x00 0x40000000 0x00 0x1f000000 >; + }; + + /* This device extends out of the 32-bit memory range.*/ + /delete-node/gpu@38000000; +};