feat(PAuth): add support for RMM and Realms
* This patch adds support for use of Pointer Authentication (PAuth)
feature in Realms and enable PAuth in RMM (R-EL2).
* The EL3 is expected to context switch the PAuth key registers and
hence RMM does not need to save the NS key values.
* The PAuth registers corresponding to REC is restored before
entering a Realm and the same is saved and RMM kays IA keys are
restored on Realm exit.
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Signed-off-by: Shruti Gupta <shruti.gupta@arm.com>
Change-Id: I9b19d16478f660f5b2e037069a7e5f9a782f06fb
diff --git a/lib/realm/include/rec.h b/lib/realm/include/rec.h
index 05ac7f4..9b57057 100644
--- a/lib/realm/include/rec.h
+++ b/lib/realm/include/rec.h
@@ -12,6 +12,7 @@
#include <attestation_token.h>
#include <gic.h>
#include <memory_alloc.h>
+#include <pauth.h>
#include <pmu.h>
#include <ripas.h>
#include <simd.h>
@@ -121,6 +122,13 @@
bool runnable;
unsigned long regs[31];
+
+ /*
+ * PAuth state of Realm.
+ * Note that we do not need to save NS state as EL3 will save this as part of world switch.
+ */
+ struct pauth_state pauth;
+
unsigned long pc;
unsigned long pstate;