From 6fb94b1d7cd67d0d8f7ad0b066d36a826bccebb7 Mon Sep 17 00:00:00 2001 From: Marty Gloff Date: Mon, 15 Aug 2016 16:42:48 -0500 Subject: Insert bootloader image into SBE SEEPROM 4) Bootloader-related changes associated with Story 138226: Changes for P9 SBE. Change-Id: If9788c3bb2b56fbbaf4f668a1e153da79ad1757f RTC: 139757 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/28276 Reviewed-by: Matt Derksen Reviewed-by: Christian R. Geddes Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- src/bootloader/bl_start.S | 11 +++++++++++ src/bootloader/bootloader.C | 5 ++--- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'src/bootloader') diff --git a/src/bootloader/bl_start.S b/src/bootloader/bl_start.S index 034b2cc8e..5c6e8d79e 100644 --- a/src/bootloader/bl_start.S +++ b/src/bootloader/bl_start.S @@ -30,6 +30,8 @@ .set SBE_HB_PNORBOOTSIDE, sbe_hb_structures+5 ;// uint8_t .set SBE_HB_PNORSIZEMB, sbe_hb_structures+6 ;// uint16_t .set SBE_HB_BLLOADSIZE, sbe_hb_structures+8 ;// uint64_t +.set HBBL_END_EYECATCHER, 0x4842424C656E6400 ;// 'HBBLend.' +.set HBBL_END_ADDRESS, end_load_address .section .text.bootloaderasm @@ -215,3 +217,12 @@ bootloader_trace: .global bootloader_hbbSection bootloader_hbbSection: .space 32 + + .balign 16 +.global bootloader_end_eyecatcher +bootloader_end_eyecatcher: + .quad HBBL_END_EYECATCHER + +.global bootloader_end_address +bootloader_end_address: + .quad HBBL_END_ADDRESS diff --git a/src/bootloader/bootloader.C b/src/bootloader/bootloader.C index 1ea288451..0f16881a3 100644 --- a/src/bootloader/bootloader.C +++ b/src/bootloader/bootloader.C @@ -47,7 +47,8 @@ namespace Bootloader{ * Pointer to location in main storage which bootloader uses as * scratch space */ - uint8_t *g_blScratchSpace; + uint8_t *g_blScratchSpace = + reinterpret_cast(HBBL_SCRATCH_SPACE_ADDR); /** Apply Secure Signature Validation function. * @@ -72,8 +73,6 @@ namespace Bootloader{ bootloader_trace_index = 0; BOOTLOADER_TRACE(BTLDR_TRC_MAIN_START); - g_blScratchSpace = reinterpret_cast(HBBL_SCRATCH_SPACE_ADDR); - // Set variables needed for getting location of HB base code // @TODO RTC:138268 Support multiple sides of PNOR in bootloader -- cgit v1.2.3