diff options
Diffstat (limited to 'src/include/usr/runtime/runtime.H')
| -rw-r--r-- | src/include/usr/runtime/runtime.H | 19 |
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 |

