summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndres Lugo-Reyes <aalugore@us.ibm.com>2017-09-22 15:05:57 -0500
committerAndres A. Lugo-Reyes <aalugore@us.ibm.com>2017-09-22 16:16:35 -0400
commit60c09cdbcca5f5b324748b0867fe6df0495439de (patch)
tree55af75347c27720b488d09a9d9a6fd4b7dcd6e55
parentc69c01f1b7a296bc93fe533e02e33a3631323613 (diff)
downloadtalos-occ-60c09cdbcca5f5b324748b0867fe6df0495439de.tar.gz
talos-occ-60c09cdbcca5f5b324748b0867fe6df0495439de.zip
Prevent errors when system config currently does not support WOF
Change-Id: I2b1c30ba32eb6f4b91869efbe69540ae6abe402c Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46643 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: Andres A. Lugo-Reyes <aalugore@us.ibm.com>
-rw-r--r--src/occ_405/wof/wof.c50
-rw-r--r--src/occ_405/wof/wof.h6
2 files changed, 35 insertions, 21 deletions
diff --git a/src/occ_405/wof/wof.c b/src/occ_405/wof/wof.c
index f737cdf..b5e5c71 100644
--- a/src/occ_405/wof/wof.c
+++ b/src/occ_405/wof/wof.c
@@ -1389,28 +1389,36 @@ void set_clear_wof_disabled( uint8_t i_action,
// Check for error
if( l_logError )
{
- // Create error log
- /** @errortype
- * @moduleid SET_CLEAR_WOF_DISABLED
- * @reasoncode WOF_DISABLED_RC
- * @userdata1 current wof_disabled
- * @userdata2 Bit requested to be set
- * @userdata4 OCC_NO_EXTENDED_RC
- * @devdesc WOF has been disabled due to an error
- */
- l_errl = createErrl(
- SET_CLEAR_WOF_DISABLED,
- WOF_DISABLED_RC,
- OCC_NO_EXTENDED_RC,
- ERRL_SEV_UNRECOVERABLE,
- NULL,
- DEFAULT_TRACE_SIZE,
- g_wof->wof_disabled,
- i_bit_mask );
+ if( g_wof->wof_disabled & SUPPRESS_ERROR_RC )
+ {
+ INTR_TRAC_ERR("Encountered an error, but WOF is off. RC: 0x%08x",
+ i_bit_mask);
+ }
+ else
+ {
+ // Create error log
+ /** @errortype
+ * @moduleid SET_CLEAR_WOF_DISABLED
+ * @reasoncode WOF_DISABLED_RC
+ * @userdata1 current wof_disabled
+ * @userdata2 Bit requested to be set
+ * @userdata4 OCC_NO_EXTENDED_RC
+ * @devdesc WOF has been disabled due to an error
+ */
+ l_errl = createErrl(
+ SET_CLEAR_WOF_DISABLED,
+ WOF_DISABLED_RC,
+ OCC_NO_EXTENDED_RC,
+ ERRL_SEV_UNRECOVERABLE,
+ NULL,
+ DEFAULT_TRACE_SIZE,
+ g_wof->wof_disabled,
+ i_bit_mask );
- // commit the error log
- commitErrl( &l_errl );
- L_errorLogged = true;
+ // commit the error log
+ commitErrl( &l_errl );
+ L_errorLogged = true;
+ }
}
}
diff --git a/src/occ_405/wof/wof.h b/src/occ_405/wof/wof.h
index 43d0b53..c97efad 100644
--- a/src/occ_405/wof/wof.h
+++ b/src/occ_405/wof/wof.h
@@ -74,11 +74,17 @@
//***************************************************************************
#define PSTATE_TBL_ADDR 0xFFF2B85C
+
// Reason codes which should NOT create an error log should be added here
#define ERRL_RETURN_CODES ~(WOF_RC_MODE_CHANGE | \
WOF_RC_STATE_CHANGE | \
WOF_RC_MODE_NO_SUPPORT_MASK)
+// Reason codes that if set, should suppress all other unrecoverable errors.
+#define SUPPRESS_ERROR_RC ~(ERRL_RETURN_CODES)
+
+
+
// Enumeration to define the WOF initialization steps
enum wof_init_states
{
OpenPOWER on IntegriCloud