summaryrefslogtreecommitdiffstats
path: root/src/usr/vpd/runtime
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2018-06-08 16:03:18 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-06-10 21:28:53 -0400
commit4189613d36cc98d9b52ae72c1bb3727cdb16e34b (patch)
tree7dafbc7a76492288aa2c297d9a2a2f0016bc737c /src/usr/vpd/runtime
parentf290f5d4a9efbf70ae99ec0cdff5b676d63431f1 (diff)
downloadtalos-hostboot-4189613d36cc98d9b52ae72c1bb3727cdb16e34b.tar.gz
talos-hostboot-4189613d36cc98d9b52ae72c1bb3727cdb16e34b.zip
Fix for multinode HBRT use of VPD
Node0 VPD memory is being used for all nodes because we were using a Singleton pointer across modules. This is a problem because static memory is specific to each module which meant we were getting a new copy of the AttrRP object instead of the real version that had real data in it. The change here is to create a new static interface that external modules can call to retrieve the node associated with a given Target. There is also a change to cache this data into a map as I noticed hundreds of accesses during the one function call I was using to test with. Change-Id: I148bf1f405d076276193d526d8a4b1f0649b2c1c CQ: SW431462 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60276 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> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/vpd/runtime')
-rw-r--r--src/usr/vpd/runtime/rt_vpd.C8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/usr/vpd/runtime/rt_vpd.C b/src/usr/vpd/runtime/rt_vpd.C
index 4ced81370..7e4a21ebe 100644
--- a/src/usr/vpd/runtime/rt_vpd.C
+++ b/src/usr/vpd/runtime/rt_vpd.C
@@ -132,6 +132,8 @@ errlHndl_t getPnorAddr( pnorInformation & i_pnorInfo,
// Get the reserved_mem_addr only once
else if( g_reserved_mem_addr[i_instance] == 0 )
{
+ TRACDCOMP( g_trac_vpd, "Grabbing rsvd mem for instance %d", i_instance );
+
uint64_t l_vpdSize;
g_reserved_mem_addr[i_instance] =
hb_get_rt_rsvd_mem(Util::HBRT_MEM_LABEL_VPD,
@@ -232,7 +234,7 @@ errlHndl_t readPNOR ( uint64_t i_byteAddr,
mutex_t * i_mutex )
{
errlHndl_t err = NULL;
- TARGETING::NODE_ID l_nodeId = TARGETING::NODE0;
+ TARGETING::NODE_ID l_nodeId = 0xFF;
int64_t vpdLocation = 0;
uint64_t addr = 0x0;
const char * readAddr = NULL;
@@ -240,10 +242,8 @@ errlHndl_t readPNOR ( uint64_t i_byteAddr,
TRACSSCOMP( g_trac_vpd,
ENTER_MRK"RT fake readPNOR()" );
- // Get AttrRP pointer
- TARGETING::AttrRP *l_attrRP = &TARG_GET_SINGLETON(TARGETING::theAttrRP);
// Get the node ID associated with the input target
- l_attrRP->getNodeId(i_target, l_nodeId);
+ l_nodeId = TARGETING::AttrRP::getNodeId(i_target);
do
{
OpenPOWER on IntegriCloud