diff options
Diffstat (limited to 'src/include/runtime')
-rwxr-xr-x | src/include/runtime/README.md | 107 | ||||
-rw-r--r-- | src/include/runtime/generic_hbrt_fsp_message.H | 70 | ||||
-rw-r--r-- | src/include/runtime/hbrt_utilities.H | 90 | ||||
-rw-r--r-- | src/include/runtime/interface.h | 131 |
4 files changed, 311 insertions, 87 deletions
diff --git a/src/include/runtime/README.md b/src/include/runtime/README.md new file mode 100755 index 000000000..68b7382be --- /dev/null +++ b/src/include/runtime/README.md @@ -0,0 +1,107 @@ +# interface.h::hostInterfaces::hbrt_fw_msg +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' + 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 + hbrt_fw_msg::union, among the other interfaces. + 3) Append a new hbrt_fw_msg::io_type, that will be used to + identify the interface. + 4) How to use the new interface to pass a message + a) Make sure 'g_hostInterfaces' and 'g_hostInterfaces->firmware_request' + are not NULL. + b) Create the firmware_request request struct (hostInterfaces::hbrt_fw_msg) + to send data. + c) Populate the firmware_request request struct with data. + b) Create the firmware_request response struct (hostInterfaces::hbrt_fw_msg) + to retrieve data. 'Zero' it out. Currently, this appears to be not + used, but is needed for the firmware request call. + d) Make the firmware_request call via method 'firmware_request_helper' + Examples: + ~/src/usr/sbeio/runtime/sbeio_vital_attn.C::vital_attn_inform_opal + ~/src/usr/isteps/nvdimm/runtime/nvdimm_rt.C::notifyNvdimmProtectionChange + ~/src/usr/isteps/pm/runtime/rt_pm.C::hcode_update + ~/src/usr/errl/runtime/rt_errlmanager.C::sendMboxMsg + 5) Update /hostboot/src/usr/util/runtime/rt_fwreq_helper.C::firmware_request_helper, + to capture data from the request if an error occurs. Capture data in the + TWO switch statements 'switch (l_req_fw_msg->io_type)'. Look at others + for examples. + +# generic_hbrt_fsp_message.H::GenericFspMboxMessage_t +# How to create an HBRT Generic FSP Firmware request + Firmware request: + 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 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 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. + b) Determine size of data. It could be as simple as the size of the + structure itself. + c) Use createGenericFspMsg to create the messages for you. + c) Populate the firmware_request request struct with data. + d) Make the firmware_request call via method + firmware_request_helper + Examples: + ~/src/usr/hwas/hwasPlatDeconfigGard.C::platPostDeconfigureTarget + ~/src/usr/fsiscom/runtime/rt_fsiscom.C::sendScomOpToFsp + ~/src/usr/fsiscom/runtime/rt_fsiscom.C::sendMultiScomReadToFsp + ~/src/usr/hwas/hwasPlatDeconfigGard.C::DeconfigGard::platPostDeconfigureTarget + +# How to create an HBRT Firmware Notify message + Firmware notify: + 1) The biggest part will be defining the interface. Inspect the current + interfaces (sbeRetryReqData_t, HbrtAttrSyncData_t, etc) for inspiration. + 2) Once an interface has been designed, add the structure to this file + with the other interfaces. + 3) Since this is a message sent from the HWSV team, you will need for + them to provide the message queue and message type, once you have + this info + a) Add the message queue to: + /hostboot/src/include/usr/mbox/mbox_queues.H::queue_id_t + b) Add the message type to: + enum generic_hbrt_fsp_message.H::GENERIC_FSP_MBOX_MESSAGE_MSG_TYPE + 4) Create a method to process the notify call in file: + ~/src/usr/util/runtime/rt_fwnotify.C. This method is where the + interface in step 1 will be used. + Examples: + ~/src/usr/util/runtime/rt_fwnotify.C::sbeAttemptRecovery + ~/src/usr/util/runtime/rt_fwnotify.C::occActiveNotification + ~/src/usr/util/runtime/rt_fwnotify.C::attrSyncRequest + 5) Update the case statement 'switch (l_hbrt_fw_msg->io_type)' found in + method ~/src/usr/util/runtime/rt_fwnotify.C::firmware_notify to + call method created in step 4. + +# Integration testing the Firmware Request/Notify Message + This is not a true integration test but a verification that the data is + being sent, via the firmware request, in the format that the caller + intended. Ensuring that the data is in the correct format and is correct + in of itself. + + Add a test case to the file: + ~/src/usr/isteps/pm/runtime/test/firmwareRequestTest.H + This is where the message will being sent via the + hostInterfaces::firmware_request(...) method. Here, is where you will + create a unique test case for your interface. Follow the examples in + this file. There are plenty of examples. + + Add stub test code to the file/method: + ~/src/usr/testcore/rtloader/loader.H::rt_firmware_request(...) + This is where the message will be received and can be tested for + correctness. Follow the examples in this file. There are plenty of + examples. + + + + + diff --git a/src/include/runtime/generic_hbrt_fsp_message.H b/src/include/runtime/generic_hbrt_fsp_message.H index 3d2f48c0a..f3d252ae2 100644 --- a/src/include/runtime/generic_hbrt_fsp_message.H +++ b/src/include/runtime/generic_hbrt_fsp_message.H @@ -30,10 +30,14 @@ /** @file generic_hbrt_fsp_message.H + * * @brief A generic structure for passing data * * This file has a generic struct to be used by the * FSP/HWSV team to send and receive data. + * + * @note See README.md file on how to create an HBRT to FW + * request/notify message interface */ // Sentinel value for bad SCOM reads @@ -54,12 +58,42 @@ private: }; +// Latest attribute setter (struct AttributeSetter_t) version +enum ATTRIBUTE_SETTER_VERSION: uint8_t +{ + ATTRIBUTE_STRUCT_VERSION_FIRST = 0x01, + ATTRIBUTE_STRUCT_VERSION_LATEST = ATTRIBUTE_STRUCT_VERSION_FIRST, +}; + +/** + * A useful struct to serialize/deserialize the Attributes data + * from GenericFspMboxMessage_t::data. + */ +struct AttributeSetter_t // a firmware_request call +{ + ATTRIBUTE_SETTER_VERSION iv_structVersion;// latest attribute setter version + uint8_t iv_reserved; + uint16_t iv_numAttributes; // number of attributes being sent + uint8_t iv_attrData[]; // points to a stream of + // AttributeTank::Attribute structures + // A method to set the local vars to a default state + void initialize() + { + iv_structVersion = ATTRIBUTE_STRUCT_VERSION_LATEST; + iv_reserved = 0; + iv_numAttributes = 0; + }; +} PACKED ; + /** * A useful struct to pack/access the HUID and HWAS state * from the GenericFspMboxMessage_t.data. * The HUID will be in the first 4 bytes followed by the HWAS state. + * + * @note message queue = MBOX::FSP_TARG_DECONFIG_MSGQ; + * message type = MSG_DECONFIG_TARGET */ -struct TargetDeconfigHbrtFspData_t +struct TargetDeconfigHbrtFspData_t // a firmware_request call { uint32_t huid; TARGETING::HwasState hwasState; @@ -70,8 +104,11 @@ struct TargetDeconfigHbrtFspData_t * This struct contains the message-specific data for * MSG_SINGLE_SCOM_OP calls to the FSP. * It shows the format of GenericFspMboxMessage_t.data. + * + * @note message queue = MBOX::FSP_SCOM_OPS_MSGQ + * message type = MSG_SINGLE_SCOM_OP */ -struct SingleScomOpHbrtFspData_t +struct SingleScomOpHbrtFspData_t // a firmware_request call { uint8_t scom_op; // DeviceFW::READ, DeviceFW::WRITE uint32_t huid; // hardware target @@ -85,8 +122,11 @@ struct SingleScomOpHbrtFspData_t * This struct contains the message-specific data for * MSG_MULTI_SCOM_OP calls to the FSP. * It shows the format of GenericFspMboxMessage_t.data. + * + * @note message queue = MBOX::FSP_SCOM_OPS_MSGQ + * message type = MSG_MULTI_SCOM_OP */ -struct MultiScomReadHbrtFspData_t +struct MultiScomReadHbrtFspData_t // a firmware_request call { uint32_t huid; // hardware target uint8_t scom_num; // number of SCOMs to read @@ -107,8 +147,11 @@ struct MultiScomReadHbrtFspData_t /** * A useful struct to access the PLID from GenericFspMboxMessage_t.data * in the case where the FSP is requesting Hostboot to restart a SBE + * + * @note message queue = MBOX::FSP_SCOM_OPS_MSGQ + * message type = MSG_SBE_ERROR */ -struct SbeRetryReqData_t +struct SbeRetryReqData_t // a firmware_notify call { uint32_t huid; uint32_t plid; @@ -122,8 +165,10 @@ struct SbeRetryReqData_t * The HUID will be the first 4 bytes followed by a 4-byte attribute ID, * then a 4-byte size of attribute data, and finally the attribute's data * + * @note message queue = MBOX::HB_ATTR_SYNC_MSGQ + * message type = MSG_ATTR_SYNC_REQUEST */ -struct HbrtAttrSyncData_t +struct HbrtAttrSyncData_t // a firmware_notify call { // HUID of target on which we want to update the attribute uint32_t huid; @@ -187,14 +232,15 @@ struct GenericFspMboxMessage_t MSG_TOD_BACKUP_RESET = 0x0001, MSG_TOD_BACKUP_RESET_INFORM_PHYP = 0x0002, MSG_TOD_TOPOLOGY_DATA = 0x0003, - MSG_DECONFIG_TARGET = 0x0004, - MSG_SINGLE_SCOM_OP = 0x0005, - MSG_MULTI_SCOM_OP = 0x0006, - MSG_ATTR_SYNC_REQUEST = 0x000000A5, + MSG_DECONFIG_TARGET = 0x0004, // for TargetDeconfigHbrtFspData_t + MSG_SINGLE_SCOM_OP = 0x0005, // for SingleScomOpHbrtFspData_t + MSG_MULTI_SCOM_OP = 0x0006, // for MultiScomReadHbrtFspData_t + MSG_ATTR_WRITE_OP = 0x0007, // for AttributeSetter_t + MSG_ATTR_SYNC_REQUEST = 0x000000A5, // for HbrtAttrSyncData_t MSG_OCC_ACTIVE = 0x000000A6, - MSG_SBE_ERROR = 0x000000D4, - MSG_SBE_RECOVERY_SUCCESS = 0x000000D5, - MSG_SBE_RECOVERY_FAILED = 0x000000D6, + MSG_SBE_ERROR = 0x000000D4, // for SbeRetryReqData_t + MSG_SBE_RECOVERY_SUCCESS = 0x000000D5, // associated with SbeRetryReqData_t + MSG_SBE_RECOVERY_FAILED = 0x000000D6, // associated with SbeRetryReqData_t }; /** diff --git a/src/include/runtime/hbrt_utilities.H b/src/include/runtime/hbrt_utilities.H index 649677422..2ee2172df 100644 --- a/src/include/runtime/hbrt_utilities.H +++ b/src/include/runtime/hbrt_utilities.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2017,2018 */ +/* Contributors Listed Below - COPYRIGHT 2017,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -29,7 +29,16 @@ #define HBRT_TRACE_NAME "HBRT" -#include "interface.h" +extern trace_desc_t *g_trac_runtime; + +#include <vector> + +#include "interface.h" // hostInterfaces +#include "generic_hbrt_fsp_message.H" // GenericFspMboxMessage_t, AttributeSetter_t +#include "targeting/common/attributeTank.H" // TARGETING::AttributeTank::Attribute +#include <initservice/initserviceif.H> // INITSERVICE +#include "util/runtime/rt_fwreq_helper.H" // firmware_request_helper +#include "runtime/runtime_reasoncodes.H" // MOD_XXX and RC_XXX /** @file hbrt_utilities.H * @brief A file to put HBRT Interface utilities @@ -54,9 +63,9 @@ * to newly created data.) * * @post The request/response messages point to a valid struct, - * the request/response message size are equal to each other - * and contain the size of the request/response messages - * respectively upon a successful call else all the output + * the request/response messages' size are equal to each other, request + * message is initalized (data size is set) and response message is + * zeroed out, upon a successful call else all the output * parameters will either be NULL or 0 based on type. * * @note Use this function iff hbrt_fw_msg::io_type is of type @@ -65,7 +74,7 @@ * @note Caller is responsible for deleting (use delete []) the * allocated memory * - * @param[in] i_fspReqPayloadSize The size of the payload that will + * @param[in] i_fspReqPayloadSize The size of the payload that will * populate GenericFspMboxMessage_t::data * @param[out] o_fspMsgSize Return the size of the * GenericFspMboxMessage_t, adjusted to @@ -76,66 +85,23 @@ * will be equal to the request msg size * @param[out] o_responseMsg The allocated response message (not * NULL), zeroed out + * @return true if NO issue allocating memory for request/response messages, + * else false */ -void createGenericFspMsg(uint32_t i_fspReqPayloadSize, - uint32_t &o_fspMsgSize, - uint64_t &o_requestMsgSize, - hostInterfaces::hbrt_fw_msg* &o_requestMsg, - uint64_t &o_responseMsgSize, - hostInterfaces::hbrt_fw_msg* &o_responseMsg) -{ - // Do some quick initialization of the output data - o_fspMsgSize = o_requestMsgSize = o_responseMsgSize = 0; - o_requestMsg = o_responseMsg = nullptr; - - // Calculate the total size of the Generic FSP Message. - o_fspMsgSize = GENERIC_FSP_MBOX_MESSAGE_BASE_SIZE + - i_fspReqPayloadSize; - - // The total Generic FSP Message size must be at a minimum the - // size of the FSP generic message (sizeof(GenericFspMboxMessage_t)) - if (o_fspMsgSize < sizeof(GenericFspMboxMessage_t)) - { - o_fspMsgSize = sizeof(GenericFspMboxMessage_t); - } +bool createGenericFspMsg(uint32_t i_fspReqPayloadSize, + uint32_t &o_fspMsgSize, + uint64_t &o_requestMsgSize, + hostInterfaces::hbrt_fw_msg* &o_requestMsg, + uint64_t &o_responseMsgSize, + hostInterfaces::hbrt_fw_msg* &o_responseMsg); - // Calculate the total size of the hbrt_fw_msgs which - // means only adding hostInterfaces::HBRT_FW_MSG_BASE_SIZE to - // the previous calculated Generic FSP Message size. - o_requestMsgSize = o_responseMsgSize = - hostInterfaces::HBRT_FW_MSG_BASE_SIZE + o_fspMsgSize; - // Create the hbrt_fw_msgs - o_responseMsg = reinterpret_cast<hostInterfaces::hbrt_fw_msg *> - (new uint8_t[o_responseMsgSize]); - o_requestMsg = reinterpret_cast<hostInterfaces::hbrt_fw_msg *> - (new uint8_t[o_requestMsgSize]); - - // If anyone of these two message's memory can't be allocated, then - // delete both messages (in case one did allocate memory), set both - // messages to NULL pointers and set their respective sizes to zero. - if (!o_responseMsg || !o_requestMsg) - { - // OK to delete a NULL pointer if it happens - delete []o_responseMsg; - delete []o_requestMsg; - - // Return output data zeroed out - o_responseMsg = o_requestMsg = nullptr; - o_fspMsgSize = o_requestMsgSize = o_responseMsgSize = 0; - } - else - { - // Initialize/zero out hbrt_fw_msgs - o_requestMsg->generic_msg.initialize(); - memset(o_responseMsg, 0, o_responseMsgSize); +/** + * @brief Serializes a list of Attributes to be sent to FSP + */ +errlHndl_t sendAttributes(const std::vector<TARGETING::AttributeTank::Attribute>& + i_attributeList); - // We can at least set these parameters based on current usage - o_requestMsg->io_type = hostInterfaces::HBRT_FW_MSG_HBRT_FSP_REQ; - o_requestMsg->generic_msg.dataSize = o_fspMsgSize; - o_requestMsg->generic_msg.__req = GenericFspMboxMessage_t::REQUEST; - } -} // end createGenericFspMsg #endif //__HOSTBOOT_RUNTIME_INTERFACE_VERSION_ONLY #endif // __RUNTIME__UTILITIES_H diff --git a/src/include/runtime/interface.h b/src/include/runtime/interface.h index cd6d0e23a..6304ec6ba 100644 --- a/src/include/runtime/interface.h +++ b/src/include/runtime/interface.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2019 */ +/* Contributors Listed Below - COPYRIGHT 2013,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -193,6 +193,10 @@ enum MemoryError_t /* Defined Return Codes for wakeup() */ #define HBRT_RC_WAKEUP_INVALID_ON_CORE_XSTOP -12289 /* -0x3001 */ +/* Define a const, for hostInterfaces::nvdimm_operation_t::procId, + * that will flag when to apply the NVDIMM operation(s) to all NVDIMMs + */ +const uint64_t HBRT_NVDIMM_OPERATION_APPLY_TO_ALL_NVDIMMS = 0xFFFFFFFFFFFFFFFF; /** @typedef hostInterfaces_t * @brief Interfaces provided by the underlying environment (ex. Sapphire). @@ -541,19 +545,25 @@ typedef struct hostInterfaces /** * @brief Structure to be sent and received in the * firmware_request call + * + * @note see README.md file on how to create an HBRT to FW + * request message interface */ - enum + + 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, - HBRT_FW_MSG_TYPE_RESP_GENERIC = 2, - HBRT_FW_MSG_TYPE_REQ_HCODE_UPDATE = 3, - HBRT_FW_MSG_HBRT_FSP_REQ = 4, - HBRT_FW_MSG_TYPE_ERROR_LOG = 5, - HBRT_FW_MSG_HBRT_FSP_RESP = 6, - HBRT_FW_MSG_TYPE_I2C_LOCK = 7, - HBRT_FW_MSG_TYPE_SBE_STATE = 8, - HBRT_FW_MSG_TYPE_NVDIMM_PROTECTION = 9, + 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 @@ -563,6 +573,88 @@ typedef struct hostInterfaces HBRT_FW_NVDIMM_PROTECTED = 1 }; + // NVDIMM valid operations + // @note Multiple operations can be triggered at the same time using + // a single NVDIMM operation call. Having said that, operation + // combinations should be sensical. Nonsensical operations will + // error out. + enum NVDIMM_Op_t: uint16_t + { + /// The following operations pertain to arming/disarming + /// the NVDIMM + // Disarm the NV logic such that the next save attempt is a NOOP + HBRT_FW_NVDIMM_DISARM = 0x0001, + // Disable encryption on the NVDIMM and clear saved values from FW + HBRT_FW_NVDIMM_DISABLE_ENCRYPTION = 0x0002, + // Remove keys + HBRT_FW_NVDIMM_REMOVE_KEYS = 0x0004, + // Enable encryption on the NVDIMM + HBRT_FW_NVDIMM_ENABLE_ENCRYPTION = 0x0008, + // Arm the NV logic + HBRT_FW_NVDIMM_ARM = 0x0010, + + /// The following operations pertain to the Health of the NVDIMM + /// This operation can be performed with the arming/disarming + /// operation, these operation types are orthogonal to each other + // Manufacturing(MNFG) energy source(ES) health check request + HBRT_FW_MNFG_ES_HEALTH_CHECK = 0x0020, + // Manufacturing(MNFG) non-volatile memory(NVM) health check request + HBRT_FW_MNFG_NVM_HEALTH_CHECK = 0x0040, + + /// The following operations pertain to the decommission of an NVDIMM + // Factory Default returns the NVDIMM to the factory default state + HBRT_FW_NVDIMM_FACTORY_DEFAULT = 0x0080, + // Secure Erase Verify all NAND flash blocks have been erased + HBRT_FW_NVDIMM_SECURE_EV_START = 0x0100, + // Secure Erase Verify Status checks if SEV operation has completed + HBRT_FW_NVDIMM_SECURE_EV_STATUS = 0x0200, + }; + + // NVDIMM (PHYP -> HBRT) message to request NVDIMM operation(s) + struct nvdimm_operation_t + { + uint64_t procId; // Retrieve all NVDIMMs under the processor ID; all + // FFs (HBRT_NVDIMM_OPERATION_APPLY_TO_ALL_NVDIMMS) + // means operate on all NVDIMMs in the system + uint32_t rsvd1; // reserved + uint16_t rsvd2; // reserved + NVDIMM_Op_t opType; // NVDIMM operation(s) to perform, + // 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 @@ -593,7 +685,7 @@ typedef struct hostInterfaces } req_hcode_update; // This struct is sent from HBRT with - // io_type set to HBRT_FW_MSG_TYPE_ERR_LOG + // io_type set to HBRT_FW_MSG_TYPE_ERROR_LOG // Send an error log to FSP struct { @@ -633,6 +725,14 @@ typedef struct hostInterfaces uint64_t i_state; // NVDIMM protection state enum } __attribute__ ((packed)) nvdimm_protection_state; + // This struct is sent from PHYP to HBRT with + // 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 @@ -1032,6 +1132,11 @@ struct postInitCalls_t */ void (*callCommitRsvdTraceBufErrl)(); + /** + * @brief Sends current NV_STATUS to host + * + */ + void (*callSendNvStatus)(); }; extern hostInterfaces_t* g_hostInterfaces; |