From 4edfbd997e46ab635821558047b80ba38a2d7f15 Mon Sep 17 00:00:00 2001 From: Marty Gloff Date: Mon, 8 May 2017 11:25:11 -0500 Subject: Use effective fabric position for LPC operations in the bootloader When the LPC BAR value is supplied in the SBE to BL structure, use it as the base LPC address, otherwise, still use the LPC constant. Save the value being used in the Bootloader data (which is reorganized to align data blocks on boundaries). Also add hb-bldata to parse out the Bootloader data. Change-Id: I1db19467464b90e0190c4df5f7404624c9423eb5 RTC: 173525 Depends-on: I2b0d1959c303df8c9c28c8f0a5b5be1e77aa154f Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40217 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Tested-by: Jenkins OP Build CI Reviewed-by: Matt Derksen Reviewed-by: Corey V. Swenson Reviewed-by: Daniel M. Crowell --- src/include/bootloader/bootloader_data.H | 16 +++++++++------- src/include/bootloader/bootloaderif.H | 9 +++------ 2 files changed, 12 insertions(+), 13 deletions(-) (limited to 'src/include/bootloader') diff --git a/src/include/bootloader/bootloader_data.H b/src/include/bootloader/bootloader_data.H index a28ea74cd..a97120ca0 100644 --- a/src/include/bootloader/bootloader_data.H +++ b/src/include/bootloader/bootloader_data.H @@ -53,18 +53,20 @@ namespace Bootloader{ // @brief Index for Bootloader Trace entries // One-byte index for next entry to use in bootloader_trace. uint8_t bl_trace_index; + uint8_t bl_reserved1[15]; - // Object that will be stored where the SBE HB structure indicates - BlToHbData blToHbData; - - // Bool indicating if the secureROM is valid. Toggles verification. - bool secureRomValid; + // Instance of the TI Data Area + HB_TI_DataArea bl_TIDataArea; // Buffer to save HBB PNOR section data PNOR::SectionData_t bl_hbbSection; - // Instance of the TI Data Area - HB_TI_DataArea bl_TIDataArea; + // Bool indicating if the secureROM is valid. Toggles verification. + bool secureRomValid; + uint8_t bl_reserved2[15]; + + // Object that will be stored where the SBE HB structure indicates + BlToHbData blToHbData; } blData_t; /** diff --git a/src/include/bootloader/bootloaderif.H b/src/include/bootloader/bootloaderif.H index 6fbbd4fd8..e54688f81 100644 --- a/src/include/bootloader/bootloaderif.H +++ b/src/include/bootloader/bootloaderif.H @@ -27,7 +27,7 @@ #include #include -#include +#include namespace Bootloader{ // Max size of HBBL without ECC. Must match PNOR layout for eyeCatch HBBL @@ -76,11 +76,8 @@ struct BlToHbData secureRomSize(0), hwKeysHash(nullptr), hwKeysHashSize(0), hbbHeader(nullptr), hbbHeaderSize(0), secureAccessBit(false), - // @TODO RTC: 173526 or RTC: 173525 - // Use constants MMIO_GROUP0_CHIP0_XSCOM_BASE_ADDR and - // MMIO_GROUP0_CHIP0_LPC_BASE_ADDR from - // src/include/arch/memorymap.H for setting values - xscomBAR(0x000603FC00000000), lpcBAR(LPC::LPC_PHYS_BASE) {} + xscomBAR(MMIO_GROUP0_CHIP0_XSCOM_BASE_ADDR), + lpcBAR(MMIO_GROUP0_CHIP0_LPC_BASE_ADDR) {} // Simple way to tell if data is valid uint64_t eyeCatch; -- cgit v1.2.3