Merge "Refactor ARMv8.3 Pointer Authentication support code" into integration
[project/bcm63xx/atf.git] / lib / psci / psci_setup.c
index b9467d3e00f347574015aedc831ab34bffa5a8ea..853f9157cf1073a58b1c69d8b0bbb2aec440b043 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -280,6 +280,12 @@ void psci_arch_setup(void)
 
        /* Having initialized cpu_ops, we can now print errata status */
        print_errata_status();
+
+#if ENABLE_PAUTH
+       /* Store APIAKey_EL1 key */
+       set_cpu_data(apiakey[0], read_apiakeylo_el1());
+       set_cpu_data(apiakey[1], read_apiakeyhi_el1());
+#endif /* ENABLE_PAUTH */
 }
 
 /******************************************************************************