summaryrefslogtreecommitdiffstats
path: root/src/include
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/include
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/include')
-rw-r--r--src/include/usr/targeting/attrrp.H15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/include/usr/targeting/attrrp.H b/src/include/usr/targeting/attrrp.H
index bc9425007..679672160 100644
--- a/src/include/usr/targeting/attrrp.H
+++ b/src/include/usr/targeting/attrrp.H
@@ -184,7 +184,7 @@ class AttrRP
void* getBaseAddress(const NODE_ID i_nodeId);
/**
- * @brief Returns Node Id of the Target handle passed
+ * @brief Returns Node Id of the Target handle passed (internal)
*
* @param[in] i_pTarget
* Non-NULL Target handle for which node ID is required.
@@ -197,6 +197,19 @@ class AttrRP
void getNodeId(const Target* i_pTarget,
NODE_ID& o_nodeId) const;
+#ifdef __HOSTBOOT_RUNTIME
+ /**
+ * @brief Returns Node Id of the Target handle passed (external)
+ *
+ * @param[in] i_pTarget
+ * Non-NULL Target handle for which node ID is required.
+ * @return NODE_ID
+ * Node ID of the Target Handle requested. If Target not found
+ * the invalid node will be return in here.
+ */
+ static NODE_ID getNodeId(const Target* i_pTarget);
+#endif
+
/**
* @brief Translates given address, according to the resource
* provider's translation algorithm
OpenPOWER on IntegriCloud