Skip to content

Commit 3e4a858

Browse files
Stephen CprekNick Bofferding
Stephen Cprek
authored and
Nick Bofferding
committed
Add gcc -Os optimization to the hostboot bootloader
Change-Id: Ibe443c8c937387ffa817d22fa72365b216f42151 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/33414 Tested-by: Jenkins Server <[email protected]> Tested-by: Jenkins OP Build CI <[email protected]> Reviewed-by: Martin Gloff <[email protected]> Tested-by: FSP CI Jenkins <[email protected]> Reviewed-by: Michael Baiocchi <[email protected]> Reviewed-by: Daniel M. Crowell <[email protected]>
1 parent a363bb9 commit 3e4a858

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

src/bootloader.ld

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ SECTIONS
4141
*(.text)
4242
*(.text._*)
4343
*(.text.*)
44+
*(.sfpr)
4445
}
4546

4647
.rodata ALIGN(0x8): {

src/bootloader/makefile

+2
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,7 @@ OBJS += bl_pnor_utils.o
3737
OBJS += bl_pnor_ecc.o
3838
OBJS += bl_builtins.o
3939

40+
OPT_LEVEL = -Os
41+
4042
include ${ROOTPATH}/config.mk
4143

src/usr/sbe/sbe_update.C

+6-4
Original file line numberDiff line numberDiff line change
@@ -770,11 +770,13 @@ namespace SBE
770770
"pnor vaddr = 0x%.16X",
771771
pnorSectionId, pnorInfo.vaddr);
772772

773-
// Look for HBBL end data on 16-byte boundary start at offset 0x2C00
774-
// Note: Code takes up at least the first 0x2C00 bytes of the HBBL
775-
// image, so start at that offset to search for this data.
773+
// Look for HBBL end data on 16-byte boundary start at offset
774+
// HBBL_FUZZY_END_ADDRESS
775+
// Note: Code takes up at least the first HBBL_FUZZY_END_ADDRESS
776+
// bytes of the HBBL image, so start at that offset to search
777+
// for this data.
776778
uint64_t hbblAbsoluteEnd = pnorInfo.vaddr + pnorInfo.size;
777-
uint64_t hbblAddr = pnorInfo.vaddr + 0x2C00;
779+
uint64_t hbblAddr = pnorInfo.vaddr + HBBL_FUZZY_END_ADDRESS;
778780
while( hbblAddr < hbblAbsoluteEnd )
779781
{
780782
hbblEndData = reinterpret_cast<hbblEndData_t*>(hbblAddr);

src/usr/sbe/sbe_update.H

+1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ namespace SBE
9696

9797
// PNOR HBBL Partition constants
9898
const uint64_t HBBL_START_ADDRESS = 0x0000000000003000;
99+
const uint64_t HBBL_FUZZY_END_ADDRESS = 0x1400;
99100
const size_t HBBL_MAX_SIZE = 20*KILOBYTE; // 20KB
100101
const uint64_t HBBL_END_EYECATCHER = 0x4842424C656E6400; // 'HBBLend\0'
101102

0 commit comments

Comments
 (0)