diff options
| author | Dean Sanner <dsanner@us.ibm.com> | 2018-02-07 18:10:04 -0600 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-02-28 16:29:42 -0500 |
| commit | 2414e7c8e5de03e829022693f7813809313f40fc (patch) | |
| tree | f36ea03a8c09cc15b9c55fe7991304827b499e8c /src/include/usr | |
| parent | b6e41fc3329eeabb5d1356ec0b26c3dfed8bd903 (diff) | |
| download | talos-hostboot-2414e7c8e5de03e829022693f7813809313f40fc.tar.gz talos-hostboot-2414e7c8e5de03e829022693f7813809313f40fc.zip | |
Support sending chip info to SBEs on multinode
Existing code didn't support collecting the present chips
on all nodes (Hostboot instances) and updating all SBEs with
a system wide view. For non multi drawer configs it will just
update based on HB instance view. For multi drawer configs
the other hostboot instances will be queried for their configs,
aggregated, and then informed of the system wide view via IPC
commnuication.
Change-Id: I45c5673df26f940de212cbe2b54525e32c9147ab
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/53603
Tested-by: Jenkins Server <pfd-jenkins+hostboot@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: Dean Sanner <dsanner@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr')
| -rw-r--r-- | src/include/usr/mbox/ipc_msg_types.H | 6 | ||||
| -rw-r--r-- | src/include/usr/mbox/mbox_queues.H | 1 | ||||
| -rw-r--r-- | src/include/usr/runtime/runtime.H | 57 | ||||
| -rw-r--r-- | src/include/usr/runtime/runtime_reasoncodes.H | 3 |
4 files changed, 66 insertions, 1 deletions
diff --git a/src/include/usr/mbox/ipc_msg_types.H b/src/include/usr/mbox/ipc_msg_types.H index 543f7269c..c2d4d623a 100644 --- a/src/include/usr/mbox/ipc_msg_types.H +++ b/src/include/usr/mbox/ipc_msg_types.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013,2014 */ +/* Contributors Listed Below - COPYRIGHT 2013,2018 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -35,6 +37,8 @@ namespace IPC IPC_POPULATE_ATTRIBUTES = MBOX::FIRST_SECURE_MSG + 1, IPC_TEST_CONNECTION = MBOX::FIRST_SECURE_MSG + 2, IPC_START_PAYLOAD, + IPC_QUERY_CHIPINFO, + IPC_SET_SBE_CHIPINFO, }; }; // namespace IPC diff --git a/src/include/usr/mbox/mbox_queues.H b/src/include/usr/mbox/mbox_queues.H index ec02dada0..20f957038 100644 --- a/src/include/usr/mbox/mbox_queues.H +++ b/src/include/usr/mbox/mbox_queues.H @@ -53,6 +53,7 @@ namespace MBOX HB_IPC_MSGQ = 9, //For inter-drawer HB messages HB_POP_ATTR_MSGQ = 10, // populate Attribute response HB_COALESCE_MSGQ = 11, //host_coalesce response + HB_SBE_SYSCONFIG_MSGQ = 12, //For SBE System Config response // Add HB mbox msg queue ids (services) before this line HB_LAST_VALID_MSGQ, // end of valid HB mbox msgQ ids 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 |

