aboutsummaryrefslogtreecommitdiff
path: root/bl31
diff options
context:
space:
mode:
authorZelalem Aweke <zelalem.aweke@arm.com>2021-07-13 14:05:20 -0500
committerZelalem Aweke <zelalem.aweke@arm.com>2021-10-05 11:56:00 -0500
commit1839012d5b5d431f7ec307230eae9890a5fe7477 (patch)
tree15bce24d69e966918d05bba6483408fce5423e16 /bl31
parent5b18de09e80f87963df9a2e451c47e2321b8643a (diff)
feat(rme): add GPT Library
This patch introduces the Granule Protection Table (GPT) library code. This implementation will be updated later to be more flexible, as the current implementation is very rigid. Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com> Change-Id: I3af824a28c6e9a5d36459c0c51d2d9bebfba1505
Diffstat (limited to 'bl31')
-rw-r--r--bl31/aarch64/bl31_entrypoint.S10
-rw-r--r--bl31/bl31.mk5
2 files changed, 13 insertions, 2 deletions
diff --git a/bl31/aarch64/bl31_entrypoint.S b/bl31/aarch64/bl31_entrypoint.S
index 2d672dd12d..2e9a394963 100644
--- a/bl31/aarch64/bl31_entrypoint.S
+++ b/bl31/aarch64/bl31_entrypoint.S
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2020, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2021, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -172,6 +172,14 @@ func bl31_warm_entrypoint
_exception_vectors=runtime_exceptions \
_pie_fixup_size=0
+#if ENABLE_RME
+ /*
+ * Initialise and enable Granule Protection
+ * before enabling any stage of translation.
+ */
+ bl gpt_enable
+#endif
+
/*
* We're about to enable MMU and participate in PSCI state coordination.
*
diff --git a/bl31/bl31.mk b/bl31/bl31.mk
index ce0f69b7d2..5927fb1c97 100644
--- a/bl31/bl31.mk
+++ b/bl31/bl31.mk
@@ -112,7 +112,10 @@ BL31_SOURCES += services/std_svc/pci_svc.c
endif
ifeq (${ENABLE_RME},1)
-BL31_SOURCES += ${RMMD_SOURCES}
+include lib/gpt/gpt.mk
+
+BL31_SOURCES += ${GPT_LIB_SRCS} \
+ ${RMMD_SOURCES}
endif
BL31_LINKERFILE := bl31/bl31.ld.S