-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
platforms: add imx93 #372
base: master
Are you sure you want to change the base?
platforms: add imx93 #372
Conversation
Currently there are no boards yet in CI for this platform. (To be changed in the next few months). Signed-off-by: Gerwin Klein <[email protected]>
Does it work with the problematic combinations like SMP + HYP + MCS? I guess it doesn't matter until we actually get the hardware. |
Yup, it works on SMP + HYP + MCS (Indan does have the hardware, the plan is to donate it to the foundation when the port is complete). |
Yes, all combinations I tried work for me. Only configuration not supported is Aarch32. |
Was there a blocker for AArch32 or would it just be additional work? (I don't think we need it, just curious) |
I think the GICv3 code was only tested with 64-bits. But we could set the GIC in backward compatibility mode and use the GICv2 driver on Aarch32. Or just review and test the GICv3 kernel driver for 32-bit. So no real blockers, just some additional work one way or the other. |
I thought we ran the i.MX8MM-EVK in 32-bit mode which has GICv3? |
ci-actions/seL4-platforms/platforms.yml Lines 144 to 150 in 965658b
|
I did a quick test with the below patch applied, but for me it hangs in Elfloader with no output.
diff --git a/libsel4/sel4_plat_include/imx93/sel4/plat/api/constants.h b/libsel4/sel4_plat_include/imx93/sel4/plat/api/constants.h
index 0496273f6..c22c1eefd 100644
--- a/libsel4/sel4_plat_include/imx93/sel4/plat/api/constants.h
+++ b/libsel4/sel4_plat_include/imx93/sel4/plat/api/constants.h
@@ -7,3 +7,8 @@
#include <sel4/config.h>
#include <sel4/arch/constants_cortex_a55.h>
+
+#if CONFIG_WORD_SIZE == 32
+/* First address in the virtual address space that is not accessible to user level */
+#define seL4_UserTop 0xe0000000
+#endif
diff --git a/src/arch/arm/armv/armv8-a/32/machine_asm.S b/src/arch/arm/armv/armv8-a/32/machine_asm.S
index 671d0de81..eabf76ebf 100644
--- a/src/arch/arm/armv/armv8-a/32/machine_asm.S
+++ b/src/arch/arm/armv/armv8-a/32/machine_asm.S
@@ -7,9 +7,9 @@
#include <config.h>
#include <machine/assembler.h>
-#if defined(CONFIG_ARM_CORTEX_A53)
+#if defined(CONFIG_ARM_CORTEX_A53) || defined(CONFIG_ARM_CORTEX_A55)
-/* A53 hardware does not support TLB locking */
+/* ARMv8 hardware does not support TLB locking */
BEGIN_FUNC(lockTLBEntry)
bx lr
END_FUNC(lockTLBEntry)
diff --git a/src/plat/imx93/config.cmake b/src/plat/imx93/config.cmake
index 5d6ed8faf..b405617d4 100644
--- a/src/plat/imx93/config.cmake
+++ b/src/plat/imx93/config.cmake
@@ -9,15 +9,21 @@ cmake_minimum_required(VERSION 3.7.2)
declare_platform(imx93 KernelPlatformIMX93 PLAT_IMX93 KernelArchARM)
if(KernelPlatformIMX93)
- declare_seL4_arch(aarch64)
+ declare_seL4_arch(aarch64 aarch32 arm_hyp)
set(KernelArmCortexA55 ON)
set(KernelArchArmV8a ON)
set(KernelArmGicV3 ON)
config_set(KernelARMPlatform ARM_PLAT ${KernelPlatform})
list(APPEND KernelDTSList "tools/dts/${KernelPlatform}.dts")
- list(APPEND KernelDTSList "src/plat/imx93/overlay-${KernelPlatform}.dts")
+ if(KernelSel4ArchAarch32)
+ list(APPEND KernelDTSList "src/plat/imx93/overlay-${KernelPlatform}-32.dts")
+ else()
+ list(APPEND KernelDTSList "src/plat/imx93/overlay-${KernelPlatform}.dts")
+ endif()
declare_default_headers(
TIMER_FREQUENCY 24000000
+ CLK_MAGIC 2863311531llu
+ CLK_SHIFT 36u
TIMER drivers/timer/arm_generic.h
TIMER_OVERHEAD_TICKS 1
NUM_PPI 32 The alternative DTS file is necessary to avoid overflowing 32-bits on the memory range. Any suggestions? |
@Indanz I don't fully understand why this is the case for the i.MX8 based boards in AArch32 mode but it might be worth a shot doing something like this: |
The The comment is talking about Anyway, thanks for the hint, I'll fiddle with |
Currently there are no boards yet in CI for this platform. (To be changed in the next few months).
Should be merged after the following PRs are merged: