summaryrefslogtreecommitdiffstats
path: root/src/include/usr
diff options
context:
space:
mode:
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