From 63a9aa53dcf3c7ddcff756e694ddcff246b5c9f2 Mon Sep 17 00:00:00 2001 From: Christian Geddes Date: Thu, 8 Nov 2018 11:06:47 -0600 Subject: 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 or getParent 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 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Matt Derksen Reviewed-by: Nicholas E. Bofferding Reviewed-by: Daniel M. Crowell --- src/usr/fapi2/test/fapi2GetChildrenTest.H | 19 +++++++++++++++++++ src/usr/fapi2/test/fapi2TestUtils.H | 5 +++++ 2 files changed, 24 insertions(+) (limited to 'src/usr/fapi2/test') diff --git a/src/usr/fapi2/test/fapi2GetChildrenTest.H b/src/usr/fapi2/test/fapi2GetChildrenTest.H index 6dbe88e86..04f3863ba 100644 --- a/src/usr/fapi2/test/fapi2GetChildrenTest.H +++ b/src/usr/fapi2/test/fapi2GetChildrenTest.H @@ -233,6 +233,25 @@ void test_fapi2GetChildren() } } + if (isHwValid(l_proc, MY_OMIC) + && isHwValid(l_proc, MY_OMI)) + { + l_childOMIs = fapi2_omicTarget.getChildren(TARGET_STATE_PRESENT); + l_targetHuid = TARGETING::get_huid(targeting_targets[MY_OMIC]); + l_actualSize = l_childOMIs.size(); + + //Set expected size to be the number of OMIs per proc + l_expectedSize = MAX_OMI_PER_OMIC; + numTests++; + if(l_actualSize != l_expectedSize) + { + FAPI_INF("fapi2TargetTest:: # OMIs foound for OMIC0 proc is %d and not %d", + l_actualSize, l_expectedSize); + numFails++; + break; + } + } + if (isHwValid(l_proc, MY_OMI) && isHwValid(l_proc, MY_OCMB)) { diff --git a/src/usr/fapi2/test/fapi2TestUtils.H b/src/usr/fapi2/test/fapi2TestUtils.H index 2d51330c2..cb88a1d6e 100644 --- a/src/usr/fapi2/test/fapi2TestUtils.H +++ b/src/usr/fapi2/test/fapi2TestUtils.H @@ -53,6 +53,11 @@ #define OCMB_PER_OMI 1 #define MEM_PORT_PER_OCMB 1 +// Note that OMIC can either have 2 or 3 child OMI +// targets. There are 3 OMIC targets per MC, OMIC0 +// and OMIC1 have 3 children, OMIC2 has 2 children +#define MAX_OMI_PER_OMIC 3 + #define SIMULATED_GOOD_CORES 4 // non-core and non-cache chiplet ids -- cgit v1.2.3