summaryrefslogtreecommitdiffstats
path: root/src/usr/hwas/common/deconfigGard.C
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/hwas/common/deconfigGard.C')
-rw-r--r--src/usr/hwas/common/deconfigGard.C68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/usr/hwas/common/deconfigGard.C b/src/usr/hwas/common/deconfigGard.C
index 01e736129..1f237efa0 100644
--- a/src/usr/hwas/common/deconfigGard.C
+++ b/src/usr/hwas/common/deconfigGard.C
@@ -198,6 +198,22 @@ errlHndl_t DeconfigGard::deconfigureTargetsFromGardRecordsForIpl(
HWAS_MUTEX_LOCK(iv_mutex);
do
{
+ TARGETING::Target* pSys;
+ TARGETING::targetService().getTopLevelTarget(pSys);
+ HWAS_ASSERT(pSys,
+ "HWAS _createGardRecord: no system TopLevelTarget found");
+
+ // check for system CDM Policy
+ const TARGETING::ATTR_CDM_POLICIES_type l_sys_policy =
+ pSys->getAttr<TARGETING::ATTR_CDM_POLICIES>();
+ if (l_sys_policy & TARGETING::CDM_POLICIES_MANUFACTURING_DISABLED)
+ {
+ // manufacturing records are disabled
+ // - don't process
+ HWAS_INF("Manufacturing policy: disabled - skipping GARD Records");
+ break;
+ }
+
// Get all GARD Records
l_pErr = _getGardRecords(GET_ALL_GARD_RECORDS, l_gardRecords);
if (l_pErr)
@@ -218,6 +234,24 @@ errlHndl_t DeconfigGard::deconfigureTargetsFromGardRecordsForIpl(
l_itr != l_gardRecords.end();
++l_itr)
{
+ if ((l_sys_policy & TARGETING::CDM_POLICIES_PREDICTIVE_DISABLED) &&
+ ((*l_itr).iv_errorType == GARD_Predictive))
+ {
+ // predictive records are disabled AND gard record is predictive
+ // - don't process
+ HWAS_INF("Predictive policy: disabled - skipping GARD Record");
+ continue;
+ }
+
+ if ((l_sys_policy & TARGETING::CDM_POLICIES_FUNCTIONAL_DISABLED) &&
+ ((*l_itr).iv_errorType == GARD_Func))
+ {
+ // functional records are disabled AND gard record is Functional
+ // - don't process
+ HWAS_INF("Functional policy: disabled - skipping GARD Record");
+ continue;
+ }
+
// Find the associated Target
TARGETING::Target * l_pTarget =
TARGETING::targetService().toTarget((*l_itr).iv_targetId);
@@ -679,6 +713,40 @@ errlHndl_t DeconfigGard::_createGardRecord(const TARGETING::Target & i_target,
break;
}
+ TARGETING::Target* pSys;
+ TARGETING::targetService().getTopLevelTarget(pSys);
+ HWAS_ASSERT(pSys,
+ "HWAS _createGardRecord: no system TopLevelTarget found");
+
+ // check for system CDM Policy
+ const TARGETING::ATTR_CDM_POLICIES_type l_sys_policy =
+ pSys->getAttr<TARGETING::ATTR_CDM_POLICIES>();
+ if (l_sys_policy & TARGETING::CDM_POLICIES_MANUFACTURING_DISABLED)
+ {
+ // manufacturing records are disabled
+ // - don't process
+ HWAS_INF("Manufacturing policy: disabled - skipping GARD Record");
+ break;
+ }
+
+ if ((l_sys_policy & TARGETING::CDM_POLICIES_PREDICTIVE_DISABLED) &&
+ (i_errorType == GARD_Predictive))
+ {
+ // predictive records are disabled AND gard record is predictive
+ // - don't process
+ HWAS_INF("Predictive policy: disabled - skipping GARD Record");
+ break;
+ }
+
+ if ((l_sys_policy & TARGETING::CDM_POLICIES_FUNCTIONAL_DISABLED) &&
+ (i_errorType == GARD_Func))
+ {
+ // functional records are disabled AND gard record is Functional
+ // - don't process
+ HWAS_INF("Functional policy: disabled - skipping GARD Record");
+ break;
+ }
+
GardAddress l_GardAddress(l_pErr);
if (l_pErr)
{
OpenPOWER on IntegriCloud