From 6744879ceba92b2b2a060cff929bfaaf5d26d762 Mon Sep 17 00:00:00 2001 From: Stephen Cprek Date: Mon, 19 Jun 2017 16:29:24 -0500 Subject: Relocate bl to hb preserved data and page table in VMM Relocate Page Manager Page Table to 256K alignment after preserved area Simplify page manager initialize Change-Id: Ic90584437fa68843a7ebe3818d48c3fe4f5157d8 RTC: 175114 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42154 Tested-by: Jenkins Server Reviewed-by: Martin Gloff Reviewed-by: Michael Baiocchi Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- src/include/bootloader/bootloader_data.H | 2 +- src/include/bootloader/bootloaderif.H | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'src/include/bootloader') diff --git a/src/include/bootloader/bootloader_data.H b/src/include/bootloader/bootloader_data.H index a6f4654e1..289e1c20d 100644 --- a/src/include/bootloader/bootloader_data.H +++ b/src/include/bootloader/bootloader_data.H @@ -91,7 +91,7 @@ namespace Bootloader{ // Object that will be stored where the SBE HB structure indicates BlToHbData blToHbData; uint8_t bl_reserved5[(512 - sizeof(BlToHbData)) % 16]; - static_assert( sizeof(BlToHbData) == 91, "BlToHbData " + static_assert( sizeof(BlToHbData) == 99, "BlToHbData " "size changed. Check bootloader_data.H alignment. " "Fix BlData.pm processing."); } blData_t; diff --git a/src/include/bootloader/bootloaderif.H b/src/include/bootloader/bootloaderif.H index 25b3520e8..fc810dc4b 100644 --- a/src/include/bootloader/bootloaderif.H +++ b/src/include/bootloader/bootloaderif.H @@ -60,8 +60,15 @@ enum BlToHbDataVersion BLTOHB_SAB = 0x0000000900000002, BLTOHB_MMIOBARS = 0x0000000900000003, BLTOHB_SECURE_OVERRIDES = 0x0000000900000004, + BLTOHB_SIZE = 0x0000000900000005, }; +enum +{ + // Arbitrary size larger than the current structure size 8 byte aligned. + // This will only be used when there is a BL/HB mismatch + INITIAL_BLTOHB_PADDED_SIZE = 256 +}; /** @struct BlToHbData * @brief Shared data between bootloader and Hostboot. @@ -81,7 +88,8 @@ struct BlToHbData hbbHeaderSize(0), secureAccessBit(0), xscomBAR(MMIO_GROUP0_CHIP0_XSCOM_BASE_ADDR), lpcBAR(MMIO_GROUP0_CHIP0_LPC_BASE_ADDR), - securityOverride(0), allowAttrOverrides(0) {} + securityOverride(0), allowAttrOverrides(0), + sizeOfStructure(0) {} // Simple way to tell if data is valid uint64_t eyeCatch; @@ -111,6 +119,8 @@ struct BlToHbData bool securityOverride; // Secure Setting - Allow Attribute Overrides in Securemode bool allowAttrOverrides; + // Size of this structure (Use for backwards compatibility) + size_t sizeOfStructure; } __attribute__((packed)); /** -- cgit v1.2.3