cancel
Showing results for 
Search instead for 
Did you mean: 

OPTEE Panic using ecosystem 5.0.0 and stm32mp153a

cfilipescu
Senior

I am trying to migrate from ecosystem 4.1.0 to 5.0.0 however after getting all the device trees to compile and build plus a new image I am encountering a Panic in optee. The problem is that it just says Panic and I can't tell based on the debug prints which direction to take.

The board is a custom design based on the stm32mp157a-dk1 and all the vital components are the same (PMIC, SDMMC, etc)

Any suggestions on how I could debug this further?

I have attached the full debug console logs and is what I get from the console without the optee debug prints since it's too many lines:

 

�NOTICE:  CPU: STM32MP153AAC Rev.Z
NOTICE:  Model: STMicroelectronics custom STM32CubeMX board - openstlinux-6.1-yocto-mickledore-mp1-v23.06.21
NOTICE:  Board: MBfdd8 Var2.15 Rev.B-14
INFO:    Reset reason (0x15):
INFO:      Power-on Reset (rst_por)
INFO:    FCONF: Reading TB_FW firmware configuration file from: 0x2ffe2000
INFO:    FCONF: Reading firmware configuration information for: stm32mp_io
INFO:    Using SDMMC
INFO:      Instance 1
INFO:    Boot used partition fsbl1
NOTICE:  BL2: v2.8-stm32mp1-r1.0(release):2023.05.1(7814dbce)
NOTICE:  BL2: Built : 16:28:56, Aug 21 2023
INFO:    BL2: Doing platform setup
INFO:    RAM: DDR3-DDR3L 16bits 533000kHz
INFO:    Memory size = 0x10000000 (256 MB)
INFO:    BL2: Loading image id 1
INFO:    Loading image id=1 at address 0x2ffff000
INFO:    Image id=1 loaded: 0x2ffff000 - 0x2ffff1ea
INFO:    FCONF: Reading FW_CONFIG firmware configuration file from: 0x2ffff000
INFO:    FCONF: Reading firmware configuration information for: dyn_cfg
INFO:    FCONF: Reading firmware configuration information for: stm32mp1_firewall
INFO:    BL2: Loading image id 4
INFO:    Loading image id=4 at address 0x2ffc0000
INFO:    Image id=4 loaded: 0x2ffc0000 - 0x2ffc002c
INFO:    OPTEE ep=0x2ffc0000
INFO:    OPTEE header info:
INFO:          magic=0x4554504f
INFO:          version=0x2
INFO:          arch=0x0
INFO:          flags=0x0
INFO:          nb_images=0x2
INFO:    BL2: Loading image id 8
INFO:    Loading image id=8 at address 0x2ffc0000
INFO:    Image id=8 loaded: 0x2ffc0000 - 0x2ffd38c0
INFO:    BL2: Loading image id 9
INFO:    Loading image id=9 at address 0xce000000
INFO:    Image id=9 loaded: 0xce000000 - 0xce05c000
INFO:    BL2: Loading image id 2
INFO:    Loading image id=2 at address 0xc0500000
INFO:    Image id=2 loaded: 0xc0500000 - 0xc0513ed8
INFO:    BL2: Skip loading image id 16
INFO:    BL2: Loading image id 5
INFO:    Loading image id=5 at address 0xc0100000
INFO:    Image id=5 loaded: 0xc0100000 - 0xc01f5d7c
NOTICE:  BL2: Booting BL32
INFO:    Entry point address = 0x2ffc0000
INFO:    SPSR = 0x1d3
I/TC: Early console on UART#4
I/TC:
I/TC: Pager is enabled. Hashes: 3040 bytes
I/TC: Pager pool size: 92kB
I/TC: Embedded DTB found
I/TC: OP-TEE version: 2023.05.1 (gcc version 10.3.1 20210621 (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29))) #1 Mon Aug 21 20:28:44 UTC 2023 arm
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
E/TC:0 0 Panic

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
cfilipescu
Senior

@Kevin HUBERthe issue had nothing to do with the toolchain but with the fact that RNG1 was not assigned to the secure core in CubeMX.

View solution in original post

2 REPLIES 2
Kevin HUBER
ST Employee

Hello  @cfilipescu ,

I can see in your log:

I/TC: OP-TEE version: 2023.05.1 (gcc version 10.3.1 20210621 (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29))) #1 Mon Aug 21 20:28:44 UTC 2023 arm


I don't understand how you were able to have an optee for V5.0.0 built with "gcc version 10.3.1".
If you have a look at the default log that you should have on v5.0.0, you can see that the "gcc version 12.2.0" is normally the one used to generate the image:

I/TC: OP-TEE version: 3.19.0-dev (gcc version 12.2.0 (GCC)) #1 Fri Oct 14 19:00:05 UTC 2022 arm

In your case it looks like you built the OP-TEE image with a SDK from a previous Ecosystem.

Please can you start again to download the SDK of the DV5.0.0 in the getting started: 
https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Develop_on_Arm%C2%AE_Cortex%C2%AE-A7/Install_the_SDK

And be sure to start it before building the OP-TEE:

https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Develop_on_Arm%C2%AE_Cortex%C2%AE-A7/Install_the_SDK#Start_the_SDK_up

 

If you want to follow the getting started from the beginning, you can start here: https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Let%27s_start/Populate_the_target_and_boot_the_image

Best Regards,
Kevin

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
cfilipescu
Senior

@Kevin HUBERthe issue had nothing to do with the toolchain but with the fact that RNG1 was not assigned to the secure core in CubeMX.