Skip to content

Commit 99bd605

Browse files
author
Nicolas Pitre
committed
modules: trusted-firmware-a: Disable AArch32 context for ARMv9-A
ARMv9-A is AArch64-only and does not support AArch32 execution states at EL1/EL2/EL3. Configure TF-A build to disable AArch32 register context (CTX_INCLUDE_AARCH32_REGS=0) when building for ARMv9-A platforms. This fixes TF-A boot failures on ARMv9-A non-secure variants where TF-A would panic with: ERROR: EL1 supports AArch64-only. Please set build flag CTX_INCLUDE_AARCH32_REGS = 0 Signed-off-by: Nicolas Pitre <[email protected]>
1 parent 8cf980a commit 99bd605

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

modules/trusted-firmware-a/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,20 @@ if (CONFIG_BUILD_WITH_TFA)
2828
set(TFA_BUILD_DEBUG "0")
2929
endif()
3030

31+
# ARMv9-A is AArch64-only, disable AArch32 register context
32+
if (CONFIG_ARMV9_A)
33+
set(TFA_AARCH32_REGS "CTX_INCLUDE_AARCH32_REGS=0")
34+
else()
35+
set(TFA_AARCH32_REGS "")
36+
endif()
37+
3138
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
3239
COMMAND make -C ${ZEPHYR_TRUSTED_FIRMWARE_A_MODULE_DIR}
3340
DEBUG=${TFA_BUILD_DEBUG}
3441
CROSS_COMPILE=${CROSS_COMPILE}
3542
BUILD_BASE=${TFA_BINARY_DIR} PLAT=${TFA_PLAT}
3643
BL33=${CMAKE_BINARY_DIR}/zephyr/${KERNEL_BIN_NAME}
44+
${TFA_AARCH32_REGS}
3745
all fip
3846
)
3947
endif()

0 commit comments

Comments
 (0)