summaryrefslogtreecommitdiffstats
path: root/src/occ_405/cmdh
diff options
context:
space:
mode:
authorAndres Lugo-Reyes <aalugore@us.ibm.com>2018-01-12 11:10:09 -0600
committerAndres A. Lugo-Reyes <aalugore@us.ibm.com>2018-01-19 17:13:09 -0500
commitc04d58bd549c17bece70aff18e6cb01af26feb26 (patch)
tree3a097e0e50154b0a98e5e91f9ad83e98e963c770 /src/occ_405/cmdh
parent00123c66a1d23b3a4fca98528989d4e35550fd3d (diff)
downloadtalos-occ-c04d58bd549c17bece70aff18e6cb01af26feb26.tar.gz
talos-occ-c04d58bd549c17bece70aff18e6cb01af26feb26.zip
WOF Phase 2: Use Vratio from PGPE
-Also enable WOF resets to be sent to ZZ platforms Change-Id: I7054c69fc1f287ea5184f7bf8576d198735481f6 RTC:184983 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/52272 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: Andres A. Lugo-Reyes <aalugore@us.ibm.com>
Diffstat (limited to 'src/occ_405/cmdh')
-rwxr-xr-xsrc/occ_405/cmdh/cmdh_fsp_cmds.c58
-rwxr-xr-xsrc/occ_405/cmdh/cmdh_fsp_cmds.h29
2 files changed, 83 insertions, 4 deletions
diff --git a/src/occ_405/cmdh/cmdh_fsp_cmds.c b/src/occ_405/cmdh/cmdh_fsp_cmds.c
index b1205f2..996b534 100755
--- a/src/occ_405/cmdh/cmdh_fsp_cmds.c
+++ b/src/occ_405/cmdh/cmdh_fsp_cmds.c
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2017 */
+/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -99,6 +99,7 @@ uint8_t G_mst_tunable_parameter_overwrite = 0;
//Reverse association of channel to function.
uint8_t G_apss_ch_to_function[MAX_APSS_ADC_CHANNELS] = {0};
+uint16_t G_allow_trace_flags = 0x0000;
ERRL_RC cmdh_poll_v20 (cmdh_fsp_rsp_t * i_rsp_ptr);
@@ -1413,6 +1414,57 @@ void cmdh_dbug_dump_wof_data( const cmdh_fsp_cmd_t * i_cmd_ptr,
// Function Specification
//
+// Name: cmdh_dbug_allow_trace
+//
+// Description: Set/Clear flags that allow/prevent certain traces to appear
+//
+// End Function Specification
+void cmdh_dbug_allow_trace( const cmdh_fsp_cmd_t * i_cmd_ptr,
+ cmdh_fsp_rsp_t * o_rsp_ptr )
+{
+ const cmdh_dbug_allow_trace_cmd_t * l_cmd_ptr =
+ (cmdh_dbug_allow_trace_cmd_t*)i_cmd_ptr;
+ cmdh_dbug_allow_trace_rsp_t * l_rsp_ptr =
+ (cmdh_dbug_allow_trace_rsp_t*)o_rsp_ptr;
+
+ uint8_t l_rc = ERRL_RC_SUCCESS;
+ uint16_t l_resp_data_length = sizeof(G_allow_trace_flags);
+
+ if((NULL == l_cmd_ptr) || (NULL == l_rsp_ptr))
+ {
+ l_rc = ERRL_RC_INTERNAL_FAIL;
+ }
+ else
+ {
+ if( l_cmd_ptr->action == SET )
+ {
+ G_allow_trace_flags |= l_cmd_ptr->trace_flags;
+ }
+ else
+ {
+ G_allow_trace_flags = 0x0000;
+ }
+ }
+
+ TRAC_INFO("DEBUG - allow_trace FLAGS 0x%04x Action: %d",
+ G_allow_trace_flags,
+ l_cmd_ptr->action);
+
+ // fill in response data length
+ if( l_rsp_ptr != NULL )
+ {
+ l_rsp_ptr->data_length[0] = CONVERT_UINT16_UINT8_HIGH(l_resp_data_length);
+ l_rsp_ptr->data_length[1] = CONVERT_UINT16_UINT8_LOW(l_resp_data_length);
+ }
+ G_rsp_status = l_rc;
+ return;
+}
+
+
+
+
+// Function Specification
+//
// Name: cmdh_dbug_clear_ame_sensor
//
// Description: Clears minimum and maximum fields in one sensor.
@@ -1594,6 +1646,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_ALLOW_TRACE:
+ cmdh_dbug_allow_trace( i_cmd_ptr, o_rsp_ptr );
+ break;
+
case DBUG_POKE:
case DBUG_SET_PEXE_EVENT:
case DBUG_DUMP_THEMAL:
diff --git a/src/occ_405/cmdh/cmdh_fsp_cmds.h b/src/occ_405/cmdh/cmdh_fsp_cmds.h
index ae85339..c318e7b 100755
--- a/src/occ_405/cmdh/cmdh_fsp_cmds.h
+++ b/src/occ_405/cmdh/cmdh_fsp_cmds.h
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2017 */
+/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -374,9 +374,10 @@ typedef struct __attribute__ ((packed)) cmdh_reset_prep
typedef enum
{
DBUG_DUMP_WOF_DATA = 0x01,
+ // free = 0x02
DBUG_GET_TRACE = 0x03,
DBUG_CLEAR_TRACE = 0x04,
- // free = 0x05
+ DBUG_ALLOW_TRACE = 0x05,
DBUG_SET_PEXE_EVENT = 0x06,
DBUG_GET_AME_SENSOR = 0x07,
DBUG_DUMP_GPU_TIMINGS = 0x08,
@@ -389,7 +390,11 @@ typedef enum
DBUG_MEM_PWR_CTL = 0x0F,
DBUG_PERFCOUNT = 0x10,
DBUG_TEST_INTF = 0x11,
+ // free = 0x12
+ // free = 0x13
DBUG_INJECT_ERRL = 0x14,
+ // free = 0x15
+ // free = 0x16
DBUG_GPIO_READ = 0x17,
DBUG_FSP_ATTN = 0x18,
DBUG_CALCULATE_MAX_DIFF = 0x19,
@@ -398,7 +403,7 @@ typedef enum
DBUG_INJECT_ERR = 0x1C,
DBUG_VERIFY_V_F = 0x1D,
DBUG_DUMP_PPM_DATA = 0x1E,
-
+ // free = 0x1F
DBUG_FLUSH_DCACHE = 0x20,
DBUG_INVALIDATE_DCACHE = 0x21,
DBUG_CENTAUR_SENSOR_CACHE = 0x22,
@@ -574,6 +579,24 @@ typedef struct __attribute__ ((packed))
uint32_t wof_disabled;
uint8_t checksum[CMDH_FSP_CHECKSUM_SIZE];
} cmdh_dbug_wof_control_rsp_t;
+
+// DBUG_ALLOW_TRACE command struct
+typedef struct __attribute__ ((packed))
+{
+ struct cmdh_fsp_cmd_header;
+ uint8_t sub_cmd;
+ uint8_t action;
+ uint16_t trace_flags;
+}cmdh_dbug_allow_trace_cmd_t;
+
+// DBUG_ALLOW_TRACE response struct
+typedef struct __attribute__ ((packed))
+{
+ struct cmdh_fsp_rsp_header;
+ uint16_t trace_flags;
+ uint8_t checksum[CMDH_FSP_CHECKSUM_SIZE];
+}cmdh_dbug_allow_trace_rsp_t;
+
//---------------------------------------------------------
// Tunable Parameter Command
//---------------------------------------------------------
OpenPOWER on IntegriCloud