summaryrefslogtreecommitdiffstats
path: root/src
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
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')
-rwxr-xr-xsrc/occ_405/cmdh/cmdh_fsp_cmds.c14
-rwxr-xr-xsrc/occ_405/cmdh/cmdh_fsp_cmds.h2
-rwxr-xr-xsrc/occ_405/cmdh/cmdh_service_codes.h5
-rw-r--r--src/occ_405/wof/wof.c21
-rw-r--r--src/occ_405/wof/wof.h4
5 files changed, 38 insertions, 8 deletions
diff --git a/src/occ_405/cmdh/cmdh_fsp_cmds.c b/src/occ_405/cmdh/cmdh_fsp_cmds.c
index 1cb97b5..5cc4d8d 100755
--- a/src/occ_405/cmdh/cmdh_fsp_cmds.c
+++ b/src/occ_405/cmdh/cmdh_fsp_cmds.c
@@ -1454,6 +1454,16 @@ void cmdh_dbug_dump_wof_data( const cmdh_fsp_cmd_t * i_cmd_ptr,
return;
}
+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 );
+ G_rsp_status = ERRL_RC_SUCCESS;
+}
+
+
+
// Function Specification
//
// Name: cmdh_dbug_allow_trace
@@ -1688,6 +1698,10 @@ void cmdh_dbug_cmd (const cmdh_fsp_cmd_t * i_cmd_ptr,
cmdh_dbug_dump_wof_data(i_cmd_ptr, o_rsp_ptr);
break;
+ case DBUG_FORCE_WOF_RESET:
+ cmdh_dbug_force_wof_reset(i_cmd_ptr, o_rsp_ptr);
+ break;
+
case DBUG_ALLOW_TRACE:
cmdh_dbug_allow_trace( i_cmd_ptr, o_rsp_ptr );
break;
diff --git a/src/occ_405/cmdh/cmdh_fsp_cmds.h b/src/occ_405/cmdh/cmdh_fsp_cmds.h
index 4405b1d..7f8ce21 100755
--- a/src/occ_405/cmdh/cmdh_fsp_cmds.h
+++ b/src/occ_405/cmdh/cmdh_fsp_cmds.h
@@ -375,7 +375,7 @@ typedef struct __attribute__ ((packed)) cmdh_reset_prep
typedef enum
{
DBUG_DUMP_WOF_DATA = 0x01,
- // free = 0x02
+ DBUG_FORCE_WOF_RESET = 0x02,
DBUG_GET_TRACE = 0x03,
DBUG_CLEAR_TRACE = 0x04,
DBUG_ALLOW_TRACE = 0x05,
diff --git a/src/occ_405/cmdh/cmdh_service_codes.h b/src/occ_405/cmdh/cmdh_service_codes.h
index ef90ca6..440fe20 100755
--- a/src/occ_405/cmdh/cmdh_service_codes.h
+++ b/src/occ_405/cmdh/cmdh_service_codes.h
@@ -1,11 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/occ/cmdh/cmdh_service_codes.h $ */
+/* $Source: src/occ_405/cmdh/cmdh_service_codes.h $ */
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2015 */
+/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -33,6 +33,7 @@ enum occCmdhModuleId
DATA_STORE_GENERIC_DATA = CMDH_COMP_ID | 0x00,
DATA_STORE_FREQ_DATA = CMDH_COMP_ID | 0x01,
DATA_STORE_PCAP_DATA = CMDH_COMP_ID | 0x02,
+ // 0x03 free
CMDH_GENERIC_CMD_FAILURE = CMDH_COMP_ID | 0x04,
DATA_STORE_SYS_DATA = CMDH_COMP_ID | 0x05,
DATA_STORE_APSS_DATA = CMDH_COMP_ID | 0x06,
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