spm: enable pointer authentication and BTI
Use romlib in tbb/dualroot secure boot configurations. The debug build
is bigger when PAuth+BTI is enabled and BL2/BL31 no longer fit Trusted
SRAM. Update related run configs such that they call the rom lib shell
functions.
Update to arch version v8.5 in run configs such that BTI can be enabled.
Add has_branch_target_exception=1 to run configs such that BTI is
enabled.
Add restriction_on_speculative_execution option to base-aemva-common.sh.
Add restriction_on_speculative_execution=2 to run configs such that
SCXTNUM_ELx registers are supported in the EL2 context switch routine.
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: Ib9f9996fd4d4d6e7b5975a5f7b64760169b76a6a
diff --git a/run_config/fvp-spm b/run_config/fvp-spm
index c87641e..cb0a5ec 100644
--- a/run_config/fvp-spm
+++ b/run_config/fvp-spm
@@ -24,8 +24,14 @@
# SPM(reference implementation of S-EL2 firmware) has SMMUv3 driver
# enabled to help with stage-2 translation and virtualization of
# upstream peripheral devices. Hence, enable the SMMUv3 IP in FVP
- # by confuguring the appropriate parameters of the SMMUv3 AEM.
- model="$model" arch_version="8.4" has_smmuv3_params="1" gen_model_params
+ # by configuring the appropriate parameters of the SMMUv3 AEM.
+
+ model="$model" \
+ arch_version="8.5" \
+ has_smmuv3_params="1" \
+ has_branch_target_exception="1" \
+ restriction_on_speculative_execution="2" \
+ gen_model_params
model="$model" gen_fvp_yaml
}
diff --git a/run_config/fvp-spm+romlib b/run_config/fvp-spm+romlib
new file mode 100644
index 0000000..2334371
--- /dev/null
+++ b/run_config/fvp-spm+romlib
@@ -0,0 +1,42 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2021, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+post_tf_build() {
+ fvp_romlib_runtime
+ build_fip BL33="$archive/tftf.bin" BL32="$archive/secure_hafnium.bin"
+}
+
+fetch_tf_resource() {
+ # Expect scripts
+ uart="0" file="tftf.exp" track_expect
+ uart="2" file="spm-uart2.exp" track_expect
+
+ payload_type="tftf" gen_fvp_yaml_template
+
+}
+
+post_fetch_tf_resource() {
+ local model="base-aemv8a"
+
+ # SPM(reference implementation of S-EL2 firmware) has SMMUv3 driver
+ # enabled to help with stage-2 translation and virtualization of
+ # upstream peripheral devices. Hence, enable the SMMUv3 IP in FVP
+ # by configuring the appropriate parameters of the SMMUv3 AEM.
+
+ model="$model" \
+ arch_version="8.5" \
+ has_smmuv3_params="1" \
+ has_branch_target_exception="1" \
+ restriction_on_speculative_execution="2" \
+ gen_model_params
+
+ model="$model" gen_fvp_yaml
+}
+
+post_tf_archive() {
+ fvp_romlib_cleanup
+}
diff --git a/run_config/fvp-spm.linux b/run_config/fvp-spm.linux
index ca0d061..2d4bbcb 100644
--- a/run_config/fvp-spm.linux
+++ b/run_config/fvp-spm.linux
@@ -27,7 +27,9 @@
local model="base-aemv8a"
model="$model" \
- arch_version="8.4" \
+ arch_version="8.5" \
+ has_branch_target_exception="1" \
+ restriction_on_speculative_execution="2" \
initrd_bin="initrd.bin" \
el3_payload_bin="manifest.dtb" \
has_smmuv3_params="1" \
diff --git a/run_config/fvp-spm.optee.sp b/run_config/fvp-spm.optee.sp
index a924c38..a194587 100644
--- a/run_config/fvp-spm.optee.sp
+++ b/run_config/fvp-spm.optee.sp
@@ -34,6 +34,12 @@
post_fetch_tf_resource() {
local model="base-aemv8a"
- model="$model" arch_version="8.4" has_smmuv3_params="1" gen_model_params
+ model="$model" \
+ arch_version="8.5" \
+ has_smmuv3_params="1" \
+ has_branch_target_exception="1" \
+ restriction_on_speculative_execution="2" \
+ gen_model_params
+
model="$model" gen_fvp_yaml
}
diff --git a/run_config/fvp-spm.rstbl31 b/run_config/fvp-spm.rstbl31
index 45d0983..36031b5 100644
--- a/run_config/fvp-spm.rstbl31
+++ b/run_config/fvp-spm.rstbl31
@@ -45,7 +45,9 @@
local model="base-aemv8a"
model="$model" \
- arch_version="8.4" \
+ arch_version="8.5" \
+ has_branch_target_exception="1" \
+ restriction_on_speculative_execution="2" \
reset_to_bl31="1" \
preload_bl33="1" \
preload_bl33_bin="$archive/hafnium.bin" \
@@ -58,5 +60,6 @@
el3_payload_bin="manifest.dtb" \
has_smmuv3_params="1" \
gen_model_params
+
model="$model" model_dtb="manifest.dtb" gen_fvp_yaml
}