summaryrefslogtreecommitdiffstats
path: root/src/usr/runtime
diff options
context:
space:
mode:
authorPrachi Gupta <pragupta@us.ibm.com>2018-02-16 15:58:53 -0600
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2018-02-19 10:18:52 -0500
commit5c78bbd873e90210f862d863bca63f94ed169cc8 (patch)
tree387ab94d9050d8129871b18e0d443adf333d46de /src/usr/runtime
parentf595ecf7f9d00b2f89f72fb462913a151f9383b4 (diff)
downloadtalos-hostboot-5c78bbd873e90210f862d863bca63f94ed169cc8.tar.gz
talos-hostboot-5c78bbd873e90210f862d863bca63f94ed169cc8.zip
checkHbResMemLimit -- change to check correctly on multi-node
checkHbResMemLimit function did not take HRMOR into account when determining the LOWER and UPPER limits for hb reserved memory section. This broke on a multi-node system. Changed the function to take the HRMOR into account to pass on slave nodes. Change-Id: Ib16816ba8e7d9740f0ee402cdbc05531c4161362 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54272 Tested-by: Jenkins Server <pfd-jenkins+hostboot@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: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/runtime')
-rw-r--r--src/usr/runtime/populate_hbruntime.C19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/usr/runtime/populate_hbruntime.C b/src/usr/runtime/populate_hbruntime.C
index d2e0e42ef..ae31ea9b0 100644
--- a/src/usr/runtime/populate_hbruntime.C
+++ b/src/usr/runtime/populate_hbruntime.C
@@ -263,11 +263,26 @@ void traceHbRsvMemRange(hdatMsVpdRhbAddrRange_t* & i_rngPtr )
errlHndl_t checkHbResMemLimit(const uint64_t i_addr, const uint64_t i_size)
{
errlHndl_t l_errl = nullptr;
+
+ //Get base HRMOR Base attribute
+ TARGETING::Target * pTgt = NULL;
+ TARGETING::targetService().getTopLevelTarget(pTgt);
+ assert(pTgt != NULL);
+ auto hrmor_base = pTgt->getAttr<TARGETING::ATTR_HB_HRMOR_NODAL_BASE>();
+
+ //get this hb instance
+ pTgt = NULL;
+ TARGETING::targetService().masterProcChipTargetHandle(pTgt);
+ auto epath = pTgt->getAttr<TARGETING::ATTR_PHYS_PATH>();
+ auto pe = epath.pathElementOfType(TARGETING::TYPE_NODE);
+ auto this_node = pe.instance;
+
+ auto hrmor = hrmor_base * this_node;
// Only check if PHYP is running or if running in standalone.
if(TARGETING::is_phyp_load() || TARGETING::is_no_load())
{
- if((i_addr < HB_RES_MEM_LOWER_LIMIT) or
- ((i_addr + i_size - 1) > HB_RES_MEM_UPPER_LIMIT))
+ if((i_addr < (HB_RES_MEM_LOWER_LIMIT + hrmor)) or
+ ((i_addr + i_size - 1) > (HB_RES_MEM_UPPER_LIMIT+hrmor)))
{
TRACFCOMP(g_trac_runtime, "checkHbResMemLimit> Attempt to write"
" to hostboot reserved memory outside of allowed hostboot address"
OpenPOWER on IntegriCloud