diff options
author | Corey Swenson <cswenson@us.ibm.com> | 2017-03-30 13:52:07 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-04-10 15:36:10 -0400 |
commit | 3b5685fd65c0ab8720dfa8c8562e99463326b816 (patch) | |
tree | 5b136ba430571236bd8fee6c10919db7526709b4 /src/usr | |
parent | e40ab09295b5fea8d3fc250433476437bdeb0d8e (diff) | |
download | talos-hostboot-3b5685fd65c0ab8720dfa8c8562e99463326b816.tar.gz talos-hostboot-3b5685fd65c0ab8720dfa8c8562e99463326b816.zip |
Set HDAT ranges to match HOMER/OCC attributes
Change-Id: Idff2818997488fc6378907c9ddfb56892c2608b3
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38647
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/isteps/istep15/host_build_stop_image.C | 9 | ||||
-rw-r--r-- | src/usr/isteps/pm/pm_common.C | 11 | ||||
-rw-r--r-- | src/usr/runtime/populate_hbruntime.C | 17 |
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; |