From c252560d78ef1fbbf9b902d0238a4218e8af4642 Mon Sep 17 00:00:00 2001 From: Marty Gloff Date: Fri, 28 Jul 2017 10:21:07 -0500 Subject: Hostboot not able to send a valid TI after corrupting HB base Bootloader TI design is incomplete and does not set up the TI info at HBB offset 0x2000 with the magic signature or pointer to the Bootloader TI data. Change-Id: I16229fed67a2cf67322dce02f0a1b8f0b68d275f CQ: SW397043 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43941 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Tested-by: Jenkins OP HW Reviewed-by: Christian R. Geddes Reviewed-by: Stephen M. Cprek Reviewed-by: Corey V. Swenson Reviewed-by: Daniel M. Crowell --- src/include/bootloader/bootloader.H | 29 +++++++---------------------- src/include/bootloader/bootloader_data.H | 24 ++++++++++++++++-------- src/include/bootloader/bootloader_trace.H | 4 ++-- 3 files changed, 25 insertions(+), 32 deletions(-) (limited to 'src/include/bootloader') diff --git a/src/include/bootloader/bootloader.H b/src/include/bootloader/bootloader.H index f00927530..8020311ba 100644 --- a/src/include/bootloader/bootloader.H +++ b/src/include/bootloader/bootloader.H @@ -65,28 +65,13 @@ extern "C" void enterHBB(uint64_t i_hbb_hrmor, uint64_t i_hbb_offset); * @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, - uint32_t i_error_info = 0) - { - termWriteSRC(TI_BOOTLOADER, - i_reasoncode, - i_failAddr, - i_error_info); - - termModifySRC(i_moduleID, - i_word7, - i_word8); - - if(i_executeTI) - { - terminateExecuteTI(); - } - } +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, + uint32_t i_error_info = 0); /** diff --git a/src/include/bootloader/bootloader_data.H b/src/include/bootloader/bootloader_data.H index 289e1c20d..0e65e6408 100644 --- a/src/include/bootloader/bootloader_data.H +++ b/src/include/bootloader/bootloader_data.H @@ -95,14 +95,22 @@ namespace Bootloader{ "size changed. Check bootloader_data.H alignment. " "Fix BlData.pm processing."); } blData_t; - - /** - * @brief Pointer to bootloader external data - * - * Pointer to location in main storage which bootloader uses for - * storing data - */ - extern blData_t *g_blData; } // end namespace Bootloader +/** + * @brief Pointer to bootloader external data + * + * Pointer to location in main storage which bootloader uses for + * storing data + */ +extern Bootloader::blData_t *g_blData; + +/** + * @brief Pointer to bootloader scratch space + * + * Pointer to location in main storage which bootloader uses as + * scratch space + */ +extern uint8_t *g_blScratchSpace; + #endif diff --git a/src/include/bootloader/bootloader_trace.H b/src/include/bootloader/bootloader_trace.H index 4a11dbf49..269a904f5 100644 --- a/src/include/bootloader/bootloader_trace.H +++ b/src/include/bootloader/bootloader_trace.H @@ -186,9 +186,9 @@ enum BootloaderTraces #ifndef BOOTLOADER_TRACE #define BOOTLOADER_TRACE(trace_value) \ { \ - Bootloader::g_blData->bl_trace[Bootloader::g_blData->bl_trace_index++] = \ + g_blData->bl_trace[g_blData->bl_trace_index++] = \ trace_value; \ - Bootloader::g_blData->bl_trace_index %= BOOTLOADER_TRACE_SIZE; \ + g_blData->bl_trace_index %= BOOTLOADER_TRACE_SIZE; \ lwsync(); \ } #endif -- cgit v1.2.1