summaryrefslogtreecommitdiffstats
path: root/src/include/usr
diff options
context:
space:
mode:
authorMarty Gloff <mgloff@us.ibm.com>2018-02-01 09:49:42 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-03-05 12:09:33 -0500
commit40c3350ff928b8df7f7db1baefe5800b25438f0c (patch)
treef30091fcf8bd523ab182fee8025784609930a08b /src/include/usr
parent48235812776de62e94ed09034eba83487d1b2bf1 (diff)
downloadtalos-hostboot-40c3350ff928b8df7f7db1baefe5800b25438f0c.tar.gz
talos-hostboot-40c3350ff928b8df7f7db1baefe5800b25438f0c.zip
Support multiple nodes in HBRT - Support Multiple Nodes in TargetService
Change to call the TargetService class initialization function with the correct maximum number of nodes rather than always defaulting to 1. Provide support to get first target iterator for a specific node. Update AttrRP::translateAddr functions to handle nodes. Change-Id: Ia3496c2f4daf0b78999bde35565f4541fedb0b4d RTC: 186869 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/53190 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Prachi Gupta <pragupta@us.ibm.com> Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr')
-rw-r--r--src/include/usr/targeting/attrrp.H22
-rw-r--r--src/include/usr/targeting/common/targetservice.H34
2 files changed, 51 insertions, 5 deletions
diff --git a/src/include/usr/targeting/attrrp.H b/src/include/usr/targeting/attrrp.H
index 77669e439..dda62b881 100644
--- a/src/include/usr/targeting/attrrp.H
+++ b/src/include/usr/targeting/attrrp.H
@@ -171,13 +171,27 @@ class AttrRP
void* getBaseAddress(const NODE_ID i_nodeId);
/**
+ * @brief Returns Node Id of the Target handle passed
+ *
+ * @param[in] i_pTarget
+ * Non-NULL Target handle for which node ID is required.
+ * @param[out] o_nodeId
+ * Node ID of the Target Handle requested. If Target not found
+ * the invalid node will be return in here.
+ *
+ * @return void
+ */
+ void getNodeId(const Target* i_pTarget,
+ NODE_ID& o_nodeId) const;
+
+ /**
* @brief Translates given address, according to the resource
* provider's translation algorithm
*
* @param[in] i_pAddress
* Address to translate
*
- * @param[in] i_pUnused
+ * @param[in] i_pTarget
* Node target used by common code, unused in Hostboot
*
* @return void* Returns the translated address. Common attribute
@@ -189,7 +203,7 @@ class AttrRP
*/
void* translateAddr(
void* i_pAddress,
- const Target* i_pUnused)
+ const Target* i_pTarget)
#ifndef __HOSTBOOT_RUNTIME
{
return i_pAddress;
@@ -205,7 +219,7 @@ class AttrRP
* @param[in] i_pAddress
* Address to translate
*
- * @param[in] i_unused
+ * @param[in] i_nodeId
* Node ID used by common code, unused in Hostboot
*
* @return void* Returns the translated address. Common attribute
@@ -217,7 +231,7 @@ class AttrRP
*/
void* translateAddr(
void* i_pAddress,
- const TARGETING::NODE_ID i_unused)
+ const TARGETING::NODE_ID i_nodeId)
#ifndef __HOSTBOOT_RUNTIME
{
return i_pAddress;
diff --git a/src/include/usr/targeting/common/targetservice.H b/src/include/usr/targeting/common/targetservice.H
index b63c25fb5..056dfb9a5 100644
--- a/src/include/usr/targeting/common/targetservice.H
+++ b/src/include/usr/targeting/common/targetservice.H
@@ -256,6 +256,18 @@ class TargetService
*/
iterator begin();
+#ifdef __HOSTBOOT_RUNTIME
+ /**
+ * @brief Return iterator which points to first target service target
+ * (or end() if none) for a specific node
+ *
+ * @param[in] i_nodeId, node Id
+ *
+ * @return Iterator pointing to first target service target for node
+ */
+ iterator begin(NODE_ID i_nodeId);
+#endif
+
/**
* @brief Return rawiterator which points to first target service
* target (or end() if none)
@@ -801,7 +813,7 @@ class TargetService
* @brief Returns the first Target from the first initialized node
* from the pool of targets.
*
- * param[out] o_firstTargetPtr First Target handle
+ * @param[out] o_firstTargetPtr First Target handle
*
* @pre Target service must be initialized
*
@@ -812,6 +824,26 @@ class TargetService
*/
void _getFirstTargetForIterators (Target*& o_firstTargetPtr) const;
+#ifdef __HOSTBOOT_RUNTIME
+ /**
+ * @brief Returns the first Target from the node's pool of targets if
+ * node is initialized.
+ *
+ * @param[out] o_firstTargetPtr First Target handle or nullptr
+ *
+ * @param[in] i_nodeId, node Id
+ *
+ * @pre Target service must be initialized
+ *
+ * @post Target Service returns the first Target from the node if node
+ * is initialized.
+ *
+ * @returns void
+ */
+ void _getFirstTargetForIterators (Target*& o_firstTargetPtr,
+ NODE_ID i_nodeId) const;
+#endif
+
/**
* @brief Configures the pool of targets
*
OpenPOWER on IntegriCloud