summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorBrian Horton <brianh@linux.ibm.com>2013-07-22 13:41:00 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-08-08 11:10:25 -0500
commit7555b953439d721e5da279f973792fb2c8f651e5 (patch)
tree8cae1a133363ee40008513478507d5ce7be598fe /src/usr
parentcd39b046fd75aec3b2e357f086a7da679c383353 (diff)
downloadtalos-hostboot-7555b953439d721e5da279f973792fb2c8f651e5.tar.gz
talos-hostboot-7555b953439d721e5da279f973792fb2c8f651e5.zip
add DECONFIGURE_BY_ enums for deconfigured targets
when targets are deconfigured NOT due to an errorlog (ie, FCO, memory config, manual gard) the target HwasState attribute will have a deconfiguredByPlid set to one of these enums. Change-Id: I544075defebd98b52391b6d4e241452acc6f7a48 RTC: 37737 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5512 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: SHELDON R. BAILEY <baileysh@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/hwas/common/deconfigGard.C25
-rw-r--r--src/usr/hwas/common/hwas.C13
-rw-r--r--src/usr/hwas/test/hwasGardTest.H2
-rw-r--r--src/usr/hwpf/hwp/dmi_training/dmi_training.C11
-rw-r--r--src/usr/targeting/common/xmltohb/attribute_types.xml6
5 files changed, 39 insertions, 18 deletions
diff --git a/src/usr/hwas/common/deconfigGard.C b/src/usr/hwas/common/deconfigGard.C
index 6d194e2d7..a2c53458a 100644
--- a/src/usr/hwas/common/deconfigGard.C
+++ b/src/usr/hwas/common/deconfigGard.C
@@ -255,8 +255,10 @@ errlHndl_t DeconfigGard::deconfigureTargetsFromGardRecordsForIpl(
l_itr != l_gardRecords.end();
++l_itr)
{
+ GardRecord l_gardRecord = *l_itr;
+
if ((l_sys_policy & TARGETING::CDM_POLICIES_PREDICTIVE_DISABLED) &&
- ((*l_itr).iv_errorType == GARD_Predictive))
+ (l_gardRecord.iv_errorType == GARD_Predictive))
{
// predictive records are disabled AND gard record is predictive
// - don't process
@@ -265,7 +267,7 @@ errlHndl_t DeconfigGard::deconfigureTargetsFromGardRecordsForIpl(
}
if ((l_sys_policy & TARGETING::CDM_POLICIES_FUNCTIONAL_DISABLED) &&
- ((*l_itr).iv_errorType == GARD_Func))
+ (l_gardRecord.iv_errorType == GARD_Func))
{
// functional records are disabled AND gard record is Functional
// - don't process
@@ -275,14 +277,14 @@ errlHndl_t DeconfigGard::deconfigureTargetsFromGardRecordsForIpl(
// Find the associated Target
TARGETING::Target * l_pTarget =
- TARGETING::targetService().toTarget((*l_itr).iv_targetId);
+ TARGETING::targetService().toTarget(l_gardRecord.iv_targetId);
if (l_pTarget == NULL)
{
// could be a platform specific target for the other
// ie, we are hostboot and this is an FSP target, or vice-versa
DG_INF_TARGET("Could not find Target for",
- &((*l_itr).iv_targetId));
+ &(l_gardRecord.iv_targetId));
continue;
}
@@ -302,13 +304,18 @@ errlHndl_t DeconfigGard::deconfigureTargetsFromGardRecordsForIpl(
continue;
}
+ // special case - use errlogPlid UNLESS it's a Manual Gard
+ const uint32_t l_errlogPlid =
+ (l_gardRecord.iv_errorType == GARD_User_Manual) ?
+ DECONFIGURED_BY_MANUAL_GARD : l_gardRecord.iv_errlogPlid;
+
// Deconfigure the Target
// don't need to check ATTR_DECONFIG_GARDABLE -- if we get
// here, it's because of a gard record on this target
- _deconfigureTarget(*l_pTarget, (*l_itr).iv_errlogPlid);
+ _deconfigureTarget(*l_pTarget, l_errlogPlid);
// Deconfigure other Targets by association
- _deconfigureByAssoc(*l_pTarget, (*l_itr).iv_errlogPlid);
+ _deconfigureByAssoc(*l_pTarget, l_errlogPlid);
} // for
// check and see if we still have enough hardware to continue
@@ -425,10 +432,12 @@ errlHndl_t DeconfigGard::processFieldCoreOverride()
} // for pProc_it
// restrict the EX units; units turned off are marked
- // present=true, functional=false
+ // present=true, functional=false, and marked with the
+ // appropriate deconfigure code.
HWAS_INF("FCO: calling restrictEXunits with %d entries",
l_procRestrictList.size());
- l_pErr = restrictEXunits(l_procRestrictList, true);
+ l_pErr = restrictEXunits(l_procRestrictList,
+ true, DECONFIGURED_BY_FIELD_CORE_OVERRIDE);
if (l_pErr)
{
break;
diff --git a/src/usr/hwas/common/hwas.C b/src/usr/hwas/common/hwas.C
index fda7d9326..7cd53f9e9 100644
--- a/src/usr/hwas/common/hwas.C
+++ b/src/usr/hwas/common/hwas.C
@@ -42,6 +42,7 @@
#include <hwas/common/hwasCommon.H>
#include <hwas/common/hwasError.H>
+#include <hwas/common/deconfigGard.H>
#include <hwas/common/hwas_reasoncodes.H>
#include <targeting/common/utilFilter.H>
@@ -425,7 +426,9 @@ errlHndl_t discoverTargets()
// PR keyword processing - potentially reduce the number of ex/core
// units that are functional based on what's in the PR keyword.
// call to restrict EX units, marking bad units as present=false;
- errl = restrictEXunits(l_procPRList, false);
+ // deconfigReason = 0 because present is false so this is not a
+ // deconfigured event.
+ errl = restrictEXunits(l_procPRList, false, 0);
if (errl)
{
@@ -457,7 +460,8 @@ errlHndl_t discoverTargets()
errlHndl_t restrictEXunits(
std::vector <procRestrict_t> &i_procList,
- bool i_present)
+ const bool i_present,
+ const uint32_t i_deconfigReason)
{
HWAS_INF("restrictEXunits entry, %d elements", i_procList.size());
errlHndl_t errl = NULL;
@@ -592,7 +596,7 @@ errlHndl_t restrictEXunits(
while (pEX_it[i] != pEXList[i].end())
{
TargetHandle_t l_pEX = *(pEX_it[i]);
- enableHwasState(l_pEX, i_present, false, 0);
+ enableHwasState(l_pEX, i_present, false, i_deconfigReason);
HWAS_INF("pEX %.8X - marked %spresent, NOT functional",
l_pEX->getAttr<ATTR_HUID>(),
i_present ? "" : "NOT ");
@@ -600,7 +604,8 @@ errlHndl_t restrictEXunits(
// now need to mark the child CORE
TargetHandleList pCoreList;
getChildChiplets(pCoreList, l_pEX, TYPE_CORE, true);
- enableHwasState(pCoreList[0], i_present, false, 0);
+ enableHwasState(pCoreList[0], i_present, false,
+ i_deconfigReason);
HWAS_INF("pCore %.8X - marked %spresent, NOT functional",
l_pEX->getAttr<ATTR_HUID>(),
i_present ? "" : "NOT ");
diff --git a/src/usr/hwas/test/hwasGardTest.H b/src/usr/hwas/test/hwasGardTest.H
index 74162c6ad..f69ed19f3 100644
--- a/src/usr/hwas/test/hwasGardTest.H
+++ b/src/usr/hwas/test/hwasGardTest.H
@@ -1146,7 +1146,7 @@ public:
// create GARD record, call 'doGard' step and confirm target is
// deconfigured
l_pErr = theDeconfigGard().
- createGardRecord( *l_target, 0x12, GARD_Fatal);
+ createGardRecord( *l_target, 0x12, GARD_User_Manual);
if (l_pErr)
{
TS_FAIL("testGard8: Error from createGardRecord");
diff --git a/src/usr/hwpf/hwp/dmi_training/dmi_training.C b/src/usr/hwpf/hwp/dmi_training/dmi_training.C
index 44544384d..ca28d305d 100644
--- a/src/usr/hwpf/hwp/dmi_training/dmi_training.C
+++ b/src/usr/hwpf/hwp/dmi_training/dmi_training.C
@@ -201,7 +201,8 @@ void* call_mss_getecid( void *io_pArgs )
{
// call HWAS to deconfigure this target
l_err = HWAS::theDeconfigGard().deconfigureTarget(
- *l_pMBA, 0);
+ *l_pMBA, HWAS::DeconfigGard::
+ DECONFIGURED_BY_MEMORY_CONFIG);
l_num_func_mbas--;
if (l_err)
@@ -221,7 +222,9 @@ void* call_mss_getecid( void *io_pArgs )
{
// call HWAS to deconfigure this target
l_err = HWAS::theDeconfigGard().deconfigureTarget(
- *l_pCentaur, 0);
+ *l_pCentaur,
+ HWAS::DeconfigGard::
+ DECONFIGURED_BY_MEMORY_CONFIG);
}
if (l_err)
@@ -320,7 +323,9 @@ void* call_mss_getecid( void *io_pArgs )
get_huid( *l_l4_iter));
l_err = HWAS::theDeconfigGard().
- deconfigureTarget(**l_l4_iter , 0);
+ deconfigureTarget(**l_l4_iter ,
+ HWAS::DeconfigGard::
+ DECONFIGURED_BY_MEMORY_CONFIG);
if (l_err)
{
diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml
index fb06a80e4..5ecc7ecf5 100644
--- a/src/usr/targeting/common/xmltohb/attribute_types.xml
+++ b/src/usr/targeting/common/xmltohb/attribute_types.xml
@@ -798,8 +798,10 @@
<field>
<name>deconfiguredByPlid</name>
<description>if this target was deconfigured,
- this will be the errlog PLID that caused it,
- either by direct DECONFIG or _BY_ASSOCIATION.</description>
+ this will be a special DECONFIGURED_BY_ enum,
+ OR it will be the errlog PLID that caused it,
+ either directly or by association,
+ </description>
<type>uint32_t</type>
<default>0</default>
</field>
OpenPOWER on IntegriCloud