From b0bf18528f97ecef49ff27fd4715b2d2a50ad5ba Mon Sep 17 00:00:00 2001 From: crgeddes Date: Tue, 26 Jul 2016 11:40:30 -0500 Subject: Update Bootloader to handle moving the TOC of PNOR around Moved 1 of the PNOR TOCs from 0x8000 to TOP_OF_FLASH - 64KB. Updated bootloader and pnor access code to handle new toc location. Update the defaultPnorLayout to reflect these changes Also added a FSP default pnor xml that will generate a 128 MB image for FSP boxes to use. RTC: 154286 Change-Id: I0253590299ff9714b0d5ab12a02ac9d653b115fa Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27461 Tested-by: Jenkins Server Reviewed-by: Martin Gloff Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell Reviewed-by: Andrew J. Geissler Reviewed-by: Andres A. Lugo-Reyes Reviewed-by: William G. Hoffa --- src/include/bootloader/bl_pnorAccess.H | 23 +++++++++++++++-------- src/include/usr/pnor/pnor_const.H | 2 ++ 2 files changed, 17 insertions(+), 8 deletions(-) (limited to 'src/include') diff --git a/src/include/bootloader/bl_pnorAccess.H b/src/include/bootloader/bl_pnorAccess.H index bc19a4dc2..237900b0d 100644 --- a/src/include/bootloader/bl_pnorAccess.H +++ b/src/include/bootloader/bl_pnorAccess.H @@ -49,7 +49,7 @@ class bl_pnorAccess /** * @brief Get the hostboot base image * - * @param[in] i_pnorStart MMIO address to access the start of pnor flash + * @param[in] i_pnorEnd MMIO address to access the end of pnor flash * * @param[out] o_hbbSection Struct that holds information about the * Hostboot Base Image Section @@ -58,12 +58,15 @@ class bl_pnorAccess * * @param[out] o_tocUsed Tells you which table of contents was used * + * @param[out] o_pnorStart The MMIO address of the start of PNOR + * * @return void */ -static void getHBBSection(uint64_t i_pnorStart, +static void getHBBSection(uint64_t i_pnorEnd, PNOR::SectionData_t& o_hbbSection, uint32_t& o_errCode, - uint8_t& o_tocUsed); + uint8_t& o_tocUsed, + uint64_t& o_pnorStart); private: /** @@ -75,18 +78,20 @@ static void getHBBSection(uint64_t i_pnorStart, * * @param[out] o_TOC Array of section data describing contents of pnor * - * @param[in] i_baseAddr MMIO address to access the start of pnor flash + * @param[out] o_pnorStart The MMIO address of the start of PNOR + * + * @param[out] i_pnorEnd The MMIO address of the end of PNOR * * @return void */ static void readTOC(uint8_t i_tocBuffer[PNOR::TOC_SIZE], uint32_t & o_errCode, - PNOR::SectionData_t * o_TOC, uint64_t i_baseAddr); + PNOR::SectionData_t * o_TOC, uint64_t& o_pnorStart, uint64_t i_pnorEnd); /** * @brief Find a valid TOC within specified side of pnor flash side is determined by the base mmio address passed in * - * @param[in] i_pnorBase MMIO address to access the start of pnor flash + * @param[in] i_pnorEnd MMIO address to access the end of pnor flash * * @param[out] o_TOC Array of section data describing contents of pnor * @@ -94,10 +99,12 @@ static void readTOC(uint8_t i_tocBuffer[PNOR::TOC_SIZE], uint32_t & o_errCode, * * @param[out] o_tocUsed Tells you which table of contents was used * + * @param[out] o_pnorStart The MMIO address of the start of PNOR + * * @return void */ -static void findTOC(uint64_t i_pnorBase, PNOR::SectionData_t * o_TOC, - uint32_t& o_errCode, uint8_t& o_tocUsed); +static void findTOC(uint64_t i_pnorEnd, PNOR::SectionData_t * o_TOC, + uint32_t& o_errCode, uint8_t& o_tocUsed, uint64_t& o_pnorStart); }; diff --git a/src/include/usr/pnor/pnor_const.H b/src/include/usr/pnor/pnor_const.H index a7ca2c3b0..2d0d90f51 100644 --- a/src/include/usr/pnor/pnor_const.H +++ b/src/include/usr/pnor/pnor_const.H @@ -107,6 +107,8 @@ enum { INVALID_OFFSET = 0xFFFFFFF, // Invalid primary or alternate TOC BACKUP_TOC_OFFSET = 0x8000, + TOC_SIZE = 0x8000, + TOC_OFFSET_FROM_TOP_OF_FLASH = 0x8FFF, INVALID_FLASH_OFFSET = 0xFFFFFFFF, }; -- cgit v1.2.3