Commit b8c883f0 authored by johpow01's avatar johpow01 Committed by Soby Mathew
Browse files

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: default avatarJohn Powell <john.powell@arm.com>
Change-Id: I7a145a2812fdf812e5b6353a35412c3bffe84fba
parent c1aaf7d4
# #
# 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 # SPDX-License-Identifier: BSD-3-Clause
# #
...@@ -129,6 +129,19 @@ else ...@@ -129,6 +129,19 @@ else
$(error Unknown BRANCH_PROTECTION value ${BRANCH_PROTECTION}) $(error Unknown BRANCH_PROTECTION value ${BRANCH_PROTECTION})
endif 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 # USE_SPINLOCK_CAS requires AArch64 build
ifeq (${USE_SPINLOCK_CAS},1) ifeq (${USE_SPINLOCK_CAS},1)
ifneq (${ARCH},aarch64) ifneq (${ARCH},aarch64)
...@@ -521,6 +534,14 @@ ifneq (${SPD},none) ...@@ -521,6 +534,14 @@ ifneq (${SPD},none)
ifeq ($(findstring optee_sp,$(ARM_SPMC_MANIFEST_DTS)),optee_sp) ifeq ($(findstring optee_sp,$(ARM_SPMC_MANIFEST_DTS)),optee_sp)
DTC_CPPFLAGS += -DOPTEE_SP_FW_CONFIG DTC_CPPFLAGS += -DOPTEE_SP_FW_CONFIG
endif 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 else
# All other SPDs in spd directory # All other SPDs in spd directory
SPD_DIR := spd SPD_DIR := spd
...@@ -906,6 +927,7 @@ $(eval $(call assert_booleans,\ ...@@ -906,6 +927,7 @@ $(eval $(call assert_booleans,\
ENABLE_PIE \ ENABLE_PIE \
ENABLE_PMF \ ENABLE_PMF \
ENABLE_PSCI_STAT \ ENABLE_PSCI_STAT \
ENABLE_RME \
ENABLE_RUNTIME_INSTRUMENTATION \ ENABLE_RUNTIME_INSTRUMENTATION \
ENABLE_SPE_FOR_LOWER_ELS \ ENABLE_SPE_FOR_LOWER_ELS \
ENABLE_SVE_FOR_NS \ ENABLE_SVE_FOR_NS \
...@@ -999,6 +1021,7 @@ $(eval $(call add_defines,\ ...@@ -999,6 +1021,7 @@ $(eval $(call add_defines,\
ENABLE_PIE \ ENABLE_PIE \
ENABLE_PMF \ ENABLE_PMF \
ENABLE_PSCI_STAT \ ENABLE_PSCI_STAT \
ENABLE_RME \
ENABLE_RUNTIME_INSTRUMENTATION \ ENABLE_RUNTIME_INSTRUMENTATION \
ENABLE_SPE_FOR_LOWER_ELS \ ENABLE_SPE_FOR_LOWER_ELS \
ENABLE_SVE_FOR_NS \ ENABLE_SVE_FOR_NS \
......
...@@ -264,6 +264,9 @@ Common build options ...@@ -264,6 +264,9 @@ Common build options
be enabled. If ``ENABLE_PMF`` is set, the residency statistics are tracked in be enabled. If ``ENABLE_PMF`` is set, the residency statistics are tracked in
software. software.
- ``ENABLE_RME``: Boolean option to enable support for the ARMv9 Realm
Management Extension.
- ``ENABLE_RUNTIME_INSTRUMENTATION``: Boolean option to enable runtime - ``ENABLE_RUNTIME_INSTRUMENTATION``: Boolean option to enable runtime
instrumentation which injects timestamp collection points into TF-A to instrumentation which injects timestamp collection points into TF-A to
allow runtime performance to be measured. Currently, only PSCI is allow runtime performance to be measured. Currently, only PSCI is
......
# #
# Copyright (c) 2016-2021, ARM Limited. All rights reserved. # Copyright (c) 2016-2021, Arm Limited. All rights reserved.
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
...@@ -102,6 +102,9 @@ ENABLE_PMF := 0 ...@@ -102,6 +102,9 @@ ENABLE_PMF := 0
# Flag to enable PSCI STATs functionality # Flag to enable PSCI STATs functionality
ENABLE_PSCI_STAT := 0 ENABLE_PSCI_STAT := 0
# Flag to enable Realm Management Extension (RME)
ENABLE_RME := 0
# Flag to enable runtime instrumentation using PMF # Flag to enable runtime instrumentation using PMF
ENABLE_RUNTIME_INSTRUMENTATION := 0 ENABLE_RUNTIME_INSTRUMENTATION := 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment