From 3330dbdae60f0f6e36fc92fd97e46a771fd26865 Mon Sep 17 00:00:00 2001 From: Chris Cain Date: Wed, 20 Feb 2019 12:14:58 -0600 Subject: [PATCH] Proposed structure change for OCC Change-Id: I8d6afd28e96ed987333471a3f0317b4ff06a8671 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/72201 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Tested-by: Hostboot CI Reviewed-by: Christopher J. Cain Reviewed-by: Gregory S. Still Reviewed-by: Jennifer A. Stofer --- .../pmlib/include/pstate_pgpe_occ_api.h | 91 +++++++------------ 1 file changed, 35 insertions(+), 56 deletions(-) diff --git a/import/chips/p9/common/pmlib/include/pstate_pgpe_occ_api.h b/import/chips/p9/common/pmlib/include/pstate_pgpe_occ_api.h index 8a4c63db4..cdaff84c1 100644 --- a/import/chips/p9/common/pmlib/include/pstate_pgpe_occ_api.h +++ b/import/chips/p9/common/pmlib/include/pstate_pgpe_occ_api.h @@ -406,23 +406,24 @@ typedef struct } dw3; } pgpe_wof_values_t; +// ----------------------------------------------------------------------------- +// 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, +}; + +/// Structure of an individual error log entry typedef struct { - union - { - uint64_t value; - struct - { - uint32_t high_order; - uint32_t low_order; - } words; - struct - { - uint64_t magic_word : 32; //ELTC - uint64_t total_log_slots : 8; - uint64_t reserved : 24; - } fields; - } dw0; union { uint64_t value; @@ -436,41 +437,14 @@ typedef struct uint64_t errlog_id : 8; uint64_t errlog_src : 8; uint64_t errlog_len : 16; - uint64_t pgpe_critical_log_address : 32; + uint64_t errlog_addr : 32; } fields; - } dw1; - union - { - uint64_t value; - struct - { - uint32_t high_order; - uint32_t low_order; - } words; - struct - { - uint64_t errlog_id : 8; - uint64_t errlog_src : 8; - uint64_t errlog_len : 16; - uint64_t pgpe_info_log_address : 32; - } fields; - } dw2; - union - { - uint64_t value; - struct - { - uint32_t high_order; - uint32_t low_order; - } words; - struct - { - uint64_t errlog_id : 8; - uint64_t errlog_src : 8; - uint64_t errlog_len : 16; - uint64_t sgpe_critical_log_address : 32; - } fields; - } dw3; + } dw0; +} hcode_elog_entry_t; + +/// Full Error Log Table +typedef struct hcode_error_table +{ union { uint64_t value; @@ -481,13 +455,18 @@ typedef struct } words; struct { - uint64_t errlog_id : 8; - uint64_t errlog_src : 8; - uint64_t errlog_len : 16; - uint64_t sgpe_info_log_address : 32; + uint64_t magic_word : 32; //ELTC + uint64_t total_log_slots : 8; + uint64_t reserved : 24; } fields; - } dw4; -} errlog_idx_t; + } dw0; + + /// Array of error log entries (index with enum elog_entry_index) + hcode_elog_entry_t elog[MAX_HCODE_ELOG_ENTRIES]; +} hcode_error_table_t; + +// End Error Log Table +// ----------------------------------------------------------------------------- typedef struct { @@ -516,7 +495,7 @@ typedef struct uint64_t reserved1; /// Hcode Error Log Index - errlog_idx_t errlog_idx; + hcode_error_table_t errlog_idx; //Reserved uint64_t reserved2[24];