summaryrefslogtreecommitdiffstats
path: root/import/hwpf
diff options
context:
space:
mode:
authorMatt K. Light <mklight@us.ibm.com>2016-05-18 09:35:06 -0500
committerSantosh S. Puranik <santosh.puranik@in.ibm.com>2016-05-19 13:00:49 -0400
commita8c94625e29f1eb1a12565a2a80cab3bf580b289 (patch)
tree37b24a4fe3a61f487fcebf15de675adcf354754c /import/hwpf
parentf5041a109f48bf70213b6d4ec9bae034a1adc0f1 (diff)
downloadtalos-sbe-a8c94625e29f1eb1a12565a2a80cab3bf580b289.tar.gz
talos-sbe-a8c94625e29f1eb1a12565a2a80cab3bf580b289.zip
add Target::isFunctional()
-PPE and Cronus would like to check if a target is functional using different attributes. This method would abstract the checking. PPE would use ATTR_PG_* Cronus would use ATTR_FUNCTIONAL Change-Id: I59710cd118f756bed676fb94c38bbf0517f24730 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24721 Tested-by: Jenkins Server Tested-by: PPE CI Tested-by: Hostboot CI Reviewed-by: Brian R. Silver <bsilver@us.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: Santosh S. Puranik <santosh.puranik@in.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24722
Diffstat (limited to 'import/hwpf')
-rw-r--r--import/hwpf/fapi2/include/fapi2_target.H8
-rw-r--r--import/hwpf/fapi2/include/plat/target.H14
2 files changed, 22 insertions, 0 deletions
diff --git a/import/hwpf/fapi2/include/fapi2_target.H b/import/hwpf/fapi2/include/fapi2_target.H
index 7c0a8d8d..a0ce0d1c 100644
--- a/import/hwpf/fapi2/include/fapi2_target.H
+++ b/import/hwpf/fapi2/include/fapi2_target.H
@@ -311,6 +311,14 @@ class Target
getOtherEnd(Target<T>& o_target, const TargetState i_state = TARGET_STATE_FUNCTIONAL) const;
///
+ /// @brief Is the target functional?
+ /// @return true if target is functional, false if non-functional
+ ///
+
+ inline bool
+ isFunctional(void) const;
+
+ ///
/// @brief Copy from a Target<O> to a Target<K>
/// @tparam O the target type of the other
///
diff --git a/import/hwpf/fapi2/include/plat/target.H b/import/hwpf/fapi2/include/plat/target.H
index 4b07f46e..4d0c203f 100644
--- a/import/hwpf/fapi2/include/plat/target.H
+++ b/import/hwpf/fapi2/include/plat/target.H
@@ -171,6 +171,20 @@ Target<K, V>::getOtherEnd(Target<T>& o_target, const TargetState i_state) const
}
///
+/// @brief Is the target functional?
+/// @return true if target is functional, false if non-functional
+///
+
+template<TargetType K, typename V>
+inline bool
+Target<K, V>::isFunctional(void) const
+{
+ // Platform check if target is good
+ // Could check ATTR_FUNCTIONAL or ATTR_PG_*
+ return true;
+}
+
+///
/// @brief Return the string interpretation of this target
/// @tparam T The type of the target
/// @param[in] i_target Target<T>
OpenPOWER on IntegriCloud