-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Add MPS3 AN547 Non Secure target #38226
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
Conversation
|
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
9e16238 to
8b55685
Compare
8b55685 to
8ee17fa
Compare
8ee17fa to
efd6146
Compare
|
Thanks for the review @microbuilder. I have addressed both issues and would like another review. |
efd6146 to
cbbb304
Compare
|
@theotherjimmy Were you testing this on QEMU or the FVP image? I tried to run this on Qemu 6.1.0, but get the following (using the instructions for QEMU vs. FVP here: https://docs.zephyrproject.org/latest/boards/arm/mps3_an547/doc/index.html#fvp-usage): $ west build -p auto -b mps3_an547_ns zephyr/samples/tfm_integration/psa_crypto/ -DEMU_PLATFORM=qemu -t run
...
[118/119] Linking C executable zephyr/zephyr.elf
Memory region Used Size Region Size %age Used
FLASH: 31712 B 384 KB 8.06%
SRAM: 11144 B 2 MB 0.53%
IDT_LIST: 0 GB 2 KB 0.00%
[118/119] To exit from QEMU enter: 'CTRL+a, x'[QEMU] CPU: cortex-m55
qemu-system-arm: warning: nic lan9118.0 has no peer
qemu: fatal: Lockup: can't escalate 3 to HardFault (current priority -1)
R00=00000000 R01=00000000 R02=00000000 R03=00000000
R04=00000000 R05=00000000 R06=00000000 R07=00000000
R08=00000000 R09=00000000 R10=00000000 R11=00000000
R12=00000000 R13=ffffffe0 R14=fffffff9 R15=00000000
XPSR=00000003 ---- A S handler
s00=00000000 s01=00000000 d00=0000000000000000
s02=00000000 s03=00000000 d01=0000000000000000
s04=00000000 s05=00000000 d02=0000000000000000
s06=00000000 s07=00000000 d03=0000000000000000
s08=00000000 s09=00000000 d04=0000000000000000
s10=00000000 s11=00000000 d05=0000000000000000
s12=00000000 s13=00000000 d06=0000000000000000
s14=00000000 s15=00000000 d07=0000000000000000
s16=00000000 s17=00000000 d08=0000000000000000
s18=00000000 s19=00000000 d09=0000000000000000
s20=00000000 s21=00000000 d10=0000000000000000
s22=00000000 s23=00000000 d11=0000000000000000
s24=00000000 s25=00000000 d12=0000000000000000
s26=00000000 s27=00000000 d13=0000000000000000
s28=00000000 s29=00000000 d14=00/bin/sh: line 1: 44952 Abort trap: 6 /usr/local/bin/qemu-system-arm -cpu cortex-m55 -machine mps3-an547 -nographic -vga none -net none -pidfile qemu.pid -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -icount shift=7,align=off,sleep=off -rtc clock=vm -kernel /Users/kevin/Linaro/zephyr/build/zephyr/zephyr.elf
FAILED: zephyr/CMakeFiles/run /Users/kevin/Linaro/zephyr/build/zephyr/CMakeFiles/run
cd /Users/kevin/Linaro/zephyr/build && /usr/local/bin/qemu-system-arm -cpu cortex-m55 -machine mps3-an547 -nographic -vga none -net none -pidfile qemu.pid -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -icount shift=7,align=off,sleep=off -rtc clock=vm -kernel /Users/kevin/Linaro/zephyr/build/zephyr/zephyr.elf
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /Users/kevin/Linaro/zephyr/build --target run |
|
I get that as well, through west. It's trying to boot zephyr.elf without a merged trusted-firmware, which does not work. |
5d6fdae to
ebb076b
Compare
0fc5277 to
47e38fc
Compare
… mode This includes a new device tree, new target yaml and new target defconfig Signed-off-by: Jimmy Brisson <[email protected]>
Zephyr will try to run the `zephyr.elf` file by default. This is problematic for any `..._ns` target, as they all need to boot through [mcuboot and] TF-M. They simply hardfault without the rest of their system image. This corrects the `west build -t run ...` for the `mps3_an547_ns` board, as it now has special treatment. Signed-off-by: Jimmy Brisson <[email protected]>
Documented both secure-only and nonsecure firmware modes Signed-off-by: Jimmy Brisson <[email protected]>
47e38fc to
d6c8586
Compare
|
The CI failure is not related to this PR, so going to merge it and we'll open an issue to track the failure which is due to QEMU. |
|
Okay... turns out CI failure was related to this PR... FYI :-( |
|
It's related to the mps3-an547, but not specifically relating to secure/non-secure. (note that the tests are for the mps3_an547 without the _ns suffix). At least one of the problems is documented in 2 issues: #40970 and zephyrproject-rtos/sdk-ng#420 |
|
The other of the problems is documented here: #40569 |
NOTE: This includes, and depends on #38149. ATM, this means that the last 2 commits in the history are added by this PR.Rebased onto current main.This adds a new target,
mps3_an547_nonsecure, that builds TF-M as the Secure world firmware and Zephyr as the Non-secure world firmware.