summaryrefslogtreecommitdiffstats
path: root/src/include/runtime
diff options
context:
space:
mode:
authorRoland Veloz <rveloz@us.ibm.com>2017-12-04 17:37:05 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-12-21 00:12:25 -0500
commit44d0f070400aabde3a06eb7b836923577a117cc0 (patch)
tree464a51f429057595436e47e510913a9a7a03f8d2 /src/include/runtime
parenta334e5aa3f11fe4f4657ba89139ac0a543845af1 (diff)
downloadtalos-hostboot-44d0f070400aabde3a06eb7b836923577a117cc0.tar.gz
talos-hostboot-44d0f070400aabde3a06eb7b836923577a117cc0.zip
Handles FSP reset-reload in HBRT messages
For every instance where a firmware_request is made, it is possible to get an error if the FSP is doing a reset/reload. Now, if an error returned from the firmware_request call indicates that the FSP is doing a reset/reload, the firmware_request call will be made again. Also refactored the code. Consolidated the calls to firmware_request to another file to facilitate the adding/updating of messages. Change-Id: I5be440927ab255c55b40a0a0ed26f786d31a9317 RTC:182606 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50505 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/runtime')
-rw-r--r--src/include/runtime/generic_hbrt_fsp_message.H107
-rw-r--r--src/include/runtime/interface.h9
2 files changed, 74 insertions, 42 deletions
diff --git a/src/include/runtime/generic_hbrt_fsp_message.H b/src/include/runtime/generic_hbrt_fsp_message.H
index 1eebb7b09..6fa9ae9cb 100644
--- a/src/include/runtime/generic_hbrt_fsp_message.H
+++ b/src/include/runtime/generic_hbrt_fsp_message.H
@@ -35,43 +35,6 @@
*/
-/**
- * Values for the GenericFspMboxMessage_t::magic
- * and GenericFspMboxMessage_t::structVer data members
- */
-const uint32_t GFMM_MAGIC_NUMBER = 0x4746464D; // `GFFM`
-const uint16_t GFMM_VERSION = 1;
-
-/**
- * Values for the GenericFspMboxMessage_t::__req flag
- */
-enum GENERIC_FSP_MBOX_MESSAGE_FLOW
-{
- GFMM_RESPONSE = 0,
- GFMM_REQUEST = 1,
-};
-
-/**
- * Values for the GenericFspMboxMessage_t::__onlyError flag
- */
-enum GENERIC_FSP_MBOX_MESSAGE_ERROR_FLAG
-{
- GFMM_NOT_ERROR_ONLY = 0,
- GFMM_ERROR_ONLY = 1,
-};
-
-/**
- * The different message types for the GenericFspMboxMessage_t
- */
-enum GENERIC_FSP_MBOX_MESSAGE_MSG_TYPE
-{
- GFMM_MSG_TOD_BACKUP_RESET = 0x0001,
- GFMM_MSG_TOD_BACKUP_RESET_INFORM_PHYP = 0x0002,
- GFMM_MSG_TOD_TOPOLOGY_DATA = 0x0003,
- GFMM_MSG_SBE_ERROR = 0x000000E1,
- GFMM_MSG_SBE_RECOVERY_SUCCESS = 0x000000E2,
- GFMM_MSG_SBE_RECOVERY_FAILED = 0x000000E3,
-};
/**
* This generates a sequence ID that the GenericFspMboxMessage_t
@@ -84,14 +47,74 @@ public:
static uint16_t getCurrentSeqId();
private:
- static uint16_t GFMM_SEQ_ID;
+ static uint16_t SEQ_ID;
};
/**
+ * A useful struct to access the PLID from GenericFspMboxMessage_t.data
+ * The PLID will be in the first 4 bytes followed by some other data.
+ */
+struct HbrtFspData_t
+{
+ uint32_t plid;
+ uint32_t userData;
+} PACKED ;
+
+/**
* This struct sends/receives an MBox message to the FSP
*/
struct GenericFspMboxMessage_t
{
+
+ /**
+ * Value for the GenericFspMboxMessage_t::magic
+ */
+ static constexpr uint32_t MAGIC_NUMBER = 0x4746464D; // `GFFM`
+
+ /**
+ * GenericFspMboxMessage_t Version info
+ *
+ */
+ enum GENERIC_FSP_MBOX_MESSAGE_VERSION
+ {
+ STRUCT_VERSION_FIRST = 0x1,
+ STRUCT_VERSION_LATEST = STRUCT_VERSION_FIRST,
+ };
+
+ /**
+ * Values for the GenericFspMboxMessage_t::__req flag
+ */
+ enum GENERIC_FSP_MBOX_MESSAGE_FLOW
+ {
+ RESPONSE = 0,
+ REQUEST = 1,
+ };
+
+ /**
+ * Values for the GenericFspMboxMessage_t::__onlyError flag
+ */
+ enum GENERIC_FSP_MBOX_MESSAGE_ERROR_FLAG
+ {
+ NOT_ERROR_ONLY = 0,
+ ERROR_ONLY = 1,
+ };
+
+ /**
+ * The different message types for the GenericFspMboxMessage_t
+ */
+ enum GENERIC_FSP_MBOX_MESSAGE_MSG_TYPE
+ {
+ MSG_TOD_BACKUP_RESET = 0x0001,
+ MSG_TOD_BACKUP_RESET_INFORM_PHYP = 0x0002,
+ MSG_TOD_TOPOLOGY_DATA = 0x0003,
+ MSG_SBE_ERROR = 0x000000E1,
+ MSG_SBE_RECOVERY_SUCCESS = 0x000000E2,
+ MSG_SBE_RECOVERY_FAILED = 0x000000E3,
+ };
+
+ /**
+ * GenericFspMboxMessage_t data members
+ */
uint32_t magic; // ='GFMM'
uint32_t dataSize; // total number of bytes in the entire message,
// includes structure plus data buffer,
@@ -120,16 +143,16 @@ struct GenericFspMboxMessage_t
// A method to set the local vars to a default state
void initialize()
{
- magic = GFMM_MAGIC_NUMBER;
+ magic = MAGIC_NUMBER;
dataSize = sizeof(GenericFspMboxMessage_t);
- structVer = GFMM_VERSION;
+ structVer = STRUCT_VERSION_LATEST;
reserved = 0;
seqnum = SeqId_t::getNextSeqId();
msgq = 0;
msgType = 0;
- __req = GFMM_RESPONSE;
+ __req = RESPONSE;
__async = 0;
- __onlyError = GFMM_NOT_ERROR_ONLY;
+ __onlyError = NOT_ERROR_ONLY;
__unused = 0;
data = 0;
};
diff --git a/src/include/runtime/interface.h b/src/include/runtime/interface.h
index 96eb62c2c..3a6ac6b93 100644
--- a/src/include/runtime/interface.h
+++ b/src/include/runtime/interface.h
@@ -147,6 +147,15 @@ enum MemoryError_t
/* PHYP fixes */
#define HBRT_CAPS_SET2_PHYP 2
+/* FSP failed due to a a reset/reload. Only applicable when
+ * hostInterfaces::hbrt_fw_msg::io_type is set to
+ * HBRT_FW_MSG_HBRT_FSP_REQ
+ */
+#define HBRT_RC_FSPDEAD -8193 //0x2001
+
+/* FSP failed due to a a reset/reload */
+#define HBRT_FW_REQUEST_RETRIES 1
+
/** @typedef hostInterfaces_t
* @brief Interfaces provided by the underlying environment (ex. Sapphire).
OpenPOWER on IntegriCloud