summaryrefslogtreecommitdiffstats
path: root/src/include/usr/fapi2/target.H
diff options
context:
space:
mode:
authorNick Bofferding <bofferdn@us.ibm.com>2016-03-14 11:27:49 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-03-23 11:31:45 -0400
commit16ff4c0894f726ea97362536af36a413b1f255cd (patch)
tree78e5c57d3fe5307917dca729d444437db8ead3b3 /src/include/usr/fapi2/target.H
parentefb976fc64fc447d93015d3bb950431f341b6c19 (diff)
downloadtalos-hostboot-16ff4c0894f726ea97362536af36a413b1f255cd.tar.gz
talos-hostboot-16ff4c0894f726ea97362536af36a413b1f255cd.zip
Support getChildren and getParent FAPI2 tests
- Added FAPI reason codes to support tests - Added special handlers to getParent/getChildren for pervasive associations - Added new APIs to filtering utilities to walk pervasive associations - Updated getParent/getChildren tests to fully exercise pervasive associations RTC: 148577 Change-Id: I0d8ec427e6c2092852a32c7da605d1c47c554b50 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/22084 Tested-by: Jenkins Server Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Tested-by: FSP CI Jenkins Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr/fapi2/target.H')
-rw-r--r--src/include/usr/fapi2/target.H50
1 files changed, 42 insertions, 8 deletions
diff --git a/src/include/usr/fapi2/target.H b/src/include/usr/fapi2/target.H
index c11454f2f..5eb375336 100644
--- a/src/include/usr/fapi2/target.H
+++ b/src/include/usr/fapi2/target.H
@@ -456,11 +456,24 @@ inline Target<T> Target<K, V>::getParent(void) const
TARGETING::TYPE requiredPType = fapi2::convertFapi2TypeToTargeting(T);
- TARGETING::getParentAffinityTargetsByState(l_parentList,
- static_cast<TARGETING::Target*>(this->get()),
- TARGETING::CLASS_NA,
- requiredPType,
- TARGETING::UTIL_FILTER_ALL);
+ if(T == fapi2::TARGET_TYPE_PERV)
+ {
+ TARGETING::getParentPervasiveTargetsByState(
+ l_parentList,
+ static_cast<TARGETING::Target*>(this->get()),
+ TARGETING::CLASS_NA,
+ requiredPType,
+ TARGETING::UTIL_FILTER_ALL);
+ }
+ else
+ {
+ TARGETING::getParentAffinityTargetsByState(
+ l_parentList,
+ static_cast<TARGETING::Target*>(this->get()),
+ TARGETING::CLASS_NA,
+ requiredPType,
+ TARGETING::UTIL_FILTER_ALL);
+ }
assert(l_parentList.size() == 1, "Found %d parents of the same type. Target HUID %x , \
looking for parents of type %x", l_parentList.size(), TARGETING::get_huid(this->get()) , requiredPType);
@@ -642,22 +655,43 @@ FAPI_DBG(ENTER_MRK "getChildren. Type 0x%08x State:0x%08x", T, i_state);
TARGETING::TargetHandleList l_childList;
bool l_functional = (i_state & fapi2::TARGET_STATE_FUNCTIONAL)? true:false;
-
if(!l_functional)
{
- TARGETING::getChildAffinityTargetsByState(l_childList,
+ if(K == fapi2::TARGET_TYPE_PERV)
+ {
+ TARGETING::getPervasiveChildTargetsByState(l_childList,
+ static_cast<TARGETING::Target*>(this->get()),
+ TARGETING::CLASS_NA,
+ l_type,
+ TARGETING::UTIL_FILTER_ALL);
+ }
+ else
+ {
+ TARGETING::getChildAffinityTargetsByState(l_childList,
static_cast<TARGETING::Target*>(this->get()),
TARGETING::CLASS_NA,
l_type,
TARGETING::UTIL_FILTER_ALL);
+ }
}
else
{
- TARGETING::getChildAffinityTargetsByState(l_childList,
+ if(K == fapi2::TARGET_TYPE_PERV)
+ {
+ TARGETING::getPervasiveChildTargetsByState(l_childList,
+ static_cast<TARGETING::Target*>(this->get()),
+ TARGETING::CLASS_NA,
+ l_type,
+ TARGETING::UTIL_FILTER_FUNCTIONAL);
+ }
+ else
+ {
+ TARGETING::getChildAffinityTargetsByState(l_childList,
static_cast<TARGETING::Target*>(this->get()),
TARGETING::CLASS_NA,
l_type,
TARGETING::UTIL_FILTER_FUNCTIONAL);
+ }
}
FAPI_DBG("getChildren: l_functional 0x%.8X, l_type = 0x%.8X, ChipUnitId 0x%.8X",
OpenPOWER on IntegriCloud