summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Cprek <smcprek@us.ibm.com>2014-04-09 09:26:01 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-05-29 11:13:59 -0500
commit6750245027d53c6ba0b671f522e26971dc142653 (patch)
tree884153c378b78f6f0619855123ac652873b2fa9d /src
parentc417ae8cd562fb538cc3011a38ff1d9f2268748c (diff)
downloadtalos-hostboot-6750245027d53c6ba0b671f522e26971dc142653.tar.gz
talos-hostboot-6750245027d53c6ba0b671f522e26971dc142653.zip
Add multi-node support to _deconfigureAssocProc
Change-Id: I6344e2737ed20af55516c159a459e2e91929fb8b RTC:86185 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/11130 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/hwas/common/deconfigGard.H9
-rw-r--r--src/include/usr/targeting/common/utilFilter.H14
-rw-r--r--src/usr/hwas/common/deconfigGard.C70
-rw-r--r--src/usr/hwas/test/hwasGardTest.H96
-rwxr-xr-xsrc/usr/targeting/common/genHwsvMrwXml.pl5
-rw-r--r--src/usr/targeting/common/utilFilter.C38
-rw-r--r--src/usr/targeting/common/xmltohb/attribute_types.xml23
-rw-r--r--src/usr/targeting/common/xmltohb/target_types.xml1
8 files changed, 220 insertions, 36 deletions
diff --git a/src/include/usr/hwas/common/deconfigGard.H b/src/include/usr/hwas/common/deconfigGard.H
index 430db5e18..8d76a1799 100644
--- a/src/include/usr/hwas/common/deconfigGard.H
+++ b/src/include/usr/hwas/common/deconfigGard.H
@@ -352,6 +352,7 @@ public:
errlHndl_t platGetGardRecords(const TARGETING::Target * const i_pTarget,
GardRecords_t & o_records);
+
protected:
/**
@@ -462,10 +463,16 @@ private:
* through the returned vector and deconfigures any proc marked
* for deconfiguration.
*
+ * @param[in] i_node restrict processing - only apply algorithm
+ * to targets that match the predicate
+ * @param[in] i_doAbusDeconfig indicates if abus logic should be considered
+ *
* @return errlHndl_t. Error log handle.
*
*/
- errlHndl_t _invokeDeconfigureAssocProc();
+ errlHndl_t _invokeDeconfigureAssocProc(
+ const TARGETING::ConstTargetHandle_t i_node = NULL,
+ bool i_doAbusDeconfig = true);
/**
* @brief _deconfigureAssocProc deconfigures procs based on
diff --git a/src/include/usr/targeting/common/utilFilter.H b/src/include/usr/targeting/common/utilFilter.H
index f00364f24..44f5fd95a 100644
--- a/src/include/usr/targeting/common/utilFilter.H
+++ b/src/include/usr/targeting/common/utilFilter.H
@@ -92,6 +92,19 @@ void getChipResources(TARGETING::TargetHandleList & o_vector,
TYPE i_type, ResourceState i_state );
/**
+ * @brief Populate the o_vector with target enc pointers based on the
+ * requested type, and functional state.
+ *
+ * @parm[out] o_vector, reference of vector of target pointers.
+ * @parm[in] i_type, the type of the chip targets to be obtained
+ * @parm[in] i_state, Selection filter based on ResourceState enum
+ *
+ * @return N/A
+ */
+void getEncResources(TARGETING::TargetHandleList & o_vector,
+ TYPE i_type, ResourceState i_state );
+
+/**
* @brief Populate the o_vector with target chiplet pointers based on the
* requested type, and functional state.
*
@@ -145,6 +158,7 @@ void getAllChiplets(TARGETING::TargetHandleList & o_vector,
void getChildChiplets(TARGETING::TargetHandleList & o_vector,
const Target * i_chip, TYPE i_type, bool i_functional = true );
+
/**
* @brief Populate the o_vector with target object pointers which are
* affinity children of the input target and filters based on a
diff --git a/src/usr/hwas/common/deconfigGard.C b/src/usr/hwas/common/deconfigGard.C
index d6291810b..b4be51353 100644
--- a/src/usr/hwas/common/deconfigGard.C
+++ b/src/usr/hwas/common/deconfigGard.C
@@ -329,13 +329,31 @@ errlHndl_t DeconfigGard::deconfigureTargetsFromGardRecordsForIpl(
break;
}
- // Deconfigure procs based on fabric bus deconfigs and perform SMP
- // node balancing
- l_pErr = _invokeDeconfigureAssocProc();
- if (l_pErr)
+ if (iv_XABusEndpointDeconfigured)
{
- HWAS_ERR("Error from _invokeDeconfigureAssocProc");
- break;
+ // Check if Abus decofigures should be considered in algorithm
+ bool l_doAbusDeconfig = pSys->getAttr<ATTR_DO_ABUS_DECONFIG>();
+ // Get all present nodes
+ TargetHandleList l_presNodes;
+ getEncResources(l_presNodes, TYPE_NODE, UTIL_FILTER_PRESENT);
+
+ for (TargetHandleList::const_iterator
+ l_nodesIter = l_presNodes.begin();
+ l_nodesIter != l_presNodes.end();
+ ++l_nodesIter)
+ {
+ l_pErr = _invokeDeconfigureAssocProc(*l_nodesIter,
+ l_doAbusDeconfig);
+ if (l_pErr)
+ {
+ HWAS_ERR("Error from _invokeDeconfigureAssocProc");
+ break;
+ }
+ // Set for deconfigure algorithm to run on every node even if
+ // no buses deconfigured (needed for multi-node systems)
+ setXABusEndpointDeconfigured(true);
+ }
+ setXABusEndpointDeconfigured(false);
}
}
while (0);
@@ -703,11 +721,14 @@ errlHndl_t DeconfigGard::deconfigureAssocProc()
}
//******************************************************************************
-errlHndl_t DeconfigGard::_invokeDeconfigureAssocProc()
+errlHndl_t DeconfigGard::_invokeDeconfigureAssocProc(
+ const TARGETING::ConstTargetHandle_t i_node,
+ bool i_doAbusDeconfig)
{
HWAS_INF("Preparing data for _deconfigureAssocProc ");
// Return error
errlHndl_t l_pErr = NULL;
+
// Define vector of ProcInfo structs to be used by
// _deconfigAssocProc algorithm. Declared here so
// "delete" can be used outside of do {...} while(0)
@@ -730,16 +751,28 @@ errlHndl_t DeconfigGard::_invokeDeconfigureAssocProc()
// Clear flag as this function is called multiple times
iv_XABusEndpointDeconfigured = false;
+ // Get top 'starting' level target - use top level target if no
+ // i_node given (hostboot)
+ Target *pTop;
+ if (i_node == NULL)
+ {
+ HWAS_INF("_invokeDeconfigureAssocProc: i_node not specified");
+ targetService().getTopLevelTarget(pTop);
+ HWAS_ASSERT(pTop, "_invokeDeconfigureAssocProc: no TopLevelTarget");
+ }
+ else
+ {
+ HWAS_INF("_invokeDeconfigureAssocProc: i_node 0x%X specified",
+ i_node->getAttr<ATTR_HUID>());
+ pTop = const_cast<Target *>(i_node);
+ }
+
// Define and populate vector of procs
// Define predicate
PredicateCTM predProc(CLASS_CHIP, TYPE_PROC);
PredicateHwas predPres;
predPres.present(true);
- // Get top level target
- Target * l_pSys;
- targetService().getTopLevelTarget(l_pSys);
-
// Find master proc
Target* l_pMasterProcTarget;
targetService().
@@ -749,7 +782,7 @@ errlHndl_t DeconfigGard::_invokeDeconfigureAssocProc()
// Populate vector
TargetHandleList l_procs;
targetService().getAssociated(l_procs,
- l_pSys,
+ pTop,
TargetService::CHILD,
TargetService::ALL,
&predProc);
@@ -768,8 +801,10 @@ errlHndl_t DeconfigGard::_invokeDeconfigureAssocProc()
PredicatePostfixExpr busses;
busses.push(&predAbus).push(&predPres).And().push(&predXbus).Or();
- // Iterate through procs and populate l_procInfo
- // vector with system information regarding procs
+ // Iterate through procs and populate l_procInfo vector with system
+ // information regarding procs to be used by _deconfigAssocProc
+ // algorithm.
+ ProcInfoVector l_procInfo;
for (TargetHandleList::const_iterator
l_procsIter = l_procs.begin();
l_procsIter != l_procs.end();
@@ -873,8 +908,9 @@ errlHndl_t DeconfigGard::_invokeDeconfigureAssocProc()
!(isFunctional(*l_busIter));
xBusIndex++;
}
- else if (TYPE_ABUS == (*l_busIter)->
- getAttr<ATTR_TYPE>())
+ // If subsystem owns abus deconfigs consider them
+ else if (i_doAbusDeconfig &&
+ TYPE_ABUS == (*l_busIter)->getAttr<ATTR_TYPE>())
{
(*l_procInfoIter).iv_pAProcs[aBusIndex] =
&(*l_matchProcInfoIter);
@@ -888,6 +924,7 @@ errlHndl_t DeconfigGard::_invokeDeconfigureAssocProc()
}
}
}
+
// call _deconfigureAssocProc() to run deconfig algorithm
// based on current state of system obtained above
l_pErr = _deconfigureAssocProc(l_procInfo);
@@ -896,6 +933,7 @@ errlHndl_t DeconfigGard::_invokeDeconfigureAssocProc()
HWAS_ERR("Error from _deconfigureAssocProc ");
break;
}
+
// Iterate through l_procInfo and deconfigure any procs
// which _deconfigureAssocProc marked for deconfiguration
for (ProcInfoVector::const_iterator
diff --git a/src/usr/hwas/test/hwasGardTest.H b/src/usr/hwas/test/hwasGardTest.H
index 72388c872..2446c92c7 100644
--- a/src/usr/hwas/test/hwasGardTest.H
+++ b/src/usr/hwas/test/hwasGardTest.H
@@ -2857,6 +2857,102 @@ public:
}
/**
+ * @brief Test Deconfigure Associated Proc9
+ */
+ void testDeconfigureAssocProc9()
+ {
+ TS_TRACE(INFO_MRK "testDeconfigureAssocProc9: Started");
+
+ // This test populates structs which contain information
+ // regarding a processor and its child chiplet's linkage
+ // and states. A vector of these structs, effectively
+ // describing the system, is passed to the
+ // _deconfigureAssocProc algorithm which marks procs to
+ // be deconfigured based on existing bus deconfigurations.
+
+ // SCENARIO 1: TULETA 4 System with Proc 3 NP which is indicated by
+ // No Abus endpoints on Proc 1 and 3 and no Xbus endpoint on Proc1
+
+ // Return error for _deconfigureAssocProc
+ errlHndl_t l_pErr = NULL;
+
+ // User-defined number of procs
+ size_t NUM_PROCS = 4;
+
+ // Define and populate vector
+ DeconfigGard::ProcInfoVector l_tuletaProcs;
+ DeconfigGard::ProcInfo l_ProcInfo = DeconfigGard::ProcInfo();
+ l_tuletaProcs.insert(l_tuletaProcs.begin(), NUM_PROCS, l_ProcInfo);
+
+ // Set proc options
+ // Proc0:
+ l_tuletaProcs[0].iv_pThisProc = NULL; // Target *
+ l_tuletaProcs[0].procHUID = 0; // HUID
+ l_tuletaProcs[0].procFabricNode = 0; // FABRIC_NODE_ID
+ l_tuletaProcs[0].procFabricChip = 0; // FABRIC_CHIP_ID
+ l_tuletaProcs[0].iv_isMaster = true; // Master proc
+ l_tuletaProcs[0].iv_deconfigured = false; // HWAS state
+ // ABus links and states
+ l_tuletaProcs[0].iv_pAProcs[0] = &l_tuletaProcs[2];
+ l_tuletaProcs[0].iv_pAProcs[1] = &l_tuletaProcs[2];
+ // XBus links and states
+ l_tuletaProcs[0].iv_pXProcs[0] = &l_tuletaProcs[1];
+
+ // Proc1:
+ l_tuletaProcs[1].iv_pThisProc = NULL; // Target *
+ l_tuletaProcs[1].procHUID = 1; // HUID
+ l_tuletaProcs[1].procFabricNode = 0; // FABRIC_NODE_ID
+ l_tuletaProcs[1].procFabricChip = 1; // FABRIC_CHIP_ID
+ l_tuletaProcs[1].iv_isMaster = false; // Not master proc
+ l_tuletaProcs[1].iv_deconfigured = false; // HWAS state
+ // XBus links and states
+ l_tuletaProcs[1].iv_pXProcs[0] = &l_tuletaProcs[0];
+
+ // Proc2:
+ l_tuletaProcs[2].iv_pThisProc = NULL; // Target *
+ l_tuletaProcs[2].procHUID = 2; // HUID
+ l_tuletaProcs[2].procFabricNode = 1; // FABRIC_NODE_ID
+ l_tuletaProcs[2].procFabricChip = 0; // FABRIC_CHIP_ID
+ l_tuletaProcs[2].iv_isMaster = false; // Not master proc
+ l_tuletaProcs[2].iv_deconfigured = false; // HWAS state
+ // ABus links and states
+ l_tuletaProcs[2].iv_pAProcs[0] = &l_tuletaProcs[0];
+ l_tuletaProcs[2].iv_pAProcs[1] = &l_tuletaProcs[0];
+ // No xbus because proc3 is "not present"
+
+ // Proc3:
+ l_tuletaProcs[3].iv_pThisProc = NULL; // Target *
+ l_tuletaProcs[3].procHUID = 3; // HUID
+ l_tuletaProcs[3].procFabricNode = 1; // FABRIC_NODE_ID
+ l_tuletaProcs[3].procFabricChip = 1; // FABRIC_CHIP_ID
+ l_tuletaProcs[3].iv_isMaster = false; // Not master proc
+ l_tuletaProcs[3].iv_deconfigured = true; // HWAS state
+ // Xbus links still has xbus to proc 2 because proc 2 is functional
+ l_tuletaProcs[3].iv_pXProcs[0] = &l_tuletaProcs[2];
+
+ // Call _deconfigureAssocProc to determine which procs
+ // should be deconfigured based on state of system passed in
+ l_pErr = DeconfigGard::_deconfigureAssocProc(l_tuletaProcs);
+ if (l_pErr)
+ {
+ HWAS_ERR("Error from _deconfigureAssocProc ");
+ }
+
+ // Check result
+ if (l_tuletaProcs[0].iv_deconfigured == false &&
+ l_tuletaProcs[1].iv_deconfigured == false &&
+ l_tuletaProcs[2].iv_deconfigured == true &&
+ l_tuletaProcs[3].iv_deconfigured == true)
+ {
+ TS_TRACE(INFO_MRK "testDeconfigureAssocProc9: Success");
+ }
+ else
+ {
+ TS_FAIL("testDeconfigureAssocProc9: incorrect configuration returned");
+ }
+ }
+
+ /**
* @brief Test Deconfig Present Association 1
*/
void testdeconfigPresentByAssoc1()
diff --git a/src/usr/targeting/common/genHwsvMrwXml.pl b/src/usr/targeting/common/genHwsvMrwXml.pl
index 62b679e07..de5e02964 100755
--- a/src/usr/targeting/common/genHwsvMrwXml.pl
+++ b/src/usr/targeting/common/genHwsvMrwXml.pl
@@ -213,6 +213,11 @@ else
push @systemAttr, ["MRW_MBA_CACHELINE_INTERLEAVE_MODE_CONTROL", 0];
}
+if ($MAXNODE > 1 && $sysname !~ m/mfg/)
+{
+ push @systemAttr, ["DO_ABUS_DECONFIG", 0];
+}
+
#------------------------------------------------------------------------------
# Process the pm-settings MRW file
#------------------------------------------------------------------------------
diff --git a/src/usr/targeting/common/utilFilter.C b/src/usr/targeting/common/utilFilter.C
index b6ab6ff3f..e926e2033 100644
--- a/src/usr/targeting/common/utilFilter.C
+++ b/src/usr/targeting/common/utilFilter.C
@@ -58,10 +58,10 @@ namespace TARGETING
*
* @return N/A
*/
-void _getChipOrChipletResources( TARGETING::TargetHandleList & o_vector,
+void _getClassResources( TARGETING::TargetHandleList & o_vector,
CLASS i_class, TYPE i_type, ResourceState i_state )
{
- #define TARG_FN "_getChipOrChipletResources(...)"
+ #define TARG_FN "_getClassResources(...)"
TARG_ENTER();
switch(i_state)
{
@@ -186,17 +186,22 @@ void _getChipOrChipletResources( TARGETING::TargetHandleList & o_vector,
#undef TARG_FN
}
-
void getChipResources( TARGETING::TargetHandleList & o_vector,
- TYPE i_chipType, ResourceState i_state )
+ TYPE i_chipType, ResourceState i_state )
+{
+ _getClassResources(o_vector, CLASS_CHIP, i_chipType, i_state);
+}
+
+void getEncResources( TARGETING::TargetHandleList & o_vector,
+ TYPE i_type, ResourceState i_state )
{
- _getChipOrChipletResources(o_vector, CLASS_CHIP, i_chipType, i_state);
+ _getClassResources(o_vector, CLASS_ENC, i_type, i_state);
}
void getChipletResources( TARGETING::TargetHandleList & o_vector,
- TYPE i_chipletType, ResourceState i_state )
+ TYPE i_chipletType, ResourceState i_state )
{
- _getChipOrChipletResources(o_vector, CLASS_UNIT, i_chipletType, i_state);
+ _getClassResources(o_vector, CLASS_UNIT, i_chipletType, i_state);
}
// Retrofit functions to getChipOrChipletResources
@@ -205,11 +210,12 @@ void getAllChips( TARGETING::TargetHandleList & o_vector,
{
if (i_functional)
{
- _getChipOrChipletResources(o_vector, CLASS_CHIP, i_chipType, UTIL_FILTER_FUNCTIONAL);
+ _getClassResources(o_vector, CLASS_CHIP, i_chipType,
+ UTIL_FILTER_FUNCTIONAL);
}
else
{
- _getChipOrChipletResources(o_vector, CLASS_CHIP, i_chipType, UTIL_FILTER_ALL);
+ _getClassResources(o_vector, CLASS_CHIP, i_chipType, UTIL_FILTER_ALL);
}
}
@@ -220,14 +226,14 @@ void getAllLogicalCards( TARGETING::TargetHandleList & o_vector,
{
if (i_functional)
{
- _getChipOrChipletResources( o_vector,
+ _getClassResources( o_vector,
CLASS_LOGICAL_CARD,
i_cardType,
UTIL_FILTER_FUNCTIONAL );
}
else
{
- _getChipOrChipletResources( o_vector,
+ _getClassResources( o_vector,
CLASS_LOGICAL_CARD,
i_cardType,
UTIL_FILTER_ALL );
@@ -241,14 +247,14 @@ void getAllCards( TARGETING::TargetHandleList & o_vector,
{
if (i_functional)
{
- _getChipOrChipletResources( o_vector,
+ _getClassResources( o_vector,
CLASS_CARD,
i_cardType,
UTIL_FILTER_FUNCTIONAL );
}
else
{
- _getChipOrChipletResources( o_vector,
+ _getClassResources( o_vector,
CLASS_CARD,
i_cardType,
UTIL_FILTER_ALL );
@@ -261,11 +267,13 @@ void getAllChiplets( TARGETING::TargetHandleList & o_vector,
{
if (i_functional)
{
- _getChipOrChipletResources(o_vector, CLASS_UNIT, i_chipletType, UTIL_FILTER_FUNCTIONAL);
+ _getClassResources(o_vector, CLASS_UNIT, i_chipletType,
+ UTIL_FILTER_FUNCTIONAL);
}
else
{
- _getChipOrChipletResources(o_vector, CLASS_UNIT, i_chipletType, UTIL_FILTER_ALL);
+ _getClassResources(o_vector, CLASS_UNIT, i_chipletType,
+ UTIL_FILTER_ALL);
}
}
diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml
index 731b0ee19..a1dc450a7 100644
--- a/src/usr/targeting/common/xmltohb/attribute_types.xml
+++ b/src/usr/targeting/common/xmltohb/attribute_types.xml
@@ -978,9 +978,9 @@
<value>0x00000006</value>
</enumerator>
<enumerator>
- <name>HOSTSVC_HBEL</name>
- <value>0x00000008</value>
- </enumerator>
+ <name>HOSTSVC_HBEL</name>
+ <value>0x00000008</value>
+ </enumerator>
</enumerationType>
<!-- For POD Testing -->
@@ -13355,7 +13355,7 @@ firmware notes: Platforms should initialize this attribute to AUTO (0)</descript
<macro>DIRECT</macro>
</hwpfToHbAttrMap>
</attribute>
-
+
<attribute>
<id>HB_RSV_MEM_SIZE_MB</id>
<description>
@@ -13399,4 +13399,19 @@ firmware notes: Platforms should initialize this attribute to AUTO (0)</descript
</hwpfToHbAttrMap>
</attribute>
+<attribute>
+ <id>DO_ABUS_DECONFIG</id>
+ <description>
+ Indicates if system should consider abus logic when deconfiguring in
+ _deconfigureAssocProc(), will be overwritten on multi-node system
+ </description>
+ <simpleType>
+ <uint8_t>
+ <default>1</default>
+ </uint8_t>
+ </simpleType>
+ <persistency>non-volatile</persistency>
+ <readable/>
+</attribute>
+
</attributes>
diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml
index 37327b6ac..6b987a462 100644
--- a/src/usr/targeting/common/xmltohb/target_types.xml
+++ b/src/usr/targeting/common/xmltohb/target_types.xml
@@ -243,6 +243,7 @@
<attribute><id>MRW_CDIMM_SPARE_I2C_TEMP_SENSOR_ENABLE</id></attribute>
<attribute><id>HB_RSV_MEM_SIZE_MB</id></attribute>
<attribute><id>PM_HWP_ATTR_VERSION</id></attribute>
+ <attribute><id>DO_ABUS_DECONFIG</id></attribute>
</targetType>
<targetType>
OpenPOWER on IntegriCloud