summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjohpow01 <john.powell@arm.com>2021-05-20 17:19:19 -0500
committerSoby Mathew <soby.mathew@arm.com>2021-06-18 12:12:46 +0100
commitb8c883f0629f28b0f9feed8a722c757b3d1b4a2b (patch)
tree64d6e1b369eca39cf23a2e0f319ab3bd709bf443
parentc1aaf7d4f9ad96fa96bd0d4a10514b7e301c4180 (diff)
downloadarm-trusted-firmware-b8c883f0629f28b0f9feed8a722c757b3d1b4a2b.tar.gz
feat(RME): Makefile changes to support ENABLE_RME build option
This patch updates the build system to support the ENABLE_RME build flag option. Signed-off-by: John Powell <john.powell@arm.com> Change-Id: I7a145a2812fdf812e5b6353a35412c3bffe84fba
-rw-r--r--Makefile25
-rw-r--r--docs/getting_started/build-options.rst3
-rw-r--r--make_helpers/defaults.mk5
3 files changed, 31 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 2376b9acc..8ddbcdd95 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013-2021, ARM Limited and Contributors. All rights reserved.
+# Copyright (c) 2013-2021, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -129,6 +129,19 @@ else
$(error Unknown BRANCH_PROTECTION value ${BRANCH_PROTECTION})
endif
+# RME requires AARCH64 and other features
+ifneq (${ENABLE_RME},0)
+ifneq (${ARCH},aarch64)
+ $(error ENABLE_RME requires AArch64)
+endif
+# RME requires el2 context to be saved for now.
+CTX_INCLUDE_EL2_REGS := 1
+SPD = rmmd
+# These arch versions will need to be updated later.
+ARM_ARCH_MAJOR := 8
+ARM_ARCH_MINOR := 4
+endif
+
# USE_SPINLOCK_CAS requires AArch64 build
ifeq (${USE_SPINLOCK_CAS},1)
ifneq (${ARCH},aarch64)
@@ -521,6 +534,14 @@ ifneq (${SPD},none)
ifeq ($(findstring optee_sp,$(ARM_SPMC_MANIFEST_DTS)),optee_sp)
DTC_CPPFLAGS += -DOPTEE_SP_FW_CONFIG
endif
+ else ifeq (${SPD},rmmd)
+ $(warning "RMMD is an experimental feature")
+ # RMMD is located in std_svc directory
+ SPD_DIR := std_svc
+
+ ifeq ($(CTX_INCLUDE_EL2_REGS),0)
+ $(error RMM at S-EL2 requires CTX_INCLUDE_EL2_REGS option)
+ endif
else
# All other SPDs in spd directory
SPD_DIR := spd
@@ -906,6 +927,7 @@ $(eval $(call assert_booleans,\
ENABLE_PIE \
ENABLE_PMF \
ENABLE_PSCI_STAT \
+ ENABLE_RME \
ENABLE_RUNTIME_INSTRUMENTATION \
ENABLE_SPE_FOR_LOWER_ELS \
ENABLE_SVE_FOR_NS \
@@ -999,6 +1021,7 @@ $(eval $(call add_defines,\
ENABLE_PIE \
ENABLE_PMF \
ENABLE_PSCI_STAT \
+ ENABLE_RME \
ENABLE_RUNTIME_INSTRUMENTATION \
ENABLE_SPE_FOR_LOWER_ELS \
ENABLE_SVE_FOR_NS \
diff --git a/docs/getting_started/build-options.rst b/docs/getting_started/build-options.rst
index 2c3cd6bb5..d371c9d1e 100644
--- a/docs/getting_started/build-options.rst
+++ b/docs/getting_started/build-options.rst
@@ -264,6 +264,9 @@ Common build options
be enabled. If ``ENABLE_PMF`` is set, the residency statistics are tracked in
software.
+- ``ENABLE_RME``: Boolean option to enable support for the ARMv9 Realm
+ Management Extension.
+
- ``ENABLE_RUNTIME_INSTRUMENTATION``: Boolean option to enable runtime
instrumentation which injects timestamp collection points into TF-A to
allow runtime performance to be measured. Currently, only PSCI is
diff --git a/make_helpers/defaults.mk b/make_helpers/defaults.mk
index 8d0cd0477..f844648a0 100644
--- a/make_helpers/defaults.mk
+++ b/make_helpers/defaults.mk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016-2021, ARM Limited. All rights reserved.
+# Copyright (c) 2016-2021, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -102,6 +102,9 @@ ENABLE_PMF := 0
# Flag to enable PSCI STATs functionality
ENABLE_PSCI_STAT := 0
+# Flag to enable Realm Management Extension (RME)
+ENABLE_RME := 0
+
# Flag to enable runtime instrumentation using PMF
ENABLE_RUNTIME_INSTRUMENTATION := 0