summaryrefslogtreecommitdiffstats
path: root/src/include/usr/targeting
diff options
context:
space:
mode:
authorChristian Geddes <crgeddes@us.ibm.com>2018-11-08 11:06:47 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-11-27 13:03:37 -0600
commit63a9aa53dcf3c7ddcff756e694ddcff246b5c9f2 (patch)
tree7a4c94c123a50f14d945f6af235733b235214ca5 /src/include/usr/targeting
parent896f7a9abffa5ece17107e1f653c620d72a82628 (diff)
downloadtalos-hostboot-63a9aa53dcf3c7ddcff756e694ddcff246b5c9f2.tar.gz
talos-hostboot-63a9aa53dcf3c7ddcff756e694ddcff246b5c9f2.zip
Define Parent/Child Relationship for OMIC/OMI targets
This commit puts in the plumbing to have xmltohb.pl look for ATTR_OMIC_PARENT attributes on the OMI targets and with the value of that attribute define a bi-directional relationship between the given OMI target and its defined OMIC parent. Each target in the binary will have pointers to its associated parent/child. When getChildren<OMI> or getParent<OMIC> is called in the FAPI2 api for a OMIC or OMI target respectively, then the Hostboot platform implementation of these functions will route to the new getParentOmicTargetsByState and getChildOmiTargetsByState functions that were defined to perform lookups in the targeting binary for this relationship. Change-Id: I8cd901864a700c9fe575dfa0916d5e78760a7b0c RTC: 172969 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68541 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: Matt Derksen <mderkse1@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr/targeting')
-rw-r--r--src/include/usr/targeting/common/target.H5
-rw-r--r--src/include/usr/targeting/common/targetservice.H2
-rw-r--r--src/include/usr/targeting/common/utilFilter.H42
3 files changed, 47 insertions, 2 deletions
diff --git a/src/include/usr/targeting/common/target.H b/src/include/usr/targeting/common/target.H
index f462581de..16622adf9 100644
--- a/src/include/usr/targeting/common/target.H
+++ b/src/include/usr/targeting/common/target.H
@@ -770,14 +770,15 @@ class Target
// Array of pointers to target handles. Currently there is one pointer
// for each supported association type. The currently supported
// association types are PARENT, CHILD, PARENT_BY_AFFINITY,
- // CHILD_BY_AFFINTY, PERVASIVE_CHILD, and PARENT_PERVASIVE.
+ // CHILD_BY_AFFINTY, PERVASIVE_CHILD, PARENT_PERVASIVE,
+ // OMI_CHILD, and OMIC_PARENT.
// The number of pointers should exactly equal value
// of TargetService::MAX_ASSOCIATION_TYPES defined in
// targeting/common/targetservice.H. Due to the huge code changes
// necessary to directly use that enum value, a compile time assert in
// targeting/common/targetservice.C enforces that restriction.
TARGETING::AbstractPointer< AbstractPointer<Target> >
- iv_ppAssociations[6];
+ iv_ppAssociations[8];
private: // Private CTORs/DTORs/Operators
diff --git a/src/include/usr/targeting/common/targetservice.H b/src/include/usr/targeting/common/targetservice.H
index 4c6f78996..157372126 100644
--- a/src/include/usr/targeting/common/targetservice.H
+++ b/src/include/usr/targeting/common/targetservice.H
@@ -210,6 +210,8 @@ class TargetService
///< associated with a pervasive target
PARENT_PERVASIVE, ///< The result target should be a pervasive
///< target
+ OMI_CHILD, ///< The result target(s) should be an OMI target
+ OMIC_PARENT, ///< The result target should be an OMIC target
MAX_ASSOCIATION_TYPES, ///< Number of types, must always be last
};
diff --git a/src/include/usr/targeting/common/utilFilter.H b/src/include/usr/targeting/common/utilFilter.H
index 9d840a450..b54c5f8ac 100644
--- a/src/include/usr/targeting/common/utilFilter.H
+++ b/src/include/usr/targeting/common/utilFilter.H
@@ -262,6 +262,48 @@ void getParentPervasiveTargetsByState (
ResourceState i_state);
/**
+ * @brief Given an input target, finds all the targets linked to it via a
+ * OMIC_PARENT relationship and writes them to the output vector.
+ * The class, type, and resource state further filter the set of results.
+ * Note: It is expected that only 1 target will be added to the output
+ * vector for getParentOmicTargetsByState calls.
+ *
+ * @parm[out] o_vector, reference to vector of target pointers
+ * @parm[in] i_target, source target to search from
+ * @parm[in] i_class, class of the targets to be obtained
+ * @parm[in] i_type, type of the targets to be obtained
+ * @parm[in] i_state, specifies state the target should be in
+ *
+ * @return N/A
+ */
+void getParentOmicTargetsByState (
+ TARGETING::TargetHandleList& o_vector,
+ const Target* i_target,
+ CLASS i_class,
+ TYPE i_type,
+ ResourceState i_state);
+
+/**
+ * @brief Given an input target, finds all the targets linked to it via a
+ * OMI_CHILD relationship and writes them to the output vector.
+ * The class, type, and resource state further filter the set of results.
+ *
+ * @parm[out] o_vector, reference to vector of target pointers
+ * @parm[in] i_target, source target to search from
+ * @parm[in] i_class, class of the targets to be obtained
+ * @parm[in] i_type, type of the targets to be obtained
+ * @parm[in] i_state, specifies state the target should be in
+ *
+ * @return N/A
+ */
+void getChildOmiTargetsByState (
+ TARGETING::TargetHandleList& o_vector,
+ const Target* i_target,
+ CLASS i_class,
+ TYPE i_type,
+ ResourceState i_state);
+
+/**
* @brief Populate the o_vector with target object pointers which are
* affinity parents of the input target
*
OpenPOWER on IntegriCloud