summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndres Lugo-Reyes <aalugore@us.ibm.com>2018-02-13 15:12:02 -0600
committerAndres A. Lugo-Reyes <aalugore@us.ibm.com>2018-02-19 10:39:38 -0500
commitbf6e716d3289898feb8d16fa1d1a5f48f0360f9f (patch)
tree0907af69acfcd64789e8f0717a5658e8587bfa71
parent919b78927d26c079ac3234128e09c548920f3487 (diff)
downloadtalos-occ-bf6e716d3289898feb8d16fa1d1a5f48f0360f9f.tar.gz
talos-occ-bf6e716d3289898feb8d16fa1d1a5f48f0360f9f.zip
Look at OCCFLG[30] to see if PGPE needs a new VFRT
-Prevent WOF from being enabled on PowerVM until valid mode received Change-Id: I67a955903b1b4b06b13c0a9eb80b478e393f9383 CQ:SW417438 CMVC-Prereq:1045743 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54046 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com> Reviewed-by: Andres A. Lugo-Reyes <aalugore@us.ibm.com>
-rwxr-xr-xsrc/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c9
-rw-r--r--src/occ_405/wof/wof.c114
2 files changed, 73 insertions, 50 deletions
diff --git a/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c b/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c
index 950466e..0bfa8f6 100755
--- a/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c
+++ b/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2017 */
+/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -1771,6 +1771,13 @@ errlHndl_t data_store_sys_config(const cmdh_fsp_cmd_t * i_cmd_ptr,
G_sysConfigData.system_type.byte, G_sysConfigData.backplane_huid, G_sysConfigData.apss_huid,
G_sysConfigData.proc_huid);
+ // Check to see if we have to disable WOF due to no mode set yet on PowerVM
+ if( !G_sysConfigData.system_type.kvm &&
+ (CURRENT_MODE() == OCC_MODE_NOCHANGE) )
+ {
+ set_clear_wof_disabled(SET, WOF_RC_MODE_NO_SUPPORT_MASK);
+ }
+
//Write core temp and freq sensor ids
//Core Temp and Freq sensors are always in sequence in the table
for (l_coreIndex = 0; l_coreIndex < MAX_CORES; l_coreIndex++)
diff --git a/src/occ_405/wof/wof.c b/src/occ_405/wof/wof.c
index 9995266..7565641 100644
--- a/src/occ_405/wof/wof.c
+++ b/src/occ_405/wof/wof.c
@@ -659,11 +659,16 @@ void send_vfrt_to_pgpe( uint32_t i_vfrt_main_mem_addr )
break;
}
- if( (i_vfrt_main_mem_addr == g_wof->curr_vfrt_main_mem_addr ) &&
+ // Check if PGPE explicitely requested a new vfrt
+ ocb_occflg_t occ_flags = {0};
+ occ_flags.value = in32(OCB_OCCFLG);
+
+ if( ((i_vfrt_main_mem_addr == g_wof->curr_vfrt_main_mem_addr ) &&
(g_wof->req_active_quad_update ==
- g_wof->prev_req_active_quads) )
+ g_wof->prev_req_active_quads)) &&
+ (!occ_flags.fields.active_quad_update) )
{
- // VFRT and requested active quads are unchanged. Skip
+ // VFRT and requested active quads are unchanged.
break;
}
// Either the Main memory address changed or req active quads changed
@@ -1547,6 +1552,8 @@ void set_clear_wof_disabled( uint8_t i_action,
void disable_wof( void )
{
errlHndl_t l_errl = NULL;
+ uint8_t l_prev_state = g_wof->wof_init_state;
+
// Disable wof on 405
g_wof->wof_init_state = WOF_DISABLED;
@@ -1556,66 +1563,74 @@ void disable_wof( void )
int user_data_rc = 0;
do
{
- // Make sure IPC command is idle
- if(async_request_is_idle(&G_wof_control_req.request))
+ if(l_prev_state >= WOF_CONTROL_ON_SENT_WAITING)
{
-
- // Check to see if a previous wof control IPC message observed an error
- if( g_wof->control_ipc_rc != 0 )
- {
- INTR_TRAC_ERR("Unknown error from wof control IPC message");
- /** @
- * @errortype
- * @moduleid DISABLE_WOF
- * @reasoncode GPE_REQUEST_RC_FAILURE
- * @userdata1 rc - wof_control rc
- * @userdata2 0
- * @userdata4 OCC_NO_EXTENDED_RC
- * @devdesc OCC Failure from sending wof control
- */
- user_data_rc = g_wof->control_ipc_rc;
- g_wof->control_ipc_rc = 0;
- reasonCode = GPE_REQUEST_RC_FAILURE;
- }
- else
+ // Make sure IPC command is idle
+ if(async_request_is_idle(&G_wof_control_req.request))
{
- // Set parameters for the GpeRequest
- G_wof_control_parms.action = PGPE_ACTION_WOF_OFF;
- user_data_rc = pgpe_request_schedule( &G_wof_control_req );
- if( user_data_rc != 0 )
+ // Check to see if a previous wof control IPC message observed an error
+ if( g_wof->control_ipc_rc != 0 )
{
+ INTR_TRAC_ERR("Unknown error from wof control IPC message(disable)");
+ INTR_TRAC_ERR("Return Code = 0x%x", g_wof->control_ipc_rc);
/** @
* @errortype
* @moduleid DISABLE_WOF
- * @reasoncode GPE_REQUEST_SCHEDULE_FAILURE
- * @userdata1 rc - gpe_request_schedule return code
+ * @reasoncode GPE_REQUEST_RC_FAILURE
+ * @userdata1 rc - wof_control rc
* @userdata2 0
* @userdata4 OCC_NO_EXTENDED_RC
- * @devdesc OCC Failed to schedule a GPE job for enabling wof
+ * @devdesc OCC Failure from sending wof control
*/
- reasonCode = GPE_REQUEST_SCHEDULE_FAILURE;
- INTR_TRAC_ERR("disable_wof() - Error when sending WOF Control"
- " OFF IPC command! RC = %x", user_data_rc );
+ user_data_rc = g_wof->control_ipc_rc;
+ g_wof->control_ipc_rc = 0;
+ reasonCode = GPE_REQUEST_RC_FAILURE;
}
- }
+ else
+ {
+ // Set parameters for the GpeRequest
+ G_wof_control_parms.action = PGPE_ACTION_WOF_OFF;
+ user_data_rc = pgpe_request_schedule( &G_wof_control_req );
- if( user_data_rc != 0 )
- {
- l_errl = createErrl(
- DISABLE_WOF,
- reasonCode,
- OCC_NO_EXTENDED_RC,
- ERRL_SEV_PREDICTIVE,
- NULL,
- DEFAULT_TRACE_SIZE,
- user_data_rc,
- 0);
+ if( user_data_rc != 0 )
+ {
+ /** @
+ * @errortype
+ * @moduleid DISABLE_WOF
+ * @reasoncode GPE_REQUEST_SCHEDULE_FAILURE
+ * @userdata1 rc - gpe_request_schedule return code
+ * @userdata2 0
+ * @userdata4 OCC_NO_EXTENDED_RC
+ * @devdesc OCC Failed to schedule a GPE job for enabling wof
+ */
+ reasonCode = GPE_REQUEST_SCHEDULE_FAILURE;
+ INTR_TRAC_ERR("disable_wof() - Error when sending WOF Control"
+ " OFF IPC command! RC = %x", user_data_rc );
+ }
+ }
- // commit the error log
- commitErrl( &l_errl );
+ if( user_data_rc != 0 )
+ {
+ l_errl = createErrl(
+ DISABLE_WOF,
+ reasonCode,
+ OCC_NO_EXTENDED_RC,
+ ERRL_SEV_PREDICTIVE,
+ NULL,
+ DEFAULT_TRACE_SIZE,
+ user_data_rc,
+ 0);
+
+ // commit the error log
+ commitErrl( &l_errl );
+ }
}
}
+ else
+ {
+ INTR_TRAC_IMP("WOF has not been enabled so no need to disable");
+ }
}while( 0 );
}
@@ -1644,7 +1659,8 @@ bool enable_wof( void )
// Check to see if a previous wof control IPC message observed an error
if( g_wof->control_ipc_rc != 0 )
{
- INTR_TRAC_ERR("Unknown error from wof control IPC message");
+ INTR_TRAC_ERR("Unknown error from wof control IPC message(enable)");
+ INTR_TRAC_ERR("Return Code = 0x%X", g_wof->control_ipc_rc);
rc = g_wof->control_ipc_rc;
bit_to_set = WOF_RC_CONTROL_REQ_FAILURE;
g_wof->control_ipc_rc = 0;
OpenPOWER on IntegriCloud