diff options
author | Chris Cain <cjcain@us.ibm.com> | 2019-07-29 13:46:01 -0500 |
---|---|---|
committer | Christopher J Cain <cjcain@us.ibm.com> | 2019-08-01 13:26:24 -0500 |
commit | b2300761b7ea588e1792529ad27c435e978f3376 (patch) | |
tree | d72312ac9526b00d94c04d03f4b4c78c75f75765 | |
parent | 1e8731f62fa73292197d85757987eebc055c5cc1 (diff) | |
download | talos-occ-b2300761b7ea588e1792529ad27c435e978f3376.tar.gz talos-occ-b2300761b7ea588e1792529ad27c435e978f3376.zip |
Pick up latest pgpe elog structure
Change-Id: I1c1578ff730dfd9a50ec1c0e94d7dcd4b600d78f
RTC: 209864
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/81272
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Douglas R Gilbert <dgilbert@us.ibm.com>
Reviewed-by: William A Bryan <wilbryan@us.ibm.com>
Reviewed-by: Christopher J Cain <cjcain@us.ibm.com>
-rw-r--r-- | src/include/pstate_pgpe_occ_api.h | 24 | ||||
-rwxr-xr-x | src/occ_405/errl/errl.h | 1 | ||||
-rwxr-xr-x | src/occ_405/main.c | 7 |
3 files changed, 13 insertions, 19 deletions
diff --git a/src/include/pstate_pgpe_occ_api.h b/src/include/pstate_pgpe_occ_api.h index a667854..b45b90d 100644 --- a/src/include/pstate_pgpe_occ_api.h +++ b/src/include/pstate_pgpe_occ_api.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER OnChipController Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2019 */ +/* Contributors Listed Below - COPYRIGHT 2015,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -41,7 +41,8 @@ extern "C" { #endif -#define HCODE_OCC_SHARED_MAGIC_NUMBER 0x4F505330 //OPS0 +#define HCODE_OCC_SHARED_MAGIC_NUMBER_OPS0 0x4F505330 //OPS0 +#define HCODE_OCC_SHARED_MAGIC_NUMBER_OPS1 0x4F505331 //OPS1 //--------------- // IPC from 405 @@ -409,17 +410,9 @@ typedef struct // ----------------------------------------------------------------------------- // Start Error Log Table -/// Maximum number of error log entries available -#define MAX_HCODE_ELOG_ENTRIES 4 - -/// Index into the array of error log entries -enum elog_entry_index -{ - ELOG_PGPE_CRITICAL = 0, - ELOG_PGPE_INFO = 1, - ELOG_SGPE_CRITICAL = 2, - ELOG_SGPE_INFO = 3, -}; +/// Maximum number of error log entries available, 1 UE per SPGE & PGPE +#define MAX_HCODE_ELOG_ENTRIES 2 +#define HCODE_ELOG_TABLE_MAGIC_WORD 0x454C5443 // "ELTC" /// Structure of an individual error log entry typedef struct @@ -461,7 +454,7 @@ typedef struct hcode_error_table } fields; } dw0; - /// Array of error log entries (index with enum elog_entry_index) + /// Array of error log entries hcode_elog_entry_t elog[MAX_HCODE_ELOG_ENTRIES]; } hcode_error_table_t; @@ -491,9 +484,6 @@ typedef struct //PGPE WOF Values pgpe_wof_values_t pgpe_wof_values; - //Reserved - uint64_t reserved1; - /// Hcode Error Log Index hcode_error_table_t errlog_idx; diff --git a/src/occ_405/errl/errl.h b/src/occ_405/errl/errl.h index e57dc0d..483ea38 100755 --- a/src/occ_405/errl/errl.h +++ b/src/occ_405/errl/errl.h @@ -294,7 +294,6 @@ extern errlHndl_t G_occErrSlots[ERRL_MAX_SLOTS]; // Shared SRAM offset to access the HCODE Error Log Table #define HCODE_ELOG_TABLE_SRAM_OFFSET 0x48 -#define HCODE_ELOG_TABLE_MAGIC_NUMBER 0x454C5443 // "ELTC" extern hcode_elog_entry_t *G_hcode_elog_table; extern uint32_t G_hcode_elog_table_slots; diff --git a/src/occ_405/main.c b/src/occ_405/main.c index 8ab0b93..1d5e8cc 100755 --- a/src/occ_405/main.c +++ b/src/occ_405/main.c @@ -555,9 +555,14 @@ bool read_pgpe_header(void) const uint32_t hcode_elog_table_addr = G_pgpe_header.shared_sram_addr + HCODE_ELOG_TABLE_SRAM_OFFSET; hcode_error_table_t hcode_etable; hcode_etable.dw0.value = in64(hcode_elog_table_addr); - if (HCODE_ELOG_TABLE_MAGIC_NUMBER == hcode_etable.dw0.fields.magic_word) + if (HCODE_ELOG_TABLE_MAGIC_WORD == hcode_etable.dw0.fields.magic_word) { G_hcode_elog_table_slots = hcode_etable.dw0.fields.total_log_slots; + if (G_hcode_elog_table_slots > MAX_HCODE_ELOG_ENTRIES) + { + MAIN_TRAC_ERR("read_pgpe_header: HCODE elog slots (%d) > MAX (%d)", G_hcode_elog_table_slots, MAX_HCODE_ELOG_ENTRIES); + G_hcode_elog_table_slots = MAX_HCODE_ELOG_ENTRIES; + } G_hcode_elog_table = (hcode_elog_entry_t*)(hcode_elog_table_addr + 8); } else |