diff options
author | Bill Hoffa <wghoffa@us.ibm.com> | 2017-04-10 14:43:51 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-05-10 15:33:40 -0400 |
commit | 240f26001382001974fff7d62367e58df3f7b1db (patch) | |
tree | 482556bd955971c05b942b6a89639f8f187360a0 /src/include | |
parent | b947a1a4119b06ee50287854e5ea974c0926226e (diff) | |
download | talos-hostboot-240f26001382001974fff7d62367e58df3f7b1db.tar.gz talos-hostboot-240f26001382001974fff7d62367e58df3f7b1db.zip |
Include HUID of failed Proc in TI data for certain SBE errors
- Include a generic error pipleline for other future error
scenarios to leverage this functionality
Change-Id: Icc1399ee93157c7106d394944a3355285a8cd830
RTC: 171865
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39072
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/bootloader/bootloader.H | 69 | ||||
-rw-r--r-- | src/include/kernel/cpumgr.H | 4 | ||||
-rw-r--r-- | src/include/kernel/hbterminatetypes.H | 9 | ||||
-rw-r--r-- | src/include/kernel/misc.H | 2 | ||||
-rw-r--r-- | src/include/kernel/terminate.H | 6 | ||||
-rw-r--r-- | src/include/sys/misc.h | 4 | ||||
-rw-r--r-- | src/include/usr/initservice/initserviceif.H | 19 |
7 files changed, 71 insertions, 42 deletions
diff --git a/src/include/bootloader/bootloader.H b/src/include/bootloader/bootloader.H index ddd39bb0b..afe2acc71 100644 --- a/src/include/bootloader/bootloader.H +++ b/src/include/bootloader/bootloader.H @@ -48,41 +48,46 @@ extern "C" void enterHBB(uint64_t i_hbb_hrmor, uint64_t i_hbb_offset); #define printk(format...) -/** - * @brief Handle setting up to terminate Bootloader - * - * @param[in] i_moduleID ID for module where terminate is occurring - * @param[in] i_reasoncode Reason code for why terminating - * @param[in] i_word7 Data for SRC word 7 / @userdata2[0:31] - * (optional, default is 0) - * @param[in] i_word8 Data for SRC word 8 / @userdata2[32:63] - * (optional, default is 0) - * @param[in] i_executeTI Flag for calling terminateExecuteTI - * (optional, default is true) - * @param[in] i_failAddr Address associated with termination - * (SRC word 6 / @userdata1[32:63], - * optional, default is 0) - */ + /** + * @brief Handle setting up to terminate Bootloader + * + * @param[in] i_moduleID ID for module where terminate is occurring + * @param[in] i_reasoncode Reason code for why terminating + * @param[in] i_word7 Data for SRC word 7 / @userdata2[0:31] + * (optional, default is 0) + * @param[in] i_word8 Data for SRC word 8 / @userdata2[32:63] + * (optional, default is 0) + * @param[in] i_executeTI Flag for calling terminateExecuteTI + * (optional, default is true) + * @param[in] i_failAddr Address associated with termination + * (SRC word 6 / @userdata1[32:63], + * optional, default is 0) + * @param[in] i_error_info Optional error data to go in the TI + * data area + * */ inline void bl_terminate(uint8_t i_moduleID, - uint16_t i_reasoncode, - uint32_t i_word7 = 0, - uint32_t i_word8 = 0, - bool i_executeTI = true, - uint64_t i_failAddr = 0) -{ - termWriteSRC(TI_BOOTLOADER, - i_reasoncode, - i_failAddr); - - termModifySRC(i_moduleID, - i_word7, - i_word8); - - if(i_executeTI) + uint16_t i_reasoncode, + uint32_t i_word7 = 0, + uint32_t i_word8 = 0, + bool i_executeTI = true, + uint64_t i_failAddr = 0, + uint32_t i_error_info = 0) { - terminateExecuteTI(); + termWriteSRC(TI_BOOTLOADER, + i_reasoncode, + i_failAddr, + i_error_info); + + termModifySRC(i_moduleID, + i_word7, + i_word8); + + if(i_executeTI) + { + terminateExecuteTI(); + } } -} + /** * @brief Macro to assert using bl_terminate diff --git a/src/include/kernel/cpumgr.H b/src/include/kernel/cpumgr.H index fc562521d..c3c8387d9 100644 --- a/src/include/kernel/cpumgr.H +++ b/src/include/kernel/cpumgr.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2010,2016 */ +/* Contributors Listed Below - COPYRIGHT 2010,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -78,7 +78,7 @@ class CpuManager /** @fn requestShutdown * Requests that all CPUs shutdown */ - static void requestShutdown(uint64_t i_status); + static void requestShutdown(uint64_t i_status, uint32_t i_error_data=0); /** @fn isShutdownRequested * Returns if a shutdown of all CPUs was requested diff --git a/src/include/kernel/hbterminatetypes.H b/src/include/kernel/hbterminatetypes.H index 42bb16788..6aa97e023 100644 --- a/src/include/kernel/hbterminatetypes.H +++ b/src/include/kernel/hbterminatetypes.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2016 */ +/* Contributors Listed Below - COPYRIGHT 2012,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -78,7 +78,6 @@ struct HB_T_SRC_DataArea */ struct HB_TI_DataArea { - union{ struct { uint64_t type:16; /**< indicates either plid or src */ @@ -88,7 +87,11 @@ struct HB_TI_DataArea }; uint64_t flag; /**< Full word - flag */ }; - uint32_t reserved0; + + union{ + uint32_t error_data; /**< Error Data */ + uint32_t reserved0; + }; uint32_t plid; /**< Plid */ HB_T_SRC_DataArea src; /**< SRC */ }; diff --git a/src/include/kernel/misc.H b/src/include/kernel/misc.H index b1415089f..f08af361f 100644 --- a/src/include/kernel/misc.H +++ b/src/include/kernel/misc.H @@ -51,6 +51,8 @@ namespace KernelMisc extern uint64_t g_payload_data; /** @brief master host boot instance number (node) */ extern uint64_t g_masterHBInstance; + /** @brief master host boot additional error data (node) */ + extern uint32_t g_error_data; /** @brief Indicate whether HB is running or not */ enum HbRunning diff --git a/src/include/kernel/terminate.H b/src/include/kernel/terminate.H index 9d80f988d..c80304d93 100644 --- a/src/include/kernel/terminate.H +++ b/src/include/kernel/terminate.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2016 */ +/* Contributors Listed Below - COPYRIGHT 2012,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -49,11 +49,13 @@ void termWritePlid(uint16_t i_source, uint32_t plid); * @param[in] i_source: indicates what type of fail forced the TI * @param[in] i_reasoncode: reasoncode for the failure(assert or shutdown) * @param[in] i_failAddr: i_linkRegister() value (address of failure) + * @param[in] i_error_info: addt'l error info to add to TI data * @param[out] NONE: */ void termWriteSRC(uint16_t i_source, uint16_t i_reasoncode, - uint64_t i_failAddr = 0); + uint64_t i_failAddr = 0, + uint32_t i_error_info = 0); /** @fn termModifySRC * Modify an SRC and the TI data area for Bootloader diff --git a/src/include/sys/misc.h b/src/include/sys/misc.h index 8100805be..cfe62c7d3 100644 --- a/src/include/sys/misc.h +++ b/src/include/sys/misc.h @@ -109,12 +109,14 @@ extern "C" * entry-point. * @param[in] i_payload_data Data pointer fo the payload. * @param[in[ i_masterHBInstance Hostboot instance number. for multinode + * @param[in] i_error_info Additional error data to be added to TI data */ extern "C" void shutdown(uint64_t i_status, uint64_t i_payload_base, uint64_t i_payload_entry, uint64_t i_payload_data, - uint64_t i_masterHBInstance); + uint64_t i_masterHBInstance, + uint32_t i_error_info); #endif /** @enum ProcessorCoreType diff --git a/src/include/usr/initservice/initserviceif.H b/src/include/usr/initservice/initserviceif.H index c8d98ce35..d469167b6 100644 --- a/src/include/usr/initservice/initserviceif.H +++ b/src/include/usr/initservice/initserviceif.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2015 */ +/* Contributors Listed Below - COPYRIGHT 2011,2017 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ /* */ @@ -123,6 +123,8 @@ bool unregisterShutdownEvent(msg_q_t i_msgQ); * Needed when starting payload * on multi-node system. * + * @param[in] i_error_info - Add'tl error data to be included in TI data area + * * @return Nothing * * @note If inBackground = true, the shutdown call will spawn a child task @@ -135,7 +137,20 @@ void doShutdown ( uint64_t i_status, uint64_t i_payload_base = 0, uint64_t i_payload_entry = 0, uint64_t i_payload_data = 0, - uint64_t i_masterHBInstance = THIS_NODE_NO_PAYLOAD); + uint64_t i_masterHBInstance = THIS_NODE_NO_PAYLOAD, + uint32_t i_error_info =0); + +/** + * @brief Wrapper function to perform shutdown including error data + * provided in the TI area. This function calls doShutdown() with + * the appropriate default parms. + * + * @param[in] i_status - Shutdown status to be passed along on shutdown + * @param[in] i_error_info - Add'tl error data to be included in TI data area + * + * @return Nothing + */ +void doShutdownWithError ( uint64_t i_status, uint32_t i_error_info); /** * @brief Returns if Service Processor Base Services are available |