summaryrefslogtreecommitdiffstats
path: root/src/occ_405/wof
diff options
context:
space:
mode:
authorAndres Lugo-Reyes <aalugore@us.ibm.com>2018-05-22 13:44:35 -0500
committerAndres A. Lugo-Reyes <aalugore@us.ibm.com>2018-05-31 14:11:24 -0400
commit63a59b2f06ebd4d83c012f97100acfba6b9bd58b (patch)
tree1f065ca9e38823d2bcaf52d745200443089c5880 /src/occ_405/wof
parent074010fb5fd979450397ed01c9fccea1cdd2617b (diff)
downloadtalos-occ-63a59b2f06ebd4d83c012f97100acfba6b9bd58b.tar.gz
talos-occ-63a59b2f06ebd4d83c012f97100acfba6b9bd58b.zip
WOF Reset debug command
Change-Id: I353dadd063b021312ed276ac59221efc9e9738f3 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58730 Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com> Reviewed-by: Andres A. Lugo-Reyes <aalugore@us.ibm.com>
Diffstat (limited to 'src/occ_405/wof')
-rw-r--r--src/occ_405/wof/wof.c21
-rw-r--r--src/occ_405/wof/wof.h4
2 files changed, 20 insertions, 5 deletions
diff --git a/src/occ_405/wof/wof.c b/src/occ_405/wof/wof.c
index 7bdd95d..d565f2a 100644
--- a/src/occ_405/wof/wof.c
+++ b/src/occ_405/wof/wof.c
@@ -1103,10 +1103,10 @@ void calculate_ceff_ratio_vdn( void )
if( g_wof->ceff_tdp_vdn == 0 )
{
INTR_TRAC_ERR("WOF Disabled! Ceff VDN divide by 0");
-
+ print_oppb();
// Return 0
g_wof->ceff_ratio_vdn = 0;
- set_clear_wof_disabled(SET, WOF_RC_DIVIDE_BY_ZERO);
+ set_clear_wof_disabled(SET, WOF_RC_DIVIDE_BY_ZERO_VDN);
}
else
{
@@ -1176,9 +1176,10 @@ void calculate_ceff_ratio_vdd( void )
INTR_TRAC_ERR("v_clip_mv = %d", g_wof->v_clip);
INTR_TRAC_ERR("f_clip_PS = 0x%x", g_wof->f_clip_ps);
+ print_oppb();
// Return 0
g_wof->ceff_ratio_vdd = 0;
- set_clear_wof_disabled(SET, WOF_RC_DIVIDE_BY_ZERO);
+ set_clear_wof_disabled(SET, WOF_RC_DIVIDE_BY_ZERO_VDD);
}
else
{
@@ -1374,6 +1375,17 @@ void set_clear_wof_disabled( uint8_t i_action,
// Set the bit
g_wof->wof_disabled |= i_bit_mask;
+
+ // If user is trying to force a reset even though WOF is disabled,
+ // Skip straight to error log creation
+ if( (g_wof->wof_disabled) &&
+ (i_bit_mask == WOF_RC_RESET_DEBUG_CMD) )
+ {
+ INTR_TRAC_INFO("User Requested WOF reset!");
+ l_logError = true;
+ break;
+ }
+
// If OCC has not yet been enabled through TMGT/HTMGT/OPPB, skip
// error log
if( (g_wof->wof_disabled & WOF_RC_OCC_WOF_DISABLED) ||
@@ -1497,7 +1509,8 @@ void set_clear_wof_disabled( uint8_t i_action,
// Check for error
if( l_logError )
{
- if( g_wof->wof_disabled & (~(ERRL_RETURN_CODES)) )
+ if( (g_wof->wof_disabled & (~(ERRL_RETURN_CODES))) &&
+ (i_bit_mask != WOF_RC_RESET_DEBUG_CMD) )
{
INTR_TRAC_ERR("Encountered an error, but WOF is off. RC: 0x%08x",
i_bit_mask);
diff --git a/src/occ_405/wof/wof.h b/src/occ_405/wof/wof.h
index a8d57a1..fd61dcf 100644
--- a/src/occ_405/wof/wof.h
+++ b/src/occ_405/wof/wof.h
@@ -60,7 +60,7 @@
#define WOF_RC_STATE_CHANGE 0x00000100
#define WOF_RC_MODE_CHANGE 0x00000200
#define WOF_RC_MODE_NO_SUPPORT_MASK 0x00000400
-#define WOF_RC_DIVIDE_BY_ZERO 0x00000800
+#define WOF_RC_DIVIDE_BY_ZERO_VDD 0x00000800
#define WOF_RC_VFRT_REQ_FAILURE 0x00001000
#define WOF_RC_CONTROL_REQ_FAILURE 0x00002000
#define WOF_RC_VFRT_ALIGNMENT_ERROR 0x00004000
@@ -74,6 +74,8 @@
#define WOF_RC_NO_CONFIGURED_CORES 0x00400000
#define WOF_RC_IPC_FAILURE 0x00800000
#define WOF_RC_USER_DISABLED_WOF 0x01000000
+#define WOF_RC_RESET_DEBUG_CMD 0x02000000
+#define WOF_RC_DIVIDE_BY_ZERO_VDN 0x04000000
//***************************************************************************
// Temp space used to save hard coded addresses
OpenPOWER on IntegriCloud