summaryrefslogtreecommitdiffstats
path: root/src/occ_405/wof
diff options
context:
space:
mode:
authorAndres Lugo-Reyes <aalugore@us.ibm.com>2017-10-12 10:45:54 -0500
committerMartha Broyles <mbroyles@us.ibm.com>2017-10-19 11:43:29 -0400
commit50cfdf257476da2f34b49eb991eaed257829da23 (patch)
tree57dcaf6a50ea79970ae066af4519a5b421b861d0 /src/occ_405/wof
parent53f78dee6ba23104bae04d18c386c5b2323274e7 (diff)
downloadtalos-occ-50cfdf257476da2f34b49eb991eaed257829da23.tar.gz
talos-occ-50cfdf257476da2f34b49eb991eaed257829da23.zip
Prevent WOF related error logs in states that don't support WOF
Change-Id: Ica38f94423a763d116ad24082e776975828f6fde CQ:SW404551 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48300 Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
Diffstat (limited to 'src/occ_405/wof')
-rw-r--r--src/occ_405/wof/wof.c38
-rw-r--r--src/occ_405/wof/wof.h4
2 files changed, 35 insertions, 7 deletions
diff --git a/src/occ_405/wof/wof.c b/src/occ_405/wof/wof.c
index 2e3d66d..f2b5c3e 100644
--- a/src/occ_405/wof/wof.c
+++ b/src/occ_405/wof/wof.c
@@ -131,6 +131,9 @@ void call_wof_main( void )
// Variable to ensure we do not keep trying to send the wof control
static bool L_wof_control_last_chance = false;
+ // Variable to keep track of PState enablement to prevent setting/clearing
+ // wof_disabled bit every iteration.
+ static uint8_t L_pstate_protocol_off = 0;
// GpeRequest more than 1 extra time.
bool enable_success = false;
do
@@ -153,13 +156,22 @@ void call_wof_main( void )
g_wof->vfrt_callback_error = 0;
}
+ // If the 405 turned WOF off on pgpe and it is the only bit set
+ // clear the bit so we can re-enable WOF
+ if( g_wof->pgpe_wof_off &&
+ (g_wof->wof_disabled == WOF_RC_PGPE_WOF_DISABLED) )
+ {
+ g_wof->pgpe_wof_off = 0;
+ set_clear_wof_disabled( CLEAR, WOF_RC_PGPE_WOF_DISABLED );
+ }
+
// Make sure wof has not been disabled
if( g_wof->wof_disabled )
{
- if( g_wof->pgpe_wof_off )
+ if( g_wof->pgpe_wof_disabled )
{
set_clear_wof_disabled( SET, WOF_RC_PGPE_WOF_DISABLED );
- g_wof->pgpe_wof_off = 0;
+ g_wof->pgpe_wof_disabled = 0;
}
break;
}
@@ -167,10 +179,24 @@ void call_wof_main( void )
// Make sure Pstate Protocol is on
if(G_proc_pstate_status != PSTATES_ENABLED)
{
- INTR_TRAC_ERR("WOF Disabled! Pstate Protocol off");
- set_clear_wof_disabled( SET, WOF_RC_PSTATE_PROTOCOL_OFF );
+ if( L_pstate_protocol_off == 0 )
+ {
+ INTR_TRAC_ERR("WOF Disabled! Pstate Protocol off");
+ set_clear_wof_disabled( SET, WOF_RC_PSTATE_PROTOCOL_OFF );
+ L_pstate_protocol_off = 1;
+ }
+ // Since Pstates are off, break out
break;
}
+ else if(G_proc_pstate_status == PSTATES_ENABLED)
+ {
+ if( L_pstate_protocol_off == 1 )
+ {
+ INTR_TRAC_INFO("Pstate Protocol on! Clearing PSTATE_PROTOCOL_OFF");
+ set_clear_wof_disabled( CLEAR, WOF_RC_PSTATE_PROTOCOL_OFF );
+ L_pstate_protocol_off = 0;
+ }
+ }
// Ensure the OCC is active
if( IS_OCC_STATE_ACTIVE() )
@@ -1622,7 +1648,7 @@ void wof_control_callback( void )
if( G_wof_control_parms.msg_cb.rc == PGPE_WOF_RC_NOT_ENABLED )
{
// PGPE cannot enable wof
- g_wof->pgpe_wof_off = 1;
+ g_wof->pgpe_wof_disabled = 1;
}
else if( G_wof_control_parms.msg_cb.rc == PGPE_RC_SUCCESS)
{
@@ -1633,7 +1659,7 @@ void wof_control_callback( void )
}
else
{
- // Record that PGPE has WOF turned off
+ // Record that 405 turned PGPE WOF off
g_wof->pgpe_wof_off = 1;
}
}
diff --git a/src/occ_405/wof/wof.h b/src/occ_405/wof/wof.h
index 41a20fc..c0bcd77 100644
--- a/src/occ_405/wof/wof.h
+++ b/src/occ_405/wof/wof.h
@@ -305,8 +305,10 @@ typedef struct
// Keeps track of whether we got an error in wof_vfrt_callback to be
// logged later
uint8_t vfrt_callback_error;
- // Keeps track of whether or /not we just turned off wof on the PGPE
+ // Keeps track of whether the 405 was the one who disabled WOF on the PGPE
uint8_t pgpe_wof_off;
+ // Keeps track of whether or not the PGPE can enable WOF
+ uint8_t pgpe_wof_disabled;
// Offset into main memory with the beginning of the wof vfrt data as base
uint32_t vfrt_mm_offset;
// Return code returned from a bad VFRT request
OpenPOWER on IntegriCloud