Boot Failure on STM32MP157C: Secure Mode Issues (smc execution failure)
Hi,
I am working with an STM32MP157CAA Rev.Z on a custom STM32CubeMX board running OpenSTLinux 6.6 (Yocto Scarthgap MPU v24.11.06). I have successfully integrated and bootstrapped various boot components.
I first got the TF-A and OPTEE to boot the system and now it is also able to bring up the uboot. However, while trying to boot up the uboot gets into an "secure mode execution errors". I am not sure where it is coming from? We have hash-and-boot-options_hash-and-boot-options.bin flashed into the OTP area. Is that something could potentially lead to this type of issue?
BL2 (TF-A) Loading
BL2 (TF-A) executes as expected and starts platform initialization.
The board is in trusted mode, and secure boot appears to be enabled.
Below are the logs confirming BL2 is executing:
NOTICE: CPU: STM32MP157CAA Rev.Z
NOTICE: Model: STMicroelectronics custom STM32CubeMX board - openstlinux-6.6-yocto-scarthgap-mpu-v24.11.06
NOTICE: BL2: v2.10-stm32mp1-r1.0(release)
NOTICE: BL2: Built : 14:58:08, Mar 4 2025
NOTICE: TRUSTED_BOARD_BOOT support enabled
Image Loading Sequence
BL2 successfully attempts to load various images, including:
- TF-A (tf-a-stm32mp157c-ccb-mx_Signed.stm32)
- OP-TEE (tos-fw.bin, tos-fw-extra1.bin)
- SCP firmware (scp-fw.bin)
- NT firmware (nt-fw.bin)
ERROR: BL2: Preparing to load image id 1 (tf-a-stm32mp157c-ccb-mx_Signed.stm32)
ERROR: BL2: Loading image id 1 (tf-a-stm32mp157c-ccb-mx_Signed.stm32)
ERROR: BL2: Calling load_auth_image() for image id 1 with base 0x2ffff000
ERROR: ROTPK is not deployed on platform. Skipping ROTPK verification.
"ROTPK is not deployed", looks like Root of Trust Public Key (ROTPK) verification is being skipped. I am not sure whether this is expected behaviour in my setup or what is causing this.
OP-TEE Boot & Peripheral Initialization
OP-TEE initialises successfully and maps secure memory regions.
Secure components like TZC400, STPMIC, and STM32MP1 clocks are initialized.
However, multiple SMC call failures appear:
stm32_smc: Failed to exec svc=82001003 op=1 in secure mode (err = -1)
U-Boot Execution
U-Boot executes successfully but reports errors related to secure mode calls:
stm32_smc: Failed to exec svc=82001003 op=1 in secure mode (err = -1)
EFI system partition detection fails, which is unexpected:
No EFI system partition
Failed to persist EFI variables
At this point, the system does not proceed further due to the OP-TEE watchdog panic.
E/TC:0 Panic 'Watchdog' at core/drivers/stm32_iwdg.c:228 <stm32_iwdg_it_handler>
I have also attached the full boot_log.txt in the attachment for reference.
The below is the details of my platform:
Hardware & Software Details
- CPU: STM32MP157CAA Rev.Z
- Board: STMicroelectronics custom STM32CubeMX board
- Software Version: OpenSTLinux 6.6 Yocto Scarthgap MPU (v24.11.06)
- TF-A Version: v2.10-stm32mp1-r1.0 (Release)
- U-Boot Version: 2023.10-stm32mp-r1
- OP-TEE Version: REL_0.8.7-8-g79647115eb
- Boot Mode: Trusted Mode with Secure Boot Enabled
I need some help to understand what are the areas I need to investigate to resolve this issue.
Many Thanks
Best Regards,
Vivek
