summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/isteps/istep15/host_build_stop_image.C9
-rw-r--r--src/usr/isteps/pm/pm_common.C11
-rw-r--r--src/usr/runtime/populate_hbruntime.C17
3 files changed, 28 insertions, 9 deletions
diff --git a/src/usr/isteps/istep15/host_build_stop_image.C b/src/usr/isteps/istep15/host_build_stop_image.C
index d1f0a495c..27b4d2893 100644
--- a/src/usr/isteps/istep15/host_build_stop_image.C
+++ b/src/usr/isteps/istep15/host_build_stop_image.C
@@ -383,6 +383,15 @@ void* host_build_stop_image (void *io_pArgs)
P9_MAX_PROCS,
l_pVirtMemBase );
+ //Since we have the HOMER location defined, set the
+ // OCC common attribute to be used later by pm code
+ TARGETING::Target* l_sys = NULL;
+ TARGETING::targetService().getTopLevelTarget(l_sys);
+ assert( l_sys != NULL );
+ l_sys->setAttr<TARGETING::ATTR_OCC_COMMON_AREA_PHYS_ADDR>
+ (reinterpret_cast<uint64_t>(l_pRealMemBase)
+ + VMM_HOMER_REGION_SIZE);
+
// Continue, build hcode images
//
//Load the reference image from PNOR
diff --git a/src/usr/isteps/pm/pm_common.C b/src/usr/isteps/pm/pm_common.C
index ff7074d89..ad1e5421d 100644
--- a/src/usr/isteps/pm/pm_common.C
+++ b/src/usr/isteps/pm/pm_common.C
@@ -810,6 +810,10 @@ namespace HBPM
{
errlHndl_t l_errl = nullptr;
+ TARGETING::Target * l_sys = nullptr;
+ TARGETING::targetService().getTopLevelTarget( l_sys );
+ assert(l_sys != nullptr);
+
TargetHandleList l_procChips;
getAllChips(l_procChips, TYPE_PROC, true);
@@ -824,9 +828,10 @@ namespace HBPM
for (const auto & l_procChip: l_procChips)
{
// This attr was set during istep15 HCODE build
- l_homerPhysAddr =
- l_procChip->getAttr<TARGETING::ATTR_HOMER_PHYS_ADDR>();
- l_commonPhysAddr = l_homerPhysAddr + VMM_HOMER_REGION_SIZE;
+ l_homerPhysAddr = l_procChip->
+ getAttr<TARGETING::ATTR_HOMER_PHYS_ADDR>();
+ l_commonPhysAddr = l_sys->
+ getAttr<TARGETING::ATTR_OCC_COMMON_AREA_PHYS_ADDR>();
l_errl = loadPMComplex(l_procChip,
l_homerPhysAddr,
diff --git a/src/usr/runtime/populate_hbruntime.C b/src/usr/runtime/populate_hbruntime.C
index dba45d701..1e00379e5 100644
--- a/src/usr/runtime/populate_hbruntime.C
+++ b/src/usr/runtime/populate_hbruntime.C
@@ -469,10 +469,10 @@ errlHndl_t populate_HbRsvMem(uint64_t i_nodeId)
// Opal HB reserved memory data
// -----TOP_OF_MEM-------
- // -----HOMER_0----------
- // -----...--------------
- // -----HOMER_N----------
// -----OCC Common-------
+ // -----HOMER_N----------
+ // -----...--------------
+ // -----HOMER_0----------
// -----VPD--------------
// -----ATTR Data--------
// -----HBRT Image-------
@@ -489,7 +489,8 @@ errlHndl_t populate_HbRsvMem(uint64_t i_nodeId)
for (const auto & l_procChip: l_procChips)
{
- l_homerAddr -= VMM_HOMER_INSTANCE_SIZE;
+ l_homerAddr = l_procChip->getAttr
+ <TARGETING::ATTR_HOMER_PHYS_ADDR>();
// Get a pointer to the next available HDAT HB Rsv Mem entry
l_rngPtr = nullptr;
@@ -525,8 +526,12 @@ errlHndl_t populate_HbRsvMem(uint64_t i_nodeId)
#ifdef CONFIG_START_OCC_DURING_BOOT
// OCC Common entry
- uint64_t l_occCommonAddr = l_topMemAddr
- - VMM_ALL_HOMER_OCC_MEMORY_SIZE;
+ TARGETING::Target * l_sys = nullptr;
+ TARGETING::targetService().getTopLevelTarget( l_sys );
+ assert(l_sys != nullptr);
+ uint64_t l_occCommonAddr = l_sys->getAttr
+ <TARGETING::ATTR_OCC_COMMON_AREA_PHYS_ADDR>();
+
l_label = "ibm,occ-common-area";
l_labelSize = strlen(l_label) + 1;
OpenPOWER on IntegriCloud