diff options
author | mbroyles <mbroyles@us.ibm.com> | 2017-07-12 08:49:44 -0500 |
---|---|---|
committer | Christopher J. Cain <cjcain@us.ibm.com> | 2017-07-25 14:49:58 -0400 |
commit | a84955963839b3a035dd339d3ba13e0acb88547a (patch) | |
tree | db8c5891abf3d1ea7b0ea839d8ce7b6c6b75f9cb /src/occ_405/rtls | |
parent | ca84830b6d1811a78c538f51bde34c269806f00a (diff) | |
download | talos-occ-a84955963839b3a035dd339d3ba13e0acb88547a.tar.gz talos-occ-a84955963839b3a035dd339d3ba13e0acb88547a.zip |
Increase RTL to 500us
Stop waiting for APSS data when detected complete but failed
Add history counts for GPEs not idle and APSS collection errors
Change-Id: I2bfaf36ee0b736a958fd41c1c2145f537fc883c5
RTC: 172963
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43052
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Andres A. Lugo-Reyes <aalugore@us.ibm.com>
Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com>
Diffstat (limited to 'src/occ_405/rtls')
-rwxr-xr-x | src/occ_405/rtls/rtls.c | 53 | ||||
-rwxr-xr-x | src/occ_405/rtls/rtls.h | 2 | ||||
-rwxr-xr-x | src/occ_405/rtls/rtls_tables.c | 6 |
3 files changed, 51 insertions, 10 deletions
diff --git a/src/occ_405/rtls/rtls.c b/src/occ_405/rtls/rtls.c index 6e6c02b..c2168d3 100755 --- a/src/occ_405/rtls/rtls.c +++ b/src/occ_405/rtls/rtls.c @@ -32,6 +32,7 @@ #include <errl.h> // Error logging #include "amec_external.h" #include <trac.h> // Traces +#include <sensor.h> //Macro creates a 'bridge' handler that converts the initial fast-mode to full //mode interrupt handler @@ -54,7 +55,7 @@ uint32_t G_current_tick = 0xFFFFFFFF; uint32_t G_mics_per_tick = HW_MICS_PER_TICK; // Number of micro-seconds to wait for APSS data collection to complete -uint32_t G_dcom_tx_apss_wait_time = HW_MICS_PER_TICK * 0.6; +uint32_t G_dcom_tx_apss_wait_time = HW_MICS_PER_TICK * 5 / 10; // The durations measured within the current tick fw_timing_t G_fw_timing; @@ -288,8 +289,8 @@ void rtl_do_tick( void *private, SsxIrqId irq, int priority ) task_t *l_task_ptr = NULL; // Pointer to the currently executing task errlHndl_t l_err = NULL; // Error handler const trace_descriptor_array_t* l_trace = NULL; // Temporary trace descriptor (replace this when tracing is implemented) - bool l_bad_id_reported = FALSE; // Has an invalid task ID already been reported? - + static bool L_bad_id_reported = FALSE; // Has an invalid task ID already been reported? + static bool L_error_logged = FALSE; // has an error for exceeding time time been logged? SsxMachineContext ctx; // Enter the protected context @@ -312,7 +313,8 @@ void rtl_do_tick( void *private, SsxIrqId irq, int priority ) // Index into the tick table to get a pointer to the tick sequence for the current tick. - l_taskid_ptr = G_tick_table[ (MAX_NUM_TICKS - 1) & CURRENT_TICK ]; + uint8_t l_tick = (MAX_NUM_TICKS - 1) & CURRENT_TICK; + l_taskid_ptr = G_tick_table[l_tick]; do { @@ -325,10 +327,10 @@ void rtl_do_tick( void *private, SsxIrqId irq, int priority ) if ( *l_taskid_ptr > TASK_END ) { // Invalid task ID - if ( ! l_bad_id_reported ) + if ( ! L_bad_id_reported ) { // First bad task ID we've seen this tick. Log an unrecoverable error. - RTLS_DBG("rtl_do_tick() - Invalid task ID" + TRAC_ERR("rtl_do_tick() - Invalid task ID" "taskId = 0x%x", *l_taskid_ptr ); /* @@ -360,7 +362,7 @@ void rtl_do_tick( void *private, SsxIrqId irq, int priority ) commitErrl( &l_err ); // Set our "bad ID reported" flag - l_bad_id_reported = TRUE; + L_bad_id_reported = TRUE; } // Under all conditions, move on to the next task ID. @@ -384,6 +386,43 @@ void rtl_do_tick( void *private, SsxIrqId irq, int priority ) // Save timing of RTL tick G_fw_timing.rtl_dur = DURATION_IN_US_UNTIL_NOW_FROM(l_start); + if(G_fw_timing.rtl_dur > MICS_PER_TICK) + { + // exceeded tick time!!! + TRAC_ERR("rtl_do_tick: tick seq %d took %dus AMEC slv/mst tasks took total of %dus", + l_tick, G_fw_timing.rtl_dur, G_fw_timing.ameint_dur); + sensor_t *l_gpe0_sensor = getSensorByGsid(GPEtickdur0); + sensor_t *l_gpe1_sensor = getSensorByGsid(GPEtickdur1); + + TRAC_ERR("GPE TIMES: GPE0 = %dus, max %dus GPE1 = %dus, max %dus", + l_gpe0_sensor->sample, l_gpe0_sensor->sample_max, l_gpe1_sensor->sample, l_gpe1_sensor->sample_max); + + if(!L_error_logged) + { + /* + * @errortype + * @moduleid RTLS_DO_TICK_MOD + * @reasoncode INTERNAL_FAILURE + * @userdata1 Tick time in us + * @userdata4 ERC_RTL_TIME_EXCEEDED + * @devdesc Exceeded RTL tick time + */ + l_err = createErrl( + RTLS_DO_TICK_MOD, //ModId + INTERNAL_FAILURE, //Reasoncode + ERC_RTL_TIME_EXCEEDED, //Extended reasoncode + ERRL_SEV_PREDICTIVE, //Severity + l_trace, //Trace Buf + DEFAULT_TRACE_SIZE, //Trace Size + G_fw_timing.rtl_dur, //Userdata1 + 0 //Userdata2 + ); + + // Commit error log + commitErrl( &l_err ); + L_error_logged = TRUE; + } + } RTLS_DBG("RTL Tick Duration: %d us\n",(int)G_fw_timing.rtl_dur); diff --git a/src/occ_405/rtls/rtls.h b/src/occ_405/rtls/rtls.h index ad2b5fa..6e248ec 100755 --- a/src/occ_405/rtls/rtls.h +++ b/src/occ_405/rtls/rtls.h @@ -111,7 +111,7 @@ typedef struct #define MICS_PER_TICK G_mics_per_tick // Number of micro-seconds per tick #define MAX_NUM_TICKS 16 // Number of entries in the global tick table (power of 2) // MICS_PER_TICK must be lower than 62ms to guarantee the tick table completes in < 1s (for health monitor) -#define HW_MICS_PER_TICK 250 +#define HW_MICS_PER_TICK 500 #define SIMICS_MICS_PER_TICK 20000 // slow down RTL to 20ms for Simics #define DCOM_TX_APSS_WAIT_TIME G_dcom_tx_apss_wait_time diff --git a/src/occ_405/rtls/rtls_tables.c b/src/occ_405/rtls/rtls_tables.c index b25eea6..aca6b88 100755 --- a/src/occ_405/rtls/rtls_tables.c +++ b/src/occ_405/rtls/rtls_tables.c @@ -155,10 +155,10 @@ const uint8_t G_tick1_seq[] = { TASK_ID_MEMORY_CONTROL, TASK_ID_CORE_DATA_CONTROL, TASK_ID_24X7, + TASK_ID_POKE_WDT, TASK_ID_DCOM_WAIT_4_MSTR, TASK_ID_DCOM_RX_INBX, TASK_ID_DCOM_RX_OUTBX, - TASK_ID_POKE_WDT, TASK_ID_DCOM_TX_OUTBX, TASK_ID_DCOM_TX_INBX, TASK_ID_AMEC_SLAVE, @@ -239,6 +239,7 @@ const uint8_t G_tick5_seq[] = { TASK_ID_MEMORY_CONTROL, TASK_ID_CORE_DATA_CONTROL, TASK_ID_24X7, + TASK_ID_POKE_WDT, TASK_ID_DCOM_WAIT_4_MSTR, TASK_ID_DCOM_RX_INBX, TASK_ID_DCOM_RX_OUTBX, @@ -321,10 +322,10 @@ const uint8_t G_tick9_seq[] = { TASK_ID_MEMORY_CONTROL, TASK_ID_CORE_DATA_CONTROL, TASK_ID_24X7, + TASK_ID_POKE_WDT, TASK_ID_DCOM_WAIT_4_MSTR, TASK_ID_DCOM_RX_INBX, TASK_ID_DCOM_RX_OUTBX, - TASK_ID_POKE_WDT, TASK_ID_DCOM_TX_OUTBX, TASK_ID_DCOM_TX_INBX, TASK_ID_AMEC_SLAVE, @@ -404,6 +405,7 @@ const uint8_t G_tick13_seq[] = { TASK_ID_MEMORY_CONTROL, TASK_ID_CORE_DATA_CONTROL, TASK_ID_24X7, + TASK_ID_POKE_WDT, TASK_ID_DCOM_WAIT_4_MSTR, TASK_ID_DCOM_RX_INBX, TASK_ID_DCOM_RX_OUTBX, |