summaryrefslogtreecommitdiff
path: root/bl1/bl1_main.c
diff options
context:
space:
mode:
authorAlexei Fedorov <Alexei.Fedorov@arm.com>2019-10-01 13:58:23 +0100
committerAlexei Fedorov <Alexei.Fedorov@arm.com>2019-10-03 14:43:55 +0100
commit530ceda57288aa931d0c8ba7b3066340d587cc9b (patch)
tree2dce6c07bcf6675c39b9455481f275f36f83b7e4 /bl1/bl1_main.c
parentace23683beb81354d6edbc61c087ab8c384d0631 (diff)
TF-A: Add support for ARMv8.3-PAuth in BL1 SMC calls and BL2U
This patch adds support for ARMv8.3-PAuth in BL1 SMC calls and BL2U image for firmware updates by programming APIAKey_EL1 registers and enabling Pointer Authentication in EL3 and EL1 respectively. Change-Id: I875d952aba8242caf74fb5f4f2d2af6f0c768c08 Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Diffstat (limited to 'bl1/bl1_main.c')
-rw-r--r--bl1/bl1_main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/bl1/bl1_main.c b/bl1/bl1_main.c
index 2bb85114..cd6fe7d5 100644
--- a/bl1/bl1_main.c
+++ b/bl1/bl1_main.c
@@ -31,6 +31,10 @@ DEFINE_SVC_UUID2(bl1_svc_uid,
static void bl1_load_bl2(void);
+#if ENABLE_PAUTH
+uint64_t bl1_apiakey[2];
+#endif
+
/*******************************************************************************
* Helper utility to calculate the BL2 memory layout taking into consideration
* the BL1 RW data assuming that it is at the top of the memory layout.
@@ -131,6 +135,12 @@ void bl1_main(void)
/* Perform platform setup in BL1. */
bl1_platform_setup();
+#if ENABLE_PAUTH
+ /* Store APIAKey_EL1 key */
+ bl1_apiakey[0] = read_apiakeylo_el1();
+ bl1_apiakey[1] = read_apiakeyhi_el1();
+#endif /* ENABLE_PAUTH */
+
/* Get the image id of next image to load and run. */
image_id = bl1_plat_get_next_image_id();