From d53d9f226aaa8080eb65717ae895dac06a855bf8 Mon Sep 17 00:00:00 2001 From: crgeddes Date: Wed, 9 Aug 2017 13:42:03 -0500 Subject: Pass Key-Addr info through bootloader RTC: 165369 Change-Id: If15f6ccc7a7c3649b8352467ae10173a15f3f501 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/44426 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Tested-by: Jenkins OP Build CI Reviewed-by: Matt Derksen Reviewed-by: Martin Gloff Tested-by: Jenkins OP HW Reviewed-by: Daniel M. Crowell --- src/include/bootloader/bootloader_data.H | 2 +- src/include/bootloader/bootloaderif.H | 29 ++++++++++++++++++++++++++++- 2 files changed, 29 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 0e65e6408..2e302c20a 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) == 99, "BlToHbData " + static_assert( sizeof(BlToHbData) == 171, "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 82410235d..38b155230 100644 --- a/src/include/bootloader/bootloaderif.H +++ b/src/include/bootloader/bootloaderif.H @@ -43,6 +43,9 @@ namespace Bootloader{ // Size of PNOR partition without ECC, page algined down, minus 4K header #define MAX_HBB_SIZE (904 * KILOBYTE) +// Max Pairs +#define MAX_ROW_COUNT 8 + // Location of running copy of HBB #ifdef BOOTLOADER #define HBB_HRMOR (getHRMOR() - ( 2*MEGABYTE)) @@ -70,6 +73,7 @@ enum BlToHbDataVersion BLTOHB_MMIOBARS = 0x0000000900000003, BLTOHB_SECURE_OVERRIDES = 0x0000000900000004, BLTOHB_SIZE = 0x0000000900000005, + BLTOHB_KEYADDR = 0x0000000900000006, }; enum @@ -79,6 +83,27 @@ enum INITIAL_BLTOHB_PADDED_SIZE = 256 }; + +//----------------------------------------------------------------------------------- +// Structure definitions +//----------------------------------------------------------------------------------- + + +// To keep all the Stashed Keys & Addrs together within this struct +struct keyAddrPair_t +{ + keyAddrPair_t(uint8_t initVal) { + for(uint8_t i=0; i < MAX_ROW_COUNT; i++) + { + key[i] = initVal; + addr[i] = initVal; + } + } + uint8_t key[MAX_ROW_COUNT]; + uint64_t addr[MAX_ROW_COUNT]; +} __attribute__((packed)); + + /** @struct BlToHbData * @brief Shared data between bootloader and Hostboot. * @@ -98,7 +123,7 @@ struct BlToHbData xscomBAR(MMIO_GROUP0_CHIP0_XSCOM_BASE_ADDR), lpcBAR(MMIO_GROUP0_CHIP0_LPC_BASE_ADDR), securityOverride(0), allowAttrOverrides(0), - sizeOfStructure(0) {} + sizeOfStructure(0), keyAddrStashData(0) {} // Simple way to tell if data is valid uint64_t eyeCatch; @@ -130,6 +155,8 @@ struct BlToHbData bool allowAttrOverrides; // Size of this structure (Use for backwards compatibility) size_t sizeOfStructure; + //keyAddr stash data + keyAddrPair_t keyAddrStashData; } __attribute__((packed)); /** -- cgit v1.2.3