Skip to content

Commit

Permalink
Pick up latest pgpe elog structure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
cjcain committed Aug 1, 2019
1 parent 1e8731f commit b230076
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 19 deletions.
24 changes: 7 additions & 17 deletions src/include/pstate_pgpe_occ_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* Contributors Listed Below - COPYRIGHT 2015,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down
1 change: 0 additions & 1 deletion src/occ_405/errl/errl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
7 changes: 6 additions & 1 deletion src/occ_405/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b230076

Please sign in to comment.