diff options
author | Brian Horton <brianh@linux.ibm.com> | 2013-06-14 12:08:56 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-07-02 10:44:34 -0500 |
commit | 872b09dc527e6e75e4d08e819e74e28157b1283a (patch) | |
tree | 71cf7354fc561b6aab1155d632de812f9b936599 /src/usr/hwas/common/deconfigGard.C | |
parent | 617a9c843538beea63962903b7ca82e106bee660 (diff) | |
download | talos-hostboot-872b09dc527e6e75e4d08e819e74e28157b1283a.tar.gz talos-hostboot-872b09dc527e6e75e4d08e819e74e28157b1283a.zip |
CDM policy flags
doGard and createGardRecord will check for system-wide CDM
policy, as well as policy in the GARD record and callout.
Change-Id: I2abf572e5ed289ed8ac28edee022b23acca50274
RTC: 64693
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5034
Tested-by: Jenkins Server
Reviewed-by: MIKE J. JONES <mjjones@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/hwas/common/deconfigGard.C')
-rw-r--r-- | src/usr/hwas/common/deconfigGard.C | 68 |
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) { |