Skip to content

Commit

Permalink
qemu_v8.mk: -march=armv8.3-a for TF-A PAUTH=y
Browse files Browse the repository at this point in the history
When building TF-A with pointer authentication enabled (PAUTH=y or
SPMC_AT_EL=2), the compiler will need features from Arm Architecture
version 8.3 for some instructions. The TF-A port for the QEMU platform
by default uses Arm Arch 8.0 so with pointer authentication we need to
specify a higher version to avoid errors like:
  CC      common/backtrace/backtrace.c
/tmp/cc6mqzev.s: Assembler messages:
/tmp/cc6mqzev.s:57: Error: selected processor does not support `xpaci x0'

These errors are currently limited to configurations with TF_A_DEBUG=1
but to keep it simple, always select armv8.3-a if pointer authentication
is needed.

Signed-off-by: Jens Wiklander <[email protected]>
Reviewed-by: Jerome Forissier <[email protected]>
Tested-by: Jerome Forissier <[email protected]> (vexpress-qemu_armv8a)
  • Loading branch information
jenswi-linaro authored and jforissier committed Jan 27, 2025
1 parent fd9fca6 commit 68e3302
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions qemu_v8.mk
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ TF_A_FLAGS_SPMC_AT_EL_2 += QEMU_TOS_FW_CONFIG_DTS=../build/qemu_v8/spmc_el2_mani
TF_A_FLAGS_SPMC_AT_EL_2 += QEMU_TB_FW_CONFIG_DTS=../build/qemu_v8/tb_fw_config.dts
ifneq ($(PAUTH),y)
TF_A_FLAGS_SPMC_AT_EL_2 += BRANCH_PROTECTION=1
TF_A_FLAGS_SPMC_AT_EL_2 += ARM_ARCH_MAJOR=8 ARM_ARCH_MINOR=3
endif
ifneq ($(MEMTAG),y)
TF_A_FLAGS_SPMC_AT_EL_2 += ENABLE_FEAT_MTE2=2
Expand All @@ -231,6 +232,7 @@ endif

ifeq ($(PAUTH),y)
TF_A_FLAGS += BRANCH_PROTECTION=1
TF_A_FLAGS += ARM_ARCH_MAJOR=8 ARM_ARCH_MINOR=3
endif
ifeq ($(MEMTAG),y)
TF_A_FLAGS += ENABLE_FEAT_MTE2=2
Expand Down

0 comments on commit 68e3302

Please sign in to comment.