aboutsummaryrefslogtreecommitdiff
path: root/tftf
diff options
context:
space:
mode:
authorSoby Mathew <soby.mathew@arm.com>2019-10-04 14:15:59 +0000
committerTrustedFirmware Code Review <review@review.trustedfirmware.org>2019-10-04 14:15:59 +0000
commit7d3054a7a194a43546b65b7c5d814b8212e2e01e (patch)
tree4d9056c3d3cc86fb248ca312c6a8b75b7cd039fb /tftf
parent7edf1a5ef3153f761c094c035da3eb10501b7247 (diff)
parent719714f1895399e6d64049bed3b03c2597d95402 (diff)
downloadtf-a-tests-7d3054a7a194a43546b65b7c5d814b8212e2e01e.tar.gz
Merge "TF-A Tests: Enable PAuth on warm boot path"
Diffstat (limited to 'tftf')
-rw-r--r--tftf/framework/main.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/tftf/framework/main.c b/tftf/framework/main.c
index e84e4507..a2e84b7e 100644
--- a/tftf/framework/main.c
+++ b/tftf/framework/main.c
@@ -12,6 +12,7 @@
#include <irq.h>
#include <mmio.h>
#include <nvm.h>
+#include <pauth.h>
#include <plat_topology.h>
#include <platform.h>
#include <platform_def.h>
@@ -528,19 +529,12 @@ void __dead2 tftf_cold_boot_main(void)
#if ENABLE_PAUTH
assert(is_armv8_3_pauth_apa_api_present());
- uint64_t *apiakey = plat_init_apiakey();
-
- write_apiakeylo_el1(apiakey[0]);
- write_apiakeyhi_el1(apiakey[1]);
-
- if (IS_IN_EL2()) {
- write_sctlr_el2(read_sctlr_el2() | SCTLR_EnIA_BIT);
- } else {
- assert(IS_IN_EL1());
- write_sctlr_el1(read_sctlr_el1() | SCTLR_EnIA_BIT);
- }
-
- isb();
+ /*
+ * Program APIAKey_EL1 key and enable ARMv8.3-PAuth here as this
+ * function doesn't return, and RETAA instuction won't be executed,
+ * what would cause translation fault otherwise.
+ */
+ pauth_init_enable();
#endif /* ENABLE_PAUTH */
tftf_platform_setup();