diff options
Diffstat (limited to 'src/include/usr/runtime')
-rw-r--r-- | src/include/usr/runtime/runtime.H | 57 | ||||
-rw-r--r-- | src/include/usr/runtime/runtime_reasoncodes.H | 3 |
2 files changed, 60 insertions, 0 deletions
diff --git a/src/include/usr/runtime/runtime.H b/src/include/usr/runtime/runtime.H index 855ef86ac..fdb8e9a49 100644 --- a/src/include/usr/runtime/runtime.H +++ b/src/include/usr/runtime/runtime.H @@ -35,7 +35,28 @@ namespace RUNTIME { + /******************************************************************************/ + // Globals/Constants + /******************************************************************************/ + constexpr uint8_t HB_SBE_WAITING_FOR_MSG = 0x0; + constexpr uint8_t HB_SBE_MSG_DONE = 0x1; + constexpr uint32_t MAX_TIME_ALLOWED_MS = 10000; + // NUMBER_OF_POSSIBLE_DRAWERS definition here should be in sync with + // src/usr/isteps/istep18/establish_system_smp.H's definition of the same constant. + constexpr uint8_t NUMBER_OF_POSSIBLE_DRAWERS = 8; + constexpr uint8_t MAX_PROCS_PER_NODE = 8; + constexpr uint8_t CONTINUE_WAIT_FOR_MSGS = 0x2; + constexpr uint8_t TIME_EXPIRED=0x3; + + +/** + * enum used for sending messages within sendSBEsystemConfig + */ + enum + { + HB_SBE_SYSCONFIG_TIMER_MSG = 0xA2, + }; /** * @brief Add the host data mainstore location to VMM * @@ -106,6 +127,42 @@ errlHndl_t populate_hbTpmInfo( void ); */ errlHndl_t populate_TpmInfoByNode(); +/** + * @brief Timer function for safe error handling in sendSBESystemConfig + * + * @description Used inside the sendSBEsystemConfig() to wait for + * responses from other nodes + * @param[in] i_msgQPtr -- Pointer to the Message Queue to wait for messages + * + * @return void + */ +void* sendSBEsystemConfig_timer(void* i_msgQPtr); + +/** + * @brief Waits and Collects responses from all drawers + * + * @description Used inside the sendSBEsystemConfig() to wait and + * collect responses from other nodes + * @param[in] i_msgQPtr -- Pointer to the Message Queue to wait for messages + * @param[in] i_msgCount -- Number of messages to wait for + * @param[in] i_msgType -- Type of the message to wait for + * @param[in, out] i_systemFabricConfigurationMap -- to consolidate node info from all nodes + * + * @return void + */ +errlHndl_t collectRespFromAllDrawers( void* i_msgQPtr, uint64_t i_msgCount, uint32_t i_msgType, uint64_t& i_systemFabricConfigurationMap ); + +/** + * @brief Sends the chip config down to the SBEs + * + * @description Determines the system wide chip information to send to + * the SBE so it knows which chips are present for syncing with in MPIPL. + * Uses IPC to communication between HB instances if multinode + * + * @return errlHndl_t nullptr on success else pointer to error log + */ +errlHndl_t sendSBESystemConfig(); + // How many pointers/sections there are in HB runtime data #define HBRT_NUM_PTRS 2 diff --git a/src/include/usr/runtime/runtime_reasoncodes.H b/src/include/usr/runtime/runtime_reasoncodes.H index 3937e553f..12d9db472 100644 --- a/src/include/usr/runtime/runtime_reasoncodes.H +++ b/src/include/usr/runtime/runtime_reasoncodes.H @@ -59,6 +59,7 @@ namespace RUNTIME MOD_POPULATE_TPMINFOBYNODE = 0x19, /**< populate_hbruntime.C */ MOD_FILL_RSVMEM_HBDATA = 0x20, /**< populate_hbruntime.C */ MOD_ATTR_RUNTIME_CHECK_PREP_FAIL = 0x21, /**< populate_hbruntime.C */ + MOD_SEND_SBE_SYSCONFIG = 0x22, /**< populate_hbruntime.C */ MOD_RT_FIRMWARE_NOTIFY = 0x23, /**< rt_fwnotify.C */ MOD_RT_FIRMWARE_REQUEST = 0x24, /**< rt_fwreq_helper.C */ MOD_RT_ATTR_SYNC_REQUEST = 0x25, /**< rt_fwnotify.C */ @@ -129,6 +130,8 @@ namespace RUNTIME RC_TPM_HDAT_MAP_BLOCK_ERR = RUNTIME_COMP_ID | 0x3B, RC_ATTR_UPDATE_FAILED = RUNTIME_COMP_ID | 0x3C, RC_HB_RES_MEM_EXCEEDED = RUNTIME_COMP_ID | 0x3D, + RC_SEND_SBE_TIMER_EXPIRED = RUNTIME_COMP_ID | 0x3E, + RC_HOST_TIMER_THREAD_FAIL = RUNTIME_COMP_ID | 0x3F, }; enum UserDetailsTypes |