Skip to content

Commit

Permalink
Proposed structure change for OCC
Browse files Browse the repository at this point in the history
Change-Id: I8d6afd28e96ed987333471a3f0317b4ff06a8671
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/72201
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
  • Loading branch information
cjcain authored and op-jenkins committed Mar 26, 2019
1 parent b072dcd commit 3330dbd
Showing 1 changed file with 35 additions and 56 deletions.
91 changes: 35 additions & 56 deletions import/chips/p9/common/pmlib/include/pstate_pgpe_occ_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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
{
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 3330dbd

Please sign in to comment.