summaryrefslogtreecommitdiffstats
path: root/src/include/usr/secureboot/service.H
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/usr/secureboot/service.H')
-rw-r--r--src/include/usr/secureboot/service.H17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/include/usr/secureboot/service.H b/src/include/usr/secureboot/service.H
index cb2829147..3060e9225 100644
--- a/src/include/usr/secureboot/service.H
+++ b/src/include/usr/secureboot/service.H
@@ -32,6 +32,9 @@
#include <cstdint>
#include <securerom/sha512.H>
#include <securerom/ROM.H>
+#include <vmmconst.h>
+#include <sys/misc.h>
+#include <kernel/vmmmgr.H>
/*
* @brief Used to capture the first 4 bytes of the hash for tracing purposes
@@ -363,6 +366,20 @@ namespace SECUREBOOT
*/
errlHndl_t setSbeSecurityMode(uint8_t i_sbeSecurityMode);
+ /*
+ * @brief Calculates the node's proposed start address for the system's
+ * SP ATTN areas, which becomes the effective configuration if it's
+ * elected as the master.
+ *
+ * @return uint64_t Absolute start address for the intended SP ATTN areas
+ */
+ inline uint64_t calcSpAttnAreaStart()
+ {
+ auto hrmorVal = cpu_spr_value(CPU_SPR_HRMOR);
+ return (hrmorVal - VMM_HRMOR_OFFSET + PHYP_ATTN_AREA_OFFSET)
+ | VmmManager::FORCE_PHYS_ADDR;
+ }
+
}
#endif
OpenPOWER on IntegriCloud