diff options
Diffstat (limited to 'src/include/usr')
-rw-r--r-- | src/include/usr/hwas/common/deconfigGard.H | 37 | ||||
-rw-r--r-- | src/include/usr/hwas/common/hwas.H | 7 | ||||
-rw-r--r-- | src/include/usr/hwas/common/hwasCommon.H | 6 | ||||
-rw-r--r-- | src/include/usr/hwas/common/hwas_reasoncodes.H | 4 | ||||
-rw-r--r-- | src/include/usr/targeting/common/predicates/predicatehwas.H | 23 |
5 files changed, 65 insertions, 12 deletions
diff --git a/src/include/usr/hwas/common/deconfigGard.H b/src/include/usr/hwas/common/deconfigGard.H index b9fd4a754..374b6b44f 100644 --- a/src/include/usr/hwas/common/deconfigGard.H +++ b/src/include/usr/hwas/common/deconfigGard.H @@ -88,10 +88,11 @@ public: PREDICTIVE, // not applied due to predictive policy PREDICATE, // not applied due to predicate GARD_NOT_APPLIED, // not applied for other reason + RESOURCE_RECOVERED // Resource recovered }; - // enums to indicate to deconfigureTarget() specific RUNTIME behaviors - enum DeconfigureRuntime + // enums to indicate to deconfigureTarget() specific behaviors + enum DeconfigureFlags { NOT_AT_RUNTIME, // non-runtime behavior - if the system is at // runtime, no deconfigs happen; @@ -99,6 +100,7 @@ public: // runtime behaviors: FULLY_AT_RUNTIME, // - functional=false,dumpfunctional=false DUMP_AT_RUNTIME, // - functional=false,dumpfunctional=true + SPEC_DECONFIG, //speculative deconfig }; // enums to indicate non-error reason for a targets deconfiguration. @@ -146,6 +148,8 @@ public: // set by presentByAssoc() when a DIMM has no MBA DECONFIGURED_BY_NO_PARENT_MBA, // BASE | 0x0D + CONFIGURED_BY_RESOURCE_RECOVERY, // BASE | 0x0E + // mask - these bits mean it's a PLID and not an enum DECONFIGURED_BY_PLID_MASK = 0xFFFF0000, }; @@ -194,6 +198,23 @@ public: ~DeconfigGard(); /** + * @brief Apply gard record for a specific target. + * + * Called by deconfigureTargetsFromGardRecordsForIpl. + * + * @param i_pTarget Target to be garded + * + * @param i_gardRecord gard record to be applied + * + * @param i_deconfigRule Options for deconfigure + * + * @return errlHndl_t. Error log handle. + */ + errlHndl_t applyGardRecord(TARGETING::Target *i_pTarget, + GardRecord &i_gardRecord, + const DeconfigureFlags i_deconfigRule = NOT_AT_RUNTIME); + + /** * @brief Clears GARD Records for replaced Targets. * * Called by HWAS as part of initial IPL steps. @@ -260,14 +281,14 @@ public: * @param[in] i_errlEid Error log EID to store in Deconfigure Record. * @param[out] o_targetDeconfigured - if pointer is valid, bool is set * to true if target was deconfigured; NOT SET OTHERWISE - * @param[in] i_runTimeDeconfigRule Deconfigure Runtime options - + * @param[in] i_deconfigRule Deconfigure options - * default not at runtime * @return errlHndl_t. Error log handle. */ errlHndl_t deconfigureTarget(TARGETING::Target & i_target, const uint32_t i_errlEid, bool *o_targetDeconfigured = NULL, - const DeconfigureRuntime i_runTimeDeconfigRule = + const DeconfigureFlags i_deconfigRule = NOT_AT_RUNTIME); /** @@ -433,12 +454,12 @@ private: * * @param[in] i_target Reference to base Target. * @param[in] i_errlEid Error log EID to store in Deconfigure Record. - * @param[in] i_runTimeDeconfigRule Deconfigure Runtime options - + * @param[in] i_deconfigRule Deconfigure Runtime options - * default not at runtime */ void _deconfigureByAssoc(TARGETING::Target & i_target, const uint32_t i_errlEid, - const DeconfigureRuntime i_runTimeDeconfigRule = + const DeconfigureFlags i_deconfigRule = NOT_AT_RUNTIME); /** @@ -451,13 +472,13 @@ private: * @param[in] i_errlEid Error log EID to store in Deconfigure Record. * @param[out] o_targetDeconfigured - if pointer is valid, bool is set * to true if target was deconfigured; NOT SET OTHERWISE - * @param[in] i_runTimeDeconfigRule Deconfigure Runtime options - + * @param[in] i_deconfigRule Deconfigure Runtime options - * default not at runtime */ void _deconfigureTarget(TARGETING::Target & i_target, const uint32_t i_errlEid, bool *o_targetDeconfigured = NULL, - const DeconfigureRuntime i_runTimeDeconfigRule = + const DeconfigureFlags i_deconfigRule = NOT_AT_RUNTIME); /** diff --git a/src/include/usr/hwas/common/hwas.H b/src/include/usr/hwas/common/hwas.H index 0a1236679..caae04a79 100644 --- a/src/include/usr/hwas/common/hwas.H +++ b/src/include/usr/hwas/common/hwas.H @@ -121,11 +121,16 @@ errlHndl_t restrictEXunits( * running. * * @param[in] i_node node target to restrict hw check + * @param[out] o_bootable Indicate whether the system is + * is bootable with current configuration. + * if o_bootable is not NULL an error for + * system unavailability will not be logged * * @return error log handle */ errlHndl_t checkMinimumHardware( - const TARGETING::ConstTargetHandle_t i_node = NULL); + const TARGETING::ConstTargetHandle_t i_node = NULL, + bool *o_bootable = NULL); /** * @brief Struct representing a particular target. Used by diff --git a/src/include/usr/hwas/common/hwasCommon.H b/src/include/usr/hwas/common/hwasCommon.H index 5a3522bf9..f9ffc9752 100644 --- a/src/include/usr/hwas/common/hwasCommon.H +++ b/src/include/usr/hwas/common/hwasCommon.H @@ -253,9 +253,13 @@ void hwasErrorUpdatePlid(errlHndl_t & io_errl, * * @param[io] io_plid Reference to plid. * @param[in] i_node node target to restrict hw check + * @param[out] o_bootable Indicates whether system is bootable with current + * configuratio, if a non NULL pointer is passed erros will not + * be logged if system cannot ipl and just return a true or false. */ void platCheckMinimumHardware(uint32_t & io_plid, - const TARGETING::ConstTargetHandle_t i_node = NULL); + const TARGETING::ConstTargetHandle_t i_node = NULL, + bool *o_bootable = NULL); } // namespace HWAS diff --git a/src/include/usr/hwas/common/hwas_reasoncodes.H b/src/include/usr/hwas/common/hwas_reasoncodes.H index c7b735fa8..0a8be88ac 100644 --- a/src/include/usr/hwas/common/hwas_reasoncodes.H +++ b/src/include/usr/hwas/common/hwas_reasoncodes.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2015 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -32,6 +32,7 @@ namespace HWAS MOD_DECONFIG_GARD = 0x01, MOD_PROCESS_CALLOUT = 0x02, MOD_CHECK_MIN_HW = 0x03, + MOD_DECONFIG_TARGETS_FROM_GARD = 0x04, }; enum HwasReasonCode @@ -50,6 +51,7 @@ namespace HWAS RC_SYSAVAIL_NO_PROCS_FUNC = HWAS_COMP_ID | 0x07, RC_SYSAVAIL_NO_NODES_FUNC = HWAS_COMP_ID | 0x08, RC_SYSAVAIL_NO_MEMBUFS_FUNC = HWAS_COMP_ID | 0x09, + RC_RESOURCE_RECOVERED = HWAS_COMP_ID | 0x0A, }; }; diff --git a/src/include/usr/targeting/common/predicates/predicatehwas.H b/src/include/usr/targeting/common/predicates/predicatehwas.H index d433c3748..523332646 100644 --- a/src/include/usr/targeting/common/predicates/predicatehwas.H +++ b/src/include/usr/targeting/common/predicates/predicatehwas.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -125,6 +127,15 @@ class PredicateHwas : public PredicateBase */ PredicateHwas& dumpFunctional(const bool i_dumpFunctional); + /** + * @brief Configure predicate to look for the given speculative + * deconfig state + * + * @param[in] i_specdeconfig Desired speculative deconfig state + * + * @return Reference to the predicate, for chaining + */ + PredicateHwas& specdeconfig(const bool i_specdeconfig); /** * @brief Returns whether target matches the desired HWAS state * @@ -229,6 +240,16 @@ inline PredicateHwas& PredicateHwas::dumpFunctional( return *this; } +//****************************************************************************** +// PredicateHwas::specdeconfig +//****************************************************************************** +inline PredicateHwas& PredicateHwas::specdeconfig( + const bool i_specdeconfig) +{ + iv_desired.attribute.specdeconfig = i_specdeconfig; + iv_valid.attribute.specdeconfig = true; + return *this; +} #undef TARG_CLASS #undef TARG_NAMESPACE |