summaryrefslogtreecommitdiffstats
path: root/src/include/usr/hwas
diff options
context:
space:
mode:
authorDhruvaraj S <dhruvaraj@in.ibm.com>2015-02-12 04:23:39 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-03-09 19:13:57 -0500
commit0481b521db49eb5161def9fe10824a07c9b5068b (patch)
tree95f0588b4045a77212e1a855d37d3d48ff1b83fb /src/include/usr/hwas
parent8c22c53bfebf79a9e7548b9e32aad22901af3ca9 (diff)
downloadtalos-hostboot-0481b521db49eb5161def9fe10824a07c9b5068b.tar.gz
talos-hostboot-0481b521db49eb5161def9fe10824a07c9b5068b.zip
62392: HB Common Resource Recovery
HB Common resource recovery will recover any resources which is not garded by a FATAL error and try to use in the system for the current IPL Change-Id: I6ea4114ba19f47f062ec04449c3e0209d85a1faf RTC: 62392 CQ: SW291079 CMVC-Coreq: 948355 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15678 Tested-by: Jenkins Server Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/hwas')
-rw-r--r--src/include/usr/hwas/common/deconfigGard.H37
-rw-r--r--src/include/usr/hwas/common/hwas.H7
-rw-r--r--src/include/usr/hwas/common/hwasCommon.H6
-rw-r--r--src/include/usr/hwas/common/hwas_reasoncodes.H4
4 files changed, 43 insertions, 11 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,
};
};
OpenPOWER on IntegriCloud