summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndres Lugo-Reyes <aalugore@us.ibm.com>2018-05-30 16:17:01 -0500
committerAndres A. Lugo-Reyes <aalugore@us.ibm.com>2018-06-05 17:58:28 -0400
commit41f0c2c5e001fc0eb52e6e9d8f68a8d4d9accb88 (patch)
treebed15da7f67dfe1556774f30cfc76df29fc7648f
parente66f727bf40b9dbd00c0e9a527dbfe584c6eb8ba (diff)
downloadtalos-occ-41f0c2c5e001fc0eb52e6e9d8f68a8d4d9accb88.tar.gz
talos-occ-41f0c2c5e001fc0eb52e6e9d8f68a8d4d9accb88.zip
WOF: Add Extended RC to wof errors
Change-Id: I18a532879deec3a8dd9f84396ac4ed2df1383881 RTC:192844 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59608 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.c4
-rwxr-xr-xsrc/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c48
-rwxr-xr-xsrc/occ_405/dcom/dcom.c22
-rwxr-xr-xsrc/occ_405/main.c20
-rwxr-xr-xsrc/occ_405/mode.c38
-rw-r--r--src/occ_405/occ_service_codes.h30
-rwxr-xr-xsrc/occ_405/state.c20
-rw-r--r--src/occ_405/wof/wof.c96
-rw-r--r--src/occ_405/wof/wof.h5
9 files changed, 212 insertions, 71 deletions
diff --git a/src/occ_405/cmdh/cmdh_fsp_cmds.c b/src/occ_405/cmdh/cmdh_fsp_cmds.c
index 5cc4d8d..1ad61c7 100755
--- a/src/occ_405/cmdh/cmdh_fsp_cmds.c
+++ b/src/occ_405/cmdh/cmdh_fsp_cmds.c
@@ -1458,7 +1458,9 @@ void cmdh_dbug_force_wof_reset( const cmdh_fsp_cmd_t * i_cmd_ptr,
cmdh_fsp_rsp_t * o_rsp_ptr)
{
TRAC_INFO("DEBUG - Forcing WOF Reset");
- set_clear_wof_disabled( SET, WOF_RC_RESET_DEBUG_CMD );
+ set_clear_wof_disabled( SET,
+ WOF_RC_RESET_DEBUG_CMD,
+ ERC_WOF_RESET_DEBUG_CMD );
G_rsp_status = ERRL_RC_SUCCESS;
}
diff --git a/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c b/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c
index 9b75703..920b88e 100755
--- a/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c
+++ b/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c
@@ -365,35 +365,53 @@ errlHndl_t data_store_freq_data(const cmdh_fsp_cmd_t * i_cmd_ptr,
{
case WOF_MISSING_ULTRA_TURBO:
CMDH_TRAC_INFO("WOF Disabled due to 0 UT value.");
- set_clear_wof_disabled( SET, WOF_RC_UTURBO_IS_ZERO );
+ set_clear_wof_disabled( SET,
+ WOF_RC_UTURBO_IS_ZERO,
+ ERC_WOF_UTURBO_IS_ZERO );
l_freq = 0;
break;
case WOF_SYSTEM_DISABLED:
CMDH_TRAC_INFO("WOF Disabled due to SYSTEM_WOF_DISABLE");
- set_clear_wof_disabled( SET, WOF_RC_SYSTEM_WOF_DISABLE );
+ set_clear_wof_disabled( SET,
+ WOF_RC_SYSTEM_WOF_DISABLE,
+ ERC_WOF_SYSTEM_WOF_DISABLE );
l_freq = 0;
break;
case WOF_RESET_LIMIT_REACHED:
CMDH_TRAC_INFO("WOF Disabled due to reset limit");
- set_clear_wof_disabled( SET, WOF_RC_RESET_LIMIT_REACHED );
+ set_clear_wof_disabled( SET,
+ WOF_RC_RESET_LIMIT_REACHED,
+ ERC_WOF_RESET_LIMIT_REACHED );
l_freq = 0;
break;
case WOF_UNSUPPORTED_FREQ:
CMDH_TRAC_INFO("WOF Disabled due to unsupported frequency");
- set_clear_wof_disabled( SET, WOF_RC_UNSUPPORTED_FREQUENCIES );
+ set_clear_wof_disabled( SET,
+ WOF_RC_UNSUPPORTED_FREQUENCIES,
+ ERC_WOF_UNSUPPORTED_FREQUENCIES );
l_freq = 0;
break;
default:
CMDH_TRAC_INFO("WOF is Enabled! so far...");
- set_clear_wof_disabled( CLEAR, WOF_RC_UTURBO_IS_ZERO );
- set_clear_wof_disabled( CLEAR, WOF_RC_SYSTEM_WOF_DISABLE );
- set_clear_wof_disabled( CLEAR, WOF_RC_RESET_LIMIT_REACHED );
- set_clear_wof_disabled( CLEAR, WOF_RC_UNSUPPORTED_FREQUENCIES );
- set_clear_wof_disabled( CLEAR, WOF_RC_OCC_WOF_DISABLED );
+ set_clear_wof_disabled( CLEAR,
+ WOF_RC_UTURBO_IS_ZERO,
+ ERC_WOF_UTURBO_IS_ZERO );
+ set_clear_wof_disabled( CLEAR,
+ WOF_RC_SYSTEM_WOF_DISABLE,
+ ERC_WOF_SYSTEM_WOF_DISABLE );
+ set_clear_wof_disabled( CLEAR,
+ WOF_RC_RESET_LIMIT_REACHED,
+ ERC_WOF_SYSTEM_WOF_DISABLE );
+ set_clear_wof_disabled( CLEAR,
+ WOF_RC_UNSUPPORTED_FREQUENCIES,
+ ERC_WOF_UNSUPPORTED_FREQUENCIES );
+ set_clear_wof_disabled( CLEAR,
+ WOF_RC_OCC_WOF_DISABLED,
+ ERC_WOF_OCC_WOF_DISABLED );
break;
}
@@ -1244,7 +1262,9 @@ errlHndl_t data_store_avsbus_config(const cmdh_fsp_cmd_t * i_cmd_ptr,
CMDH_TRAC_ERR("WOF Disabled! Invalid VDD/VDN");
// If cannot use vdd/vdn, cannot run wof algorithm.
- set_clear_wof_disabled( SET, WOF_RC_INVALID_VDD_VDN );
+ set_clear_wof_disabled( SET,
+ WOF_RC_INVALID_VDD_VDN,
+ ERC_WOF_INVALID_VDD_VDN );
}
else
@@ -1269,7 +1289,9 @@ errlHndl_t data_store_avsbus_config(const cmdh_fsp_cmd_t * i_cmd_ptr,
G_sysConfigData.vdd_current_rollover_10mA, G_sysConfigData.vdd_max_current_10mA);
// We can use vdd/vdn. Clear NO_VDD_VDN_READ mask
- set_clear_wof_disabled( CLEAR, WOF_RC_INVALID_VDD_VDN );
+ set_clear_wof_disabled( CLEAR,
+ WOF_RC_INVALID_VDD_VDN,
+ ERC_WOF_INVALID_VDD_VDN );
avsbus_init();
}
@@ -1800,7 +1822,9 @@ errlHndl_t data_store_sys_config(const cmdh_fsp_cmd_t * i_cmd_ptr,
if( !G_sysConfigData.system_type.kvm &&
(CURRENT_MODE() == OCC_MODE_NOCHANGE) )
{
- set_clear_wof_disabled(SET, WOF_RC_MODE_NO_SUPPORT_MASK);
+ set_clear_wof_disabled(SET,
+ WOF_RC_MODE_NO_SUPPORT_MASK,
+ ERC_WOF_MODE_NO_SUPPORT_MASK);
}
//Write core temp and freq sensor ids
diff --git a/src/occ_405/dcom/dcom.c b/src/occ_405/dcom/dcom.c
index a3f11f1..4c05989 100755
--- a/src/occ_405/dcom/dcom.c
+++ b/src/occ_405/dcom/dcom.c
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2017 */
+/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -540,12 +540,18 @@ void task_dcom_parse_occfwmsg(task_t *i_self)
// If Ultra Turbo is 0, disable WOF, else enable
if(G_sysConfigData.sys_mode_freq.table[OCC_MODE_UTURBO] == 0)
{
- set_clear_wof_disabled( SET, WOF_RC_UTURBO_IS_ZERO );
+ set_clear_wof_disabled( SET,
+ WOF_RC_UTURBO_IS_ZERO,
+ ERC_WOF_UTURBO_IS_ZERO );
}
else
{
- set_clear_wof_disabled( CLEAR, WOF_RC_UTURBO_IS_ZERO );
- set_clear_wof_disabled( CLEAR, WOF_RC_OCC_WOF_DISABLED );
+ set_clear_wof_disabled( CLEAR,
+ WOF_RC_UTURBO_IS_ZERO,
+ ERC_WOF_UTURBO_IS_ZERO );
+ set_clear_wof_disabled( CLEAR,
+ WOF_RC_OCC_WOF_DISABLED,
+ ERC_WOF_OCC_WOF_DISABLED );
}
if(G_sysConfigData.sys_mode_freq.table[OCC_MODE_UTURBO] > G_sysConfigData.sys_mode_freq.table[OCC_MODE_TURBO])
@@ -609,7 +615,9 @@ void task_dcom_parse_occfwmsg(task_t *i_self)
{
if(g_amec->wof.wof_disabled & WOF_RC_USER_DISABLED_WOF)
{
- set_clear_wof_disabled( CLEAR, WOF_RC_USER_DISABLED_WOF );
+ set_clear_wof_disabled( CLEAR,
+ WOF_RC_USER_DISABLED_WOF,
+ ERC_WOF_USER_DISABLED_WOF );
TRAC_INFO("User enabled WOF! wof_disabled = 0x%08X", g_amec->wof.wof_disabled);
}
}
@@ -617,7 +625,9 @@ void task_dcom_parse_occfwmsg(task_t *i_self)
{
if(!(g_amec->wof.wof_disabled & WOF_RC_USER_DISABLED_WOF))
{
- set_clear_wof_disabled( SET, WOF_RC_USER_DISABLED_WOF );
+ set_clear_wof_disabled( SET,
+ WOF_RC_USER_DISABLED_WOF,
+ ERC_WOF_USER_DISABLED_WOF );
TRAC_INFO("User disabled WOF! wof_disabled = 0x%08X", g_amec->wof.wof_disabled);
}
}
diff --git a/src/occ_405/main.c b/src/occ_405/main.c
index a871e26..2e36807 100755
--- a/src/occ_405/main.c
+++ b/src/occ_405/main.c
@@ -463,7 +463,9 @@ void read_wof_header(void)
if ( l_error )
{
// We were unable to get the WOF header thus it should not be run.
- set_clear_wof_disabled( SET, WOF_RC_NO_WOF_HEADER_MASK );
+ set_clear_wof_disabled( SET,
+ WOF_RC_NO_WOF_HEADER_MASK,
+ ERC_WOF_NO_WOF_HEADER_MASK );
}
}
else
@@ -471,7 +473,9 @@ void read_wof_header(void)
// We were unable to get the WOF header thus it should not be run.
MAIN_TRAC_ERR("read_wof_header(): WOF header address is 0 or NOT"
" 128-byte aligned, WOF is disabled");
- set_clear_wof_disabled( SET, WOF_RC_NO_WOF_HEADER_MASK );
+ set_clear_wof_disabled( SET,
+ WOF_RC_NO_WOF_HEADER_MASK,
+ ERC_WOF_NO_WOF_HEADER_MASK );
}
} // end read_wof_header()
@@ -847,7 +851,9 @@ bool read_oppb_params()
{
MAIN_TRAC_INFO("OPPB has WOF disabled.(%d)",
G_oppb.wof.wof_enabled);
- set_clear_wof_disabled( SET, WOF_RC_OPPB_WOF_DISABLED );
+ set_clear_wof_disabled( SET,
+ WOF_RC_OPPB_WOF_DISABLED,
+ ERC_WOF_OPPB_WOF_DISABLED );
}
else
{
@@ -921,7 +927,9 @@ void read_hcode_headers()
TRAC_INFO("read_hcode_headers: No configured cores detected."
" Skipping read_oppb_params(), read_pgpe_header(),"
" and read_wof_header()");
- set_clear_wof_disabled( SET, WOF_RC_NO_CONFIGURED_CORES );
+ set_clear_wof_disabled( SET,
+ WOF_RC_NO_CONFIGURED_CORES,
+ ERC_WOF_NO_CONFIGURED_CORES );
G_proc_pstate_status = PSTATES_DISABLED;
}
else
@@ -937,7 +945,9 @@ void read_hcode_headers()
// Extract important WOF data into global space
read_wof_header();
CHECKPOINT(WOF_IMAGE_HEADER_READ);
- set_clear_wof_disabled( CLEAR, WOF_RC_NO_CONFIGURED_CORES );
+ set_clear_wof_disabled( CLEAR,
+ WOF_RC_NO_CONFIGURED_CORES,
+ ERC_WOF_NO_CONFIGURED_CORES );
}
// PGPE Beacon is not implemented in simics
diff --git a/src/occ_405/mode.c b/src/occ_405/mode.c
index fbaec25..75ccd3d 100755
--- a/src/occ_405/mode.c
+++ b/src/occ_405/mode.c
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2017 */
+/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -274,7 +274,9 @@ errlHndl_t SMGR_mode_transition_to_nominal()
CURRENT_MODE() = OCC_MODE_NOMINAL;
// WOF is disabled in nominal mode
- set_clear_wof_disabled( SET, WOF_RC_MODE_NO_SUPPORT_MASK );
+ set_clear_wof_disabled( SET,
+ WOF_RC_MODE_NO_SUPPORT_MASK,
+ ERC_WOF_MODE_NO_SUPPORT_MASK );
TRAC_IMP("SMGR: Mode to Nominal Transition Completed");
return l_errlHndl;
@@ -300,7 +302,9 @@ errlHndl_t SMGR_mode_transition_to_powersave()
CURRENT_MODE() = OCC_MODE_PWRSAVE;
// WOF is disabled in SPS mode
- set_clear_wof_disabled( SET, WOF_RC_MODE_NO_SUPPORT_MASK );
+ set_clear_wof_disabled( SET,
+ WOF_RC_MODE_NO_SUPPORT_MASK,
+ ERC_WOF_MODE_NO_SUPPORT_MASK );
TRAC_IMP("SMGR: Mode to PowerSave Transition Completed");
@@ -328,7 +332,9 @@ errlHndl_t SMGR_mode_transition_to_dynpowersave()
CURRENT_MODE() = OCC_MODE_DYN_POWER_SAVE;
// WOF is enabled in DPS, clear the mode bit
- set_clear_wof_disabled( CLEAR, WOF_RC_MODE_NO_SUPPORT_MASK );
+ set_clear_wof_disabled( CLEAR,
+ WOF_RC_MODE_NO_SUPPORT_MASK,
+ ERC_WOF_MODE_NO_SUPPORT_MASK );
TRAC_IMP("SMGR: Mode to Dynamic PowerSave-Favor Energy Transition Completed");
@@ -353,7 +359,9 @@ errlHndl_t SMGR_mode_transition_to_dynpowersave_fp()
CURRENT_MODE() = OCC_MODE_DYN_POWER_SAVE_FP;
// WOF is enabled in DPS-FP, clear the mode bit
- set_clear_wof_disabled( CLEAR, WOF_RC_MODE_NO_SUPPORT_MASK );
+ set_clear_wof_disabled( CLEAR,
+ WOF_RC_MODE_NO_SUPPORT_MASK,
+ ERC_WOF_MODE_NO_SUPPORT_MASK );
TRAC_IMP("SMGR: Mode to Dynamic PowerSave-Favor Performance Transition Completed");
@@ -380,7 +388,9 @@ errlHndl_t SMGR_mode_transition_to_turbo()
CURRENT_MODE() = OCC_MODE_TURBO;
// WOF is disabled in turbo mode
- set_clear_wof_disabled( SET, WOF_RC_MODE_NO_SUPPORT_MASK );
+ set_clear_wof_disabled( SET,
+ WOF_RC_MODE_NO_SUPPORT_MASK,
+ ERC_WOF_MODE_NO_SUPPORT_MASK );
TRAC_IMP("SMGR: Mode to Turbo Transition Completed");
@@ -406,7 +416,9 @@ errlHndl_t SMGR_mode_transition_to_ffo()
CURRENT_MODE() = OCC_MODE_FFO;
// WOF is disabled in FFO
- set_clear_wof_disabled( SET, WOF_RC_MODE_NO_SUPPORT_MASK );
+ set_clear_wof_disabled( SET,
+ WOF_RC_MODE_NO_SUPPORT_MASK,
+ ERC_WOF_MODE_NO_SUPPORT_MASK );
TRAC_IMP("SMGR: Mode to FFO Transition Completed");
@@ -431,7 +443,9 @@ errlHndl_t SMGR_mode_transition_to_fmf()
CURRENT_MODE() = OCC_MODE_FMF;
// WOF is enabled in FMF, clear the mode bit
- set_clear_wof_disabled( CLEAR, WOF_RC_MODE_NO_SUPPORT_MASK );
+ set_clear_wof_disabled( CLEAR,
+ WOF_RC_MODE_NO_SUPPORT_MASK,
+ ERC_WOF_MODE_NO_SUPPORT_MASK );
TRAC_IMP("SMGR: Mode to FMF Transition Completed");
return l_errlHndl;
@@ -455,7 +469,9 @@ errlHndl_t SMGR_mode_transition_to_nom_perf()
CURRENT_MODE() = OCC_MODE_NOM_PERFORMANCE;
// WOF is enabled in nominal performance mode, clear the mode bit
- set_clear_wof_disabled( CLEAR, WOF_RC_MODE_NO_SUPPORT_MASK );
+ set_clear_wof_disabled( CLEAR,
+ WOF_RC_MODE_NO_SUPPORT_MASK,
+ ERC_WOF_MODE_NO_SUPPORT_MASK );
TRAC_IMP("SMGR: Mode to Nominal Performance Transition Completed");
@@ -480,7 +496,9 @@ errlHndl_t SMGR_mode_transition_to_max_perf()
CURRENT_MODE() = OCC_MODE_MAX_PERFORMANCE;
// WOF is enabled in max performance mode, clear the mode bit
- set_clear_wof_disabled( CLEAR, WOF_RC_MODE_NO_SUPPORT_MASK );
+ set_clear_wof_disabled( CLEAR,
+ WOF_RC_MODE_NO_SUPPORT_MASK,
+ ERC_WOF_MODE_NO_SUPPORT_MASK );
TRAC_IMP("SMGR: Mode to Maximum Performance Transition Completed");
diff --git a/src/occ_405/occ_service_codes.h b/src/occ_405/occ_service_codes.h
index d995114..b212028 100644
--- a/src/occ_405/occ_service_codes.h
+++ b/src/occ_405/occ_service_codes.h
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2017 */
+/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -293,6 +293,34 @@ enum occExtReasonCode
ERC_STATE_HEARTBEAT_CFG_FAILURE = 0x0180,
ERC_RTL_TIME_EXCEEDED = 0x0190,
+
+ ERC_WOF_NO_WOF_HEADER_MASK = 0x0200,
+ ERC_WOF_INVALID_ACTIVE_QUADS = 0x0201,
+ ERC_WOF_INVALID_VDD_VDN = 0x0202,
+ ERC_WOF_PGPE_REQ_NOT_IDLE = 0x0203,
+ ERC_WOF_PGPE_WOF_DISABLED = 0x0204,
+ ERC_WOF_PSTATE_PROTOCOL_OFF = 0x0205,
+ ERC_WOF_VFRT_REQ_TIMEOUT = 0x0206,
+ ERC_WOF_CONTROL_REQ_TIMEOUT = 0x0207,
+ ERC_WOF_STATE_CHANGE = 0x0208,
+ ERC_WOF_MODE_CHANGE = 0x0209,
+ ERC_WOF_MODE_NO_SUPPORT_MASK = 0x020A,
+ ERC_WOF_DIVIDE_BY_ZERO_VDD = 0x020B,
+ ERC_WOF_VFRT_REQ_FAILURE = 0x020C,
+ ERC_WOF_CONTROL_REQ_FAILURE = 0x020D,
+ ERC_WOF_VFRT_ALIGNMENT_ERROR = 0x020E,
+ ERC_WOF_DRIVER_WOF_DISABLED = 0x020F,
+ ERC_WOF_UTURBO_IS_ZERO = 0x0210,
+ ERC_WOF_OCC_WOF_DISABLED = 0x0211,
+ ERC_WOF_OPPB_WOF_DISABLED = 0x0212,
+ ERC_WOF_SYSTEM_WOF_DISABLE = 0x0213,
+ ERC_WOF_RESET_LIMIT_REACHED = 0x0214,
+ ERC_WOF_UNSUPPORTED_FREQUENCIES = 0x0215,
+ ERC_WOF_NO_CONFIGURED_CORES = 0x0216,
+ ERC_WOF_IPC_FAILURE = 0x0217,
+ ERC_WOF_USER_DISABLED_WOF = 0x0218,
+ ERC_WOF_RESET_DEBUG_CMD = 0x0219,
+ ERC_WOF_DIVIDE_BY_ZERO_VDN = 0x021A,
};
// Error log Module Ids
diff --git a/src/occ_405/state.c b/src/occ_405/state.c
index 19da6b2..a3ec45e 100755
--- a/src/occ_405/state.c
+++ b/src/occ_405/state.c
@@ -330,7 +330,9 @@ errlHndl_t SMGR_all_to_standby()
TRAC_IMP("SMGR: Transition from State (%d) to Standby Started", CURRENT_STATE());
// set STATE_CHANGE WOF disabled flag
- set_clear_wof_disabled( SET, WOF_RC_STATE_CHANGE );
+ set_clear_wof_disabled( SET,
+ WOF_RC_STATE_CHANGE,
+ ERC_WOF_STATE_CHANGE );
// if Psates in transition (a pgpe_start_suspend IPC call still running),
// wait until it is settled up to WAIT_PGPE_TASK_TIMEOUT usec
@@ -605,7 +607,9 @@ errlHndl_t SMGR_observation_to_active()
TRAC_IMP("SMGR: Observation to Active Transition Started");
// Clear STATE_CHANGE WOF disabled flag
- set_clear_wof_disabled( CLEAR, WOF_RC_STATE_CHANGE );
+ set_clear_wof_disabled( CLEAR,
+ WOF_RC_STATE_CHANGE,
+ ERC_WOF_STATE_CHANGE );
// If there are no cores configured, do not wait for PSTATES to
// become enabled.
@@ -883,7 +887,9 @@ errlHndl_t SMGR_active_to_observation()
do
{
// Set STATE_CHANGE WOF disabled
- set_clear_wof_disabled( SET, WOF_RC_STATE_CHANGE );
+ set_clear_wof_disabled( SET,
+ WOF_RC_STATE_CHANGE,
+ ERC_WOF_STATE_CHANGE );
if(G_present_cores == 0)
{
@@ -1014,7 +1020,9 @@ errlHndl_t SMGR_active_to_characterization()
do
{
// set STATE_CHANGE WOF disabled flag
- set_clear_wof_disabled( SET, WOF_RC_STATE_CHANGE );
+ set_clear_wof_disabled( SET,
+ WOF_RC_STATE_CHANGE,
+ ERC_WOF_STATE_CHANGE );
if(G_present_cores == 0)
{
@@ -1178,7 +1186,9 @@ errlHndl_t SMGR_all_to_safe()
}
// set STATE_CHANGE WOF disabled flag
- set_clear_wof_disabled( SET, WOF_RC_STATE_CHANGE );
+ set_clear_wof_disabled( SET,
+ WOF_RC_STATE_CHANGE,
+ ERC_WOF_STATE_CHANGE );
// If we are master, we will wait 15ms to go to full on safe mode
// This is to give the slaves time to see that we are broadcasting
diff --git a/src/occ_405/wof/wof.c b/src/occ_405/wof/wof.c
index d565f2a..d4de216 100644
--- a/src/occ_405/wof/wof.c
+++ b/src/occ_405/wof/wof.c
@@ -149,7 +149,9 @@ void call_wof_main( void )
// PGPE wof disabled bit
if(g_wof->wof_init_state == PGPE_WOF_ENABLED_NO_PREV_DATA)
{
- set_clear_wof_disabled( CLEAR, WOF_RC_PGPE_WOF_DISABLED );
+ set_clear_wof_disabled( CLEAR,
+ WOF_RC_PGPE_WOF_DISABLED,
+ ERC_WOF_PGPE_WOF_DISABLED );
}
// If error logged in callback, record now
@@ -157,7 +159,10 @@ void call_wof_main( void )
{
INTR_TRAC_ERR("Got a bad RC in wof_vfrt_callback: 0x%x",
g_wof->wof_vfrt_req_rc);
- set_clear_wof_disabled( SET, WOF_RC_VFRT_REQ_FAILURE );
+ set_clear_wof_disabled( SET,
+ WOF_RC_VFRT_REQ_FAILURE,
+ ERC_WOF_VFRT_REQ_FAILURE );
+
// After official error recorded, prevent this code
// from running from same setting of the var.
g_wof->vfrt_callback_error = 0;
@@ -169,7 +174,10 @@ void call_wof_main( void )
(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 );
+ set_clear_wof_disabled( CLEAR,
+ WOF_RC_PGPE_WOF_DISABLED,
+ ERC_WOF_PGPE_WOF_DISABLED );
+
}
// Make sure wof has not been disabled
@@ -177,7 +185,9 @@ void call_wof_main( void )
{
if( g_wof->pgpe_wof_disabled )
{
- set_clear_wof_disabled( SET, WOF_RC_PGPE_WOF_DISABLED );
+ set_clear_wof_disabled( SET,
+ WOF_RC_PGPE_WOF_DISABLED,
+ ERC_WOF_PGPE_WOF_DISABLED );
g_wof->pgpe_wof_disabled = 0;
}
break;
@@ -189,7 +199,9 @@ void call_wof_main( void )
if( L_pstate_protocol_off == 0 )
{
INTR_TRAC_ERR("WOF Disabled! Pstate Protocol off");
- set_clear_wof_disabled( SET, WOF_RC_PSTATE_PROTOCOL_OFF );
+ set_clear_wof_disabled( SET,
+ WOF_RC_PSTATE_PROTOCOL_OFF,
+ ERC_WOF_PSTATE_PROTOCOL_OFF );
L_pstate_protocol_off = 1;
}
// Since Pstates are off, break out
@@ -200,7 +212,9 @@ void call_wof_main( void )
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 );
+ set_clear_wof_disabled( CLEAR,
+ WOF_RC_PSTATE_PROTOCOL_OFF,
+ ERC_WOF_PSTATE_PROTOCOL_OFF );
L_pstate_protocol_off = 0;
}
}
@@ -232,7 +246,9 @@ void call_wof_main( void )
{
INTR_TRAC_ERR("WOF Disabled!"
" Init VFRT request timeout");
- set_clear_wof_disabled( SET, WOF_RC_VFRT_REQ_TIMEOUT);
+ set_clear_wof_disabled( SET,
+ WOF_RC_VFRT_REQ_TIMEOUT,
+ ERC_WOF_VFRT_REQ_TIMEOUT );
}
else if(L_vfrt_last_chance != 0)
{
@@ -267,7 +283,9 @@ void call_wof_main( void )
if( L_wof_control_last_chance && (!ignore_pgpe_error()) )
{
INTR_TRAC_ERR("WOF Disabled! Control req timeout(1)");
- set_clear_wof_disabled(SET, WOF_RC_CONTROL_REQ_TIMEOUT);
+ set_clear_wof_disabled(SET,
+ WOF_RC_CONTROL_REQ_TIMEOUT,
+ ERC_WOF_CONTROL_REQ_TIMEOUT);
}
else if(!L_wof_control_last_chance)
{
@@ -304,7 +322,9 @@ void call_wof_main( void )
if( L_wof_control_last_chance && (!ignore_pgpe_error()) )
{
INTR_TRAC_ERR("WOF Disabled! Control req timeout(2)");
- set_clear_wof_disabled(SET, WOF_RC_CONTROL_REQ_TIMEOUT);
+ set_clear_wof_disabled(SET,
+ WOF_RC_CONTROL_REQ_TIMEOUT,
+ ERC_WOF_CONTROL_REQ_TIMEOUT );
}
else if(!L_wof_control_last_chance)
{
@@ -351,7 +371,9 @@ void call_wof_main( void )
if(!ignore_pgpe_error())
{
INTR_TRAC_ERR("WOF Disabled! VFRT req timeout");
- set_clear_wof_disabled(SET,WOF_RC_VFRT_REQ_TIMEOUT);
+ set_clear_wof_disabled(SET,
+ WOF_RC_VFRT_REQ_TIMEOUT,
+ ERC_WOF_VFRT_REQ_TIMEOUT);
}
else
{
@@ -661,7 +683,9 @@ void send_vfrt_to_pgpe( uint32_t i_vfrt_main_mem_addr )
{
INTR_TRAC_ERR("VFRT Main Memory address NOT 128-byte aligned:"
" 0x%08x", i_vfrt_main_mem_addr);
- set_clear_wof_disabled(SET, WOF_RC_VFRT_ALIGNMENT_ERROR);
+ set_clear_wof_disabled(SET,
+ WOF_RC_VFRT_ALIGNMENT_ERROR,
+ ERC_WOF_VFRT_ALIGNMENT_ERROR);
break;
}
@@ -723,7 +747,9 @@ void send_vfrt_to_pgpe( uint32_t i_vfrt_main_mem_addr )
if( l_ssxrc != SSX_OK )
{
// Formally disable WOF
- set_clear_wof_disabled( SET, WOF_RC_IPC_FAILURE );
+ set_clear_wof_disabled( SET,
+ WOF_RC_IPC_FAILURE,
+ ERC_WOF_IPC_FAILURE );
return;
}
@@ -1047,12 +1073,12 @@ void calculate_nest_leakage( void )
*
* Return: The calculated effective capacitance
*/
-uint32_t calculate_effective_capacitance( uint32_t i_iAC,
- uint32_t i_voltage,
- uint32_t i_frequency )
+uint32_t calculate_effective_capacitance( uint32_t i_iAC_10ma,
+ uint32_t i_voltage_100uV,
+ uint32_t i_frequency_mhz )
{
// Prevent divide by zero
- if( (i_frequency == 0) || (i_voltage == 0) )
+ if( (i_frequency_mhz == 0) || (i_voltage_100uV == 0) )
{
// Return 0 causing caller to disable wof.
return 0;
@@ -1060,10 +1086,10 @@ uint32_t calculate_effective_capacitance( uint32_t i_iAC,
// Compute V^1.3 using a best-fit equation
// (V^1.3) = (21374 * (voltage in 100uV) - 50615296)>>10
- uint32_t v_exp_1_dot_3 = (21374 * i_voltage - 50615296)>>10;
+ uint32_t v_exp_1_dot_3 = (21374 * i_voltage_100uV - 50615296) >> 10;
// Compute I / (V^1.3)
- uint32_t I = i_iAC << 14; // * 16384
+ uint32_t I = i_iAC_10ma << 14; // * 16384
// Prevent divide by zero
if( v_exp_1_dot_3 == 0 )
@@ -1077,7 +1103,7 @@ uint32_t calculate_effective_capacitance( uint32_t i_iAC,
// Divide by frequency and return the final value.
// (I / (V^1.3 * F)) == I / V^1.3 /F
- return c_eff / i_frequency;
+ return c_eff / i_frequency_mhz;
}
/**
@@ -1106,7 +1132,10 @@ void calculate_ceff_ratio_vdn( void )
print_oppb();
// Return 0
g_wof->ceff_ratio_vdn = 0;
- set_clear_wof_disabled(SET, WOF_RC_DIVIDE_BY_ZERO_VDN);
+
+ set_clear_wof_disabled(SET,
+ WOF_RC_DIVIDE_BY_ZERO_VDN,
+ ERC_WOF_DIVIDE_BY_ZERO_VDN);
}
else
{
@@ -1179,7 +1208,10 @@ void calculate_ceff_ratio_vdd( void )
print_oppb();
// Return 0
g_wof->ceff_ratio_vdd = 0;
- set_clear_wof_disabled(SET, WOF_RC_DIVIDE_BY_ZERO_VDD);
+
+ set_clear_wof_disabled(SET,
+ WOF_RC_DIVIDE_BY_ZERO_VDD,
+ ERC_WOF_DIVIDE_BY_ZERO_VDD);
}
else
{
@@ -1355,9 +1387,12 @@ void read_sensor_data( void )
* Param[in]: i_bit_mask - The bit to set or clear. If setting a bit,
* this will be added to the errorlog created
* as userdata1
+ * Param[in]: i_ext_rc - The extended reason code to be added to
+ * error log
*/
void set_clear_wof_disabled( uint8_t i_action,
- uint32_t i_bit_mask )
+ uint32_t i_bit_mask,
+ uint16_t i_ext_rc )
{
// Keep track of whether an error has already been logged
static bool L_errorLogged = false;
@@ -1523,13 +1558,13 @@ void set_clear_wof_disabled( uint8_t i_action,
* @reasoncode WOF_DISABLED_RC
* @userdata1 current wof_disabled
* @userdata2 Bit requested to be set
- * @userdata4 OCC_NO_EXTENDED_RC
+ * @userdata4 Unique extended RC given by caller
* @devdesc WOF has been disabled due to an error
*/
l_errl = createErrl(
SET_CLEAR_WOF_DISABLED,
WOF_DISABLED_RC,
- OCC_NO_EXTENDED_RC,
+ i_ext_rc,
ERRL_SEV_UNRECOVERABLE,
NULL,
DEFAULT_TRACE_SIZE,
@@ -1668,9 +1703,10 @@ bool enable_wof( void )
{
INTR_TRAC_IMP("WOF is being enabled...");
uint32_t reasonCode = 0;
- bool result = true;
+ bool result = true;
uint32_t bit_to_set = 0;
- int rc = 0;
+ int rc = 0;
+ uint16_t erc = 0;
// Make sure IPC command is idle.
if(!async_request_is_idle( &G_wof_control_req.request ) )
{
@@ -1684,6 +1720,7 @@ bool enable_wof( void )
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;
+ erc = ERC_WOF_CONTROL_REQ_FAILURE;
bit_to_set = WOF_RC_CONTROL_REQ_FAILURE;
g_wof->control_ipc_rc = 0;
/** @
@@ -1719,6 +1756,7 @@ bool enable_wof( void )
* @devdesc OCC Failed to schedule a GPE job for enabling wof
*/
bit_to_set = WOF_RC_PGPE_WOF_DISABLED;
+ erc = ERC_WOF_PGPE_WOF_DISABLED;
reasonCode = GPE_REQUEST_SCHEDULE_FAILURE;
}
else
@@ -1733,7 +1771,7 @@ bool enable_wof( void )
errlHndl_t l_errl = createErrl(
ENABLE_WOF,
reasonCode,
- OCC_NO_EXTENDED_RC,
+ erc,
ERRL_SEV_PREDICTIVE,
NULL,
DEFAULT_TRACE_SIZE,
@@ -1741,7 +1779,7 @@ bool enable_wof( void )
0);
result = false;
- set_clear_wof_disabled( SET, bit_to_set );
+ set_clear_wof_disabled( SET, bit_to_set, erc );
// Commit the error
commitErrl( &l_errl );
@@ -1817,7 +1855,7 @@ void schedule_vfrt_request( void )
g_wof->gpe_req_rc );
// Formally disable wof
- set_clear_wof_disabled( SET, WOF_RC_IPC_FAILURE );
+ set_clear_wof_disabled( SET, WOF_RC_IPC_FAILURE, ERC_WOF_IPC_FAILURE );
// Reset the global return code after logging the error
g_wof->gpe_req_rc = 0;
diff --git a/src/occ_405/wof/wof.h b/src/occ_405/wof/wof.h
index fd61dcf..871f5e1 100644
--- a/src/occ_405/wof/wof.h
+++ b/src/occ_405/wof/wof.h
@@ -431,8 +431,9 @@ uint32_t calculate_effective_capacitance( uint32_t i_iAC,
void read_sensor_data( void );
-void set_clear_wof_disabled( uint8_t i_action,
- uint32_t i_bit_mask );
+void set_clear_wof_disabled( uint8_t i_action,
+ uint32_t i_bit_mask,
+ uint16_t i_ext_rc );
void disable_wof( void );
OpenPOWER on IntegriCloud