summaryrefslogtreecommitdiffstats
path: root/src/bootloader/bootloader.C
diff options
context:
space:
mode:
Diffstat (limited to 'src/bootloader/bootloader.C')
-rw-r--r--src/bootloader/bootloader.C16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/bootloader/bootloader.C b/src/bootloader/bootloader.C
index 0158f211a..ec9b12c4a 100644
--- a/src/bootloader/bootloader.C
+++ b/src/bootloader/bootloader.C
@@ -76,17 +76,25 @@ namespace Bootloader{
// Set variables needed for getting location of HB base code
// @TODO RTC:138268 Support multiple sides of PNOR in bootloader
- uint64_t l_pnorStart = LPC::LPC_PHYS_BASE + LPC::LPCHC_FW_SPACE
- + PNOR::LPC_SFC_MMIO_OFFSET;
+
+ //pnorEnd is the end of flash, which is base of lpc, plus
+ //the offset of the FW space, plus the TOP memory address in FW space
+ uint64_t l_pnorEnd = LPC::LPC_PHYS_BASE + LPC::LPCHC_FW_SPACE
+ + PNOR::LPC_TOP_OF_FLASH_OFFSET;
+
+ //We dont know what the start of pnor is because we dont know the size
+ uint64_t l_pnorStart = 0;
+
uint32_t l_errCode = PNOR::NO_ERROR;
uint8_t l_tocUsed = 0;
// Get location of HB base code in PNOR from TOC
// @TODO RTC:138268 Support multiple sides of PNOR in bootloader
- bl_pnorAccess::getHBBSection(l_pnorStart,
+ bl_pnorAccess::getHBBSection(l_pnorEnd,
bootloader_hbbSection,
l_errCode,
- l_tocUsed);
+ l_tocUsed,
+ l_pnorStart);
BOOTLOADER_TRACE(BTLDR_TRC_MAIN_GETHBBSECTION_RTN );
if(PNOR::NO_ERROR == l_errCode)
OpenPOWER on IntegriCloud