summaryrefslogtreecommitdiffstats
path: root/src/include/usr/runtime/runtime.H
diff options
context:
space:
mode:
authorJaymes Wilks <mjwilks@us.ibm.com>2018-06-21 11:50:46 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2018-06-26 11:52:33 -0400
commitd406ad362d7f95cef1425216996f08fb5a1c7dca (patch)
tree1d44a17aa093f0e2ec7d59bf40064f93fe5c85df /src/include/usr/runtime/runtime.H
parent0e138b0da002197cc86f601be5b307386a5fdfab (diff)
downloadtalos-hostboot-d406ad362d7f95cef1425216996f08fb5a1c7dca.tar.gz
talos-hostboot-d406ad362d7f95cef1425216996f08fb5a1c7dca.zip
SP ATTN area relative addressing cleanup
This change attemps to remove some technical debt incurred by the "HRMOR relative addressing for PHyp SP ATTN area dump" commit. Change-Id: I773c25e6f704fba561aa78106120325562698e4e RTC:186439 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/61099 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/include/usr/runtime/runtime.H')
-rw-r--r--src/include/usr/runtime/runtime.H19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/include/usr/runtime/runtime.H b/src/include/usr/runtime/runtime.H
index 3ac97e81a..b5e717e2b 100644
--- a/src/include/usr/runtime/runtime.H
+++ b/src/include/usr/runtime/runtime.H
@@ -32,6 +32,9 @@
#include <hdat/hdat.H>
#include "../../../src/usr/runtime/hdatstructs.H"
#include <vmmconst.h>
+#include <sys/misc.h>
+#include <kernel/vmmmgr.H>
+
namespace RUNTIME
{
@@ -371,6 +374,22 @@ void findHdatLocation(uint64_t payloadBase_va,
*/
errlHndl_t getRsvdMemTraceBuf(uint64_t& o_RsvdMemAddress, uint64_t& o_size);
+
+/*
+ * @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