summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorRoland Veloz <rveloz@us.ibm.com>2019-08-13 19:47:39 -0500
committerDaniel M Crowell <dcrowell@us.ibm.com>2019-08-28 16:50:27 -0500
commit153dcaa15050071e25b0177618ad0c9d829606e2 (patch)
treeaf4bdfe19e16b08287f1751d79b701fe7e22e362 /src/include
parentf609640a7cc5d635e1b22ed70e2d9d4a709b54b2 (diff)
downloadtalos-hostboot-153dcaa15050071e25b0177618ad0c9d829606e2.tar.gz
talos-hostboot-153dcaa15050071e25b0177618ad0c9d829606e2.zip
Implement an HBRT interface to log a gard event from PHYP/OPAL
Added a firmware notify interface, gard_event_t, to accept a gard event message, from PHYP/OPAL, to log that event. Change-Id: I9bcf684f0850c9a07ab7d46635aa07a2c1e9917c RTC: 210201 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/82199 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Matt Derksen <mderkse1@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R Geddes <crgeddes@us.ibm.com> Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include')
-rwxr-xr-xsrc/include/runtime/README.md9
-rw-r--r--src/include/runtime/interface.h58
-rw-r--r--src/include/usr/runtime/runtime_reasoncodes.H2
3 files changed, 55 insertions, 14 deletions
diff --git a/src/include/runtime/README.md b/src/include/runtime/README.md
index 8a4e7298a..68b7382be 100755
--- a/src/include/runtime/README.md
+++ b/src/include/runtime/README.md
@@ -2,7 +2,7 @@
How to create an HBRT to FW request message interface
0) If passing an HBRT to FSP via MBOX or receiving a firmware notify message,
then use instruction 'generic_hbrt_fsp_message.H::GenericFspMboxMessage_t'
- below.
+ and/or 'How to create an HBRT Firmware Notify message' below.
1) The biggest part will be defining the interface. Inspect the current
interfaces (req_hcode_update, error_log, etc) for inspiration.
2) Once an interface has been designed, add it to the anonymous
@@ -35,13 +35,14 @@ How to create an HBRT to FW request message interface
1) The biggest part will be defining the interface. Inspect the current
interfaces (AttributeSetter_t, SingleScomOpHbrtFspData_t,
TargetDeconfigHbrtFspData_t, etc) for inspiration.
- 2) Once an interface has been designed, add the structure to this file
- with the other interfaces.
+ 2) Once an interface has been designed, add the structure to the file,
+ generic_hbrt_fsp_message.H, among the other interfaces.
3) Create an MBOX message queue enum for the interface and add to:
/hostboot/src/include/usr/mbox/mbox_queues.H::queue_id_t
see current message queues for example
4) Add a new message type for the interface to:
- enum generic_hbrt_fsp_message.H::GENERIC_FSP_MBOX_MESSAGE_MSG_TYPE.
+ enum GenericFspMboxMessage_t::GENERIC_FSP_MBOX_MESSAGE_MSG_TYPE in
+ file generic_hbrt_fsp_message.H.
5) How to use the new interface to pass a message
a) Make sure g_hostInterfaces and g_hostInterfaces->firmware_request
are not NULL.
diff --git a/src/include/runtime/interface.h b/src/include/runtime/interface.h
index 9a0cb478e..152226d54 100644
--- a/src/include/runtime/interface.h
+++ b/src/include/runtime/interface.h
@@ -552,17 +552,18 @@ typedef struct hostInterfaces
enum // hbrt_fw_msg::io_type the struct associated with io_type
{
- HBRT_FW_MSG_TYPE_REQ_NOP = 0,
- HBRT_FW_MSG_TYPE_RESP_NOP = 1, // struct resp_generic
- HBRT_FW_MSG_TYPE_RESP_GENERIC = 2, // struct resp_generic
- HBRT_FW_MSG_TYPE_REQ_HCODE_UPDATE = 3, // struct req_hcode_update
- HBRT_FW_MSG_HBRT_FSP_REQ = 4, // struct GenericFspMboxMessage_t
- HBRT_FW_MSG_TYPE_ERROR_LOG = 5, // struct error_log
- HBRT_FW_MSG_HBRT_FSP_RESP = 6, // struct GenericFspMboxMessage_t
- HBRT_FW_MSG_TYPE_I2C_LOCK = 7, // struct req_i2c_lock
- HBRT_FW_MSG_TYPE_SBE_STATE = 8, // struct sbe_state
- HBRT_FW_MSG_TYPE_NVDIMM_PROTECTION = 9, // struct nvdimm_protection_state
+ HBRT_FW_MSG_TYPE_REQ_NOP = 0,
+ HBRT_FW_MSG_TYPE_RESP_NOP = 1, // struct resp_generic
+ HBRT_FW_MSG_TYPE_RESP_GENERIC = 2, // struct resp_generic
+ HBRT_FW_MSG_TYPE_REQ_HCODE_UPDATE = 3, // struct req_hcode_update
+ HBRT_FW_MSG_HBRT_FSP_REQ = 4, // struct GenericFspMboxMessage_t
+ HBRT_FW_MSG_TYPE_ERROR_LOG = 5, // struct error_log
+ HBRT_FW_MSG_HBRT_FSP_RESP = 6, // struct GenericFspMboxMessage_t
+ HBRT_FW_MSG_TYPE_I2C_LOCK = 7, // struct req_i2c_lock
+ HBRT_FW_MSG_TYPE_SBE_STATE = 8, // struct sbe_state
+ HBRT_FW_MSG_TYPE_NVDIMM_PROTECTION = 9, // struct nvdimm_protection_state
HBRT_FW_MSG_TYPE_NVDIMM_OPERATION = 10, // struct nvdimm_operation_t
+ HBRT_FW_MSG_TYPE_GARD_EVENT = 11, // struct gard_event_t
};
// NVDIMM protection state enum
@@ -611,6 +612,39 @@ typedef struct hostInterfaces
// see @note associated with NVDIMM_Op_t above
} __attribute__ ((packed));
+ // Gard event error type
+ // @note This needs to stay in sync with the FSP Mailbox specification for
+ // command : Gard-able Error Detected - cmd 0xCE, s/c 0x63, mod 01
+ enum GARD_ERROR_t: uint32_t
+ {
+ HBRT_GARD_ERROR_UNKNOWN = 0x0000,
+ HBRT_GARD_ERROR_COMPUTATION_TEST_FAILURE = 0x0001,
+ HBRT_GARD_ERROR_SLB = 0x0002,
+ HBRT_GARD_ERROR_CHIP_TOD_FAILURE = 0x0003,
+ HBRT_GARD_ERROR_TIMEFAC_FAILURE = 0x0004,
+ HBRT_GARD_ERROR_PROC_RECOVERY_THRESHOLD = 0x0005,
+ HBRT_GARD_ERROR_NX = 0x0008,
+ HBRT_GARD_ERROR_SLW = 0x0009,
+ HBRT_GARD_ERROR_CAPP_UNIT = 0x000A,
+
+ // Mark the end of the gard error types.
+ // This is not valid, just a marker
+ HBRT_GARD_ERROR_LAST,
+ };
+
+ // Gard event (PHYP/OPAL -> HBRT)
+ struct gard_event_t
+ {
+ GARD_ERROR_t i_error_type; // Gard event error type enum
+ uint32_t i_procId; // Processor ID for
+ // error types 0x0001 to 0x0005
+ // Chip ID for
+ // error types 0x0008 to 0x000A
+ uint32_t i_plid; // Platform log identifier
+ uint16_t i_sub_unit_mask; // Currently not being used
+ uint16_t i_recovery_level; // Currently not being used
+ } __attribute__ ((packed));
+
struct hbrt_fw_msg // define struct hbrt_fw_msg
{
hbrt_fw_msg() { req_hcode_update = { 0 }; }; // ctor
@@ -685,6 +719,10 @@ typedef struct hostInterfaces
// io_type set to HBRT_FW_MSG_TYPE_NVDIMM_OPERATION
struct nvdimm_operation_t nvdimm_operation;
+ // This struct is sent from PHYP/OPAL to HBRT with
+ // io_type set to HBRT_FW_MSG_TYPE_GARD_EVENT
+ struct gard_event_t gard_event;
+
// This struct is sent from HBRT with
// io_type set to HBRT_FW_MSG_HBRT_FSP_REQ or
// HBRT_FW_MSG_HBRT_FSP_RESP
diff --git a/src/include/usr/runtime/runtime_reasoncodes.H b/src/include/usr/runtime/runtime_reasoncodes.H
index 5cfdce5c2..b54f29751 100644
--- a/src/include/usr/runtime/runtime_reasoncodes.H
+++ b/src/include/usr/runtime/runtime_reasoncodes.H
@@ -147,6 +147,8 @@ namespace RUNTIME
RC_NO_SPACE_FOR_ATTRIBUTE_SERIALIZATION = RUNTIME_COMP_ID | 0x47,
RC_CANNOT_MAKE_ATTRIBUTE = RUNTIME_COMP_ID | 0x48,
RT_NO_OMI_TARGET_FOUND = RUNTIME_COMP_ID | 0x49,
+ RC_LOG_GARD_EVENT_UNKNOWN_ERROR_TYPE = RUNTIME_COMP_ID | 0x4A,
+ RC_LOG_GARD_EVENT = RUNTIME_COMP_ID | 0x4B,
};
enum UserDetailsTypes
OpenPOWER on IntegriCloud