sel4test AARCH64 on imx8mm-evk
Hi, I have tried running sel4test built for AARCH64 (https://docs.sel4.systems/Hardware/imx8mm.html) on my imx8mm-evk dev board. I am on the 12.1.0 branch of sel4test-manifest.git. Firstly I have to add "set(KernelAArch64SErrorIgnore ON)" to my build config in order to get the tests running and unfortunately things go awry during the test run ... Starting test 47: FRAMEEXPORTS0001 Running test FRAMEEXPORTS0001 (Test that we can access all exported frames) Pagefault from [FRAMEEXPORTS0001]: read fault at PC: 0x41c4ec vaddr: 0x11000000, FSR 0x92000210 Register of root thread in test (may not be the thread that faulted) Register dump: pc: 0x41c4ec sp: 0x100118a0 spsr: 0x80000040 x0: 0x11000000 x1: 0x11000000 x2: 0x55 x3: 0x15 x4: 0xe6 x5: 0x0 x6: 0x0 x7: 0xffffffffffffffff x8: 0x10011a48 x16: 0x0 x17: 0x0 x18: 0x0 x29: 0x100118a0 x30: 0x41c9f0 x9: 0x2b x10: 0x2b x11: 0xffffffff x12: 0x0 x13: 0x0 x14: 0x0 x15: 0x0 x19: 0xe7 x20: 0x8 x21: 0x11000000 x22: 0x0 x23: 0x0 x24: 0x0 x25: 0x0 x26: 0x0 x27: 0x0 x28: 0x0 tpidr_el0: 0x616f60 tpidrro_el0: 0x0 Failure: result == SUCCESS at line 291 of file /host/projects/sel4test/apps/sel4test-driver/src/testtypes.c Error: result == SUCCESS at line 217 of file /host/projects/sel4test/apps/sel4test-driver/src/main.c ... Starting test 55: IPC1001 Running test IPC1001 (Test SMP inter-AS seL4_Send + seL4_Recv) KERNEL DATA ABORT! Faulting instruction: 0xffffff804001e2ac FAR: 0xffffff80bf800020 ESR (DFSR): 0x96000210 halting... Kernel entry via Syscall, number: 1, Call Cap type: 10, Invocation tag: 20 Is this something that should just work? Or am I missing something. Cheers, Zippy
Hi Zippy, On 2021-12-14 15:32, Zippy Manaic via Devel wrote:
Firstly I have to add "set(KernelAArch64SErrorIgnore ON)" to my build config in order to get the tests running and unfortunately things go awry during the test run
Sadly, since commit 7b0602c5 setting KernelAArch64SErrorIgnore must be done by the platform config file and can't be set via user settings. Hope this helps, Indan
HI Indan, This is the change I made to get sel4test to even start running when build for AARCH64 is diff --git a/src/plat/imx8m-evk/config.cmake b/src/plat/imx8m-evk/config.cmake index a697c020d..5ee249cbb 100644 --- a/src/plat/imx8m-evk/config.cmake +++ b/src/plat/imx8m-evk/config.cmake @@ -18,6 +18,7 @@ if(KernelPlatformImx8mq-evk OR KernelPlatformImx8mm-evk) fallback_declare_seL4_arch_default(aarch64) endif() + set(KernelAArch64SErrorIgnore ON) set(KernelArmCortexA53 ON) set(KernelArchArmV8a ON) set(KernelArmGicV3 ON) The problem is that the test does not run to completion and I don't see the "All is well in the universe" statement. If I rebuild for AARCH32 then it works fine. Should sel4test for imx8mm-evk work for AARCH64? Cheers, Zippy
On Wed, Dec 15, 2021 at 6:39 PM Zippy Manaic via Devel <devel@sel4.systems> wrote:
HI Indan,
This is the change I made to get sel4test to even start running when build for AARCH64 is
diff --git a/src/plat/imx8m-evk/config.cmake b/src/plat/imx8m-evk/config.cmake index a697c020d..5ee249cbb 100644 --- a/src/plat/imx8m-evk/config.cmake +++ b/src/plat/imx8m-evk/config.cmake @@ -18,6 +18,7 @@ if(KernelPlatformImx8mq-evk OR KernelPlatformImx8mm-evk) fallback_declare_seL4_arch_default(aarch64) endif()
+ set(KernelAArch64SErrorIgnore ON) set(KernelArmCortexA53 ON) set(KernelArchArmV8a ON) set(KernelArmGicV3 ON)
The problem is that the test does not run to completion and I don't see the "All is well in the universe" statement. If I rebuild for AARCH32 then it works fine.
Should sel4test for imx8mm-evk work for AARCH64?
sel4test appears to be currently passing for imx8mm-evk on both aarch64 and aarch32: https://github.com/seL4/seL4/runs/4496119700?check_suite_focus=true Version 12.1.0 of the kernel and user libraries would have also been passing the tests on hardware at the time of release. This was before the CI was run with GitHub actions so there isn't a public URL for the results. Are you able to run the tests with a recently updated checkout using the commands listed here?: https://docs.sel4.systems/Hardware/imx8mm.html
Cheers, Zippy _______________________________________________ Devel mailing list -- devel@sel4.systems To unsubscribe send an email to devel-leave@sel4.systems
Hi Kent, I have been following the instructions as directed - https://docs.sel4.systems/Hardware/imx8mm.html Without the change to disable KernelAArch64SErrorIgnore this is the output I get on my imx8mm-evk board Bootstrapping kernel available phys memory regions: 2 [40000000..b8000000] [b8400000..c0000000] reserved virt address space regions: 3 [ffffff8040000000..ffffff804023f000] [ffffff804023f000..ffffff804024a000] [ffffff804024a000..ffffff8040651000] Booting all finished, dropped to user space Node 0 of 1 IOPT levels: 0 IPC buffer: 0x807000 Empty slots: [1118 --> 8192) sharedFrames: [0 --> 0) userImageFrames: [30 --> 1061) userImagePaging: [14 --> 19) untypeds: [1061 --> 1118) Initial thread domain: 0 Initial thread cnode size: 13 List of untypeds ------------------ Paddr | Size | Device 0 | 29 | 1 0x20000000 | 28 | 1 0x30000000 | 27 | 1 0x38000000 | 23 | 1 0x38810000 | 16 | 1 0x38820000 | 17 | 1 0x38840000 | 18 | 1 0x38940000 | 18 | 1 0x38980000 | 19 | 1 0x38a00000 | 21 | 1 0x38c00000 | 22 | 1 0x39000000 | 24 | 1 0x3a000000 | 25 | 1 0x3c000000 | 26 | 1 0xb8000000 | 22 | 1 0xc0000000 | 30 | 1 0x100000000 | 32 | 1 0x200000000 | 33 | 1 0x400000000 | 34 | 1 0x800000000 | 35 | 1 0x1000000000 | 36 | 1 0x2000000000 | 37 | 1 0x4000000000 | 38 | 1 0x8000000000 | 39 | 1 0x40000000 | 16 | 0 0x40651000 | 12 | 0 0x40652000 | 13 | 0 0x40654000 | 14 | 0 0x40658000 | 15 | 0 0x40660000 | 17 | 0 0x40680000 | 19 | 0 0x40700000 | 20 | 0 0x40800000 | 23 | 0 0x41000000 | 24 | 0 0x42000000 | 25 | 0 0x44000000 | 26 | 0 0x48000000 | 27 | 0 0x50000000 | 28 | 0 0x60000000 | 29 | 0 0x80000000 | 29 | 0 0xa0000000 | 28 | 0 0xb0000000 | 27 | 0 0xb8400000 | 22 | 0 0xb8800000 | 23 | 0 0xb9000000 | 24 | 0 0xba000000 | 25 | 0 0xbc000000 | 25 | 0 0xbe000000 | 24 | 0 0xbf000000 | 23 | 0 0xbf800000 | 22 | 0 0xbfc00000 | 21 | 0 0xbfe00000 | 20 | 0 0xbff00000 | 19 | 0 0xbffd9800 | 11 | 0 0xbffda000 | 13 | 0 0xbffdc000 | 14 | 0 0xbffe0000 | 17 | 0 Untyped summary 1 untypeds of size 11 1 untypeds of size 12 2 untypeds of size 13 2 untypeds of size 14 1 untypeds of size 15 2 untypeds of size 16 3 untypeds of size 17 2 untypeds of size 18 3 untypeds of size 19 2 untypeds of size 20 2 untypeds of size 21 4 untypeds of size 22 4 untypeds of size 23 4 untypeds of size 24 4 untypeds of size 25 2 untypeds of size 26 3 untypeds of size 27 3 untypeds of size 28 3 untypeds of size 29 1 untypeds of size 30 1 untypeds of size 32 1 untypeds of size 33 1 untypeds of size 34 1 untypeds of size 35 1 untypeds of size 36 1 untypeds of size 37 1 untypeds of size 38 1 untypeds of size 39 Switching to a safer, bigger stack... seL4 Test ========= vka_alloc_object_at_maybe_dev@object.h:58 Failed to allocate object of size 2147483648, error 1 vka_alloc_object_at_maybe_dev@object.h:58 Failed to allocate object of size 1073741824, error 1 vka_alloc_object_at_maybe_dev@object.h:58 Failed to allocate object of size 536870912, error 1 vka_alloc_object_at_maybe_dev@object.h:58 Failed to allocate object of size 268435456, error 1 vka_alloc_object_at_maybe_dev@object.h:58 Failed to allocate object of size 134217728, error 1 vka_alloc_object_at_maybe_dev@object.h:58 Failed to allocate object of size 67108864, error 1 vka_alloc_object_at_maybe_dev@object.h:58 Failed to allocate object of size 33554432, error 1 halting... Kernel entry via Syscall, number: 1, Call Cap type: 2, Invocation tag: 1 I am building with this version of gcc should the problem be related to the version of toolchain. This is the aarch64 compiler we use on other projects for building U-Boot without any issues. aarch64-linux-gnu-gcc (Debian 8.3.0-2) 8.3.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Cheers, Zippy
Same result with this toolchain :( aarch64-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I have downloaded and run the build artefact that produced a successful run for you. Started out running exactly as your CI job until ... <testcase classname="sel4test" name="FRAMEDIPC0001"> </testcase> <testcase classname="sel4test" name="FRAMEDIPC0002"> </testcase> <testcase classname="sel4test" name="FRAMEDIPC0003"> </testcase> <testcase classname="sel4test" name="FRAMEEXPORTS0001"> Pagefault from [FRAMEEXPORTS0001]: read fault at PC: 0x411080 vaddr: 0x11000000, FSR 0x92000210 Register of root thread in test (may not be the thread that faulted) Register dump: pc: 0x411080 sp: 0x10011900 spsr: 0x60000140 x0: 0x11000000 x1: 0x0 x2: 0x55 x3: 0x15 x4: 0xffffffffffffffff x5: 0x0 x6: 0x0 x7: 0xffffffffffffffff x8: 0x0 x16: 0x0 x17: 0x0 x18: 0x11000000 x29: 0x10011900 x30: 0x411304 x9: 0x7f0000007000 x10: 0x11200000 x11: 0x40000000 x12: 0x7effffffe000 x13: 0x8000000000 x14: 0x15 x15: 0x4b8060 x19: 0x11000000 x20: 0x10 x21: 0x0 x22: 0x466738 x23: 0x20000 x24: 0x464dc8 x25: 0x466588 x26: 0x466000 x27: 0x55 x28: 0x15 tpidr_el0: 0x5b7f50 tpidrro_el0: 0x0 <failure type="failure">result == SUCCESS at line 291 of file /github/workspace/projects/sel4test/ap> <error>result == SUCCESS at line 217 of file /github/workspace/projects/sel4test/apps/sel4test-drive> </testcase> <testcase classname="sel4test" name="FRAMEXN0001"> </testcase> <testcase classname="sel4test" name="FRAMEXN0002"> </testcase> <testcase classname="sel4test" name="IPC0001"> </testcase> <testcase classname="sel4test" name="IPC0002"> </testcase> <testcase classname="sel4test" name="IPC0003"> </testcase> <testcase classname="sel4test" name="IPC0004"> </testcase> <testcase classname="sel4test" name="IPC0010"> </testcase> <testcase classname="sel4test" name="IPC1001">
sorry premature send. The above was the release build. This was the debug version from this build artefact - https://github.com/seL4/seL4/suites/4628817643/artifacts/125376044 seL4 Test ========= vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 2147483648, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 1073741824, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 536870912, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 268435456, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 134217728, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 67108864, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 33554432, error 1 halting... Kernel entry via Syscall, number: 1, Call Cap type: 2, Invocation tag: 1
On Fri, Dec 17, 2021 at 1:51 AM Zippy Manaic via Devel <devel@sel4.systems> wrote:
sorry premature send. The above was the release build. This was the debug version from this build artefact - https://github.com/seL4/seL4/suites/4628817643/artifacts/125376044
I downloaded and ran the debug image (IMX8MM_EVK_debug_gcc_64-images.tar.gz) on my own board (a different board than what the CI runs on) and it passes the tests 3/3 times. Are you booting via uboot? What boot mechansim are you using? I use fastboot, and the CI uses network boot with TFTP.
seL4 Test =========
vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 2147483648, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 1073741824, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 536870912, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 268435456, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 134217728, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 67108864, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 33554432, error 1 halting... Kernel entry via Syscall, number: 1, Call Cap type: 2, Invocation tag: 1 _______________________________________________ Devel mailing list -- devel@sel4.systems To unsubscribe send an email to devel-leave@sel4.systems
Hi Kent, I am using UUU to load and boot a stock U-Boot (built from an imx yocto repo for the imx8mmevk target) and then using FB to load and run the capdl. This is our normal dev setup. I have found that U-Boot does seem to be the root cause of my problem. By using a U-Boot image that has been tailored to our own hardware rather than the EVK board I can get both the CI sel4test and a locally built version to run to completion on both the EVK board and our hardware. I'm not sure why the difference as our hardware is just a cut down of the EVK. I have been able to successfully remove the KernelAArch64SErrorIgnore workaround. Cheers, Zippy
participants (3)
-
Indan Zupancic
-
Kent Mcleod
-
Zippy Manaic