diff options
-rw-r--r-- | src/bootloader/bootloader.C | 2 | ||||
-rw-r--r-- | src/include/bootloader/bootloaderif.H | 19 | ||||
-rw-r--r-- | src/kernel/bltohbdatamgr.C | 11 |
3 files changed, 21 insertions, 11 deletions
diff --git a/src/bootloader/bootloader.C b/src/bootloader/bootloader.C index 9d33097e6..d7e092012 100644 --- a/src/bootloader/bootloader.C +++ b/src/bootloader/bootloader.C @@ -123,7 +123,7 @@ namespace Bootloader{ { // Add cases as additional versions are created default: - g_blData->blToHbData.version = BLTOHB_MMIOBARS; + g_blData->blToHbData.version = BLTOHB_SECURE_OVERRIDES; break; } diff --git a/src/include/bootloader/bootloaderif.H b/src/include/bootloader/bootloaderif.H index 3ec6261be..dd1c3a8ff 100644 --- a/src/include/bootloader/bootloaderif.H +++ b/src/include/bootloader/bootloaderif.H @@ -54,9 +54,10 @@ const uint64_t BLTOHB_EYECATCHER = 0x23626C746F686200; // #BLTOHB\0 enum BlToHbDataVersion { // [release:4][version:4] - BLTOHB_INIT = 0x0000000900000001, - BLTOHB_SAB = 0x0000000900000002, - BLTOHB_MMIOBARS = 0x0000000900000003 + BLTOHB_INIT = 0x0000000900000001, + BLTOHB_SAB = 0x0000000900000002, + BLTOHB_MMIOBARS = 0x0000000900000003, + BLTOHB_SECURE_OVERRIDES = 0x0000000900000004, }; @@ -76,9 +77,9 @@ struct BlToHbData secureRomSize(0), hwKeysHash(nullptr), hwKeysHashSize(0), hbbHeader(nullptr), hbbHeaderSize(0), secureAccessBit(0), - securityOverride(0), allowAttrOverrides(0), xscomBAR(MMIO_GROUP0_CHIP0_XSCOM_BASE_ADDR), - lpcBAR(MMIO_GROUP0_CHIP0_LPC_BASE_ADDR) {} + lpcBAR(MMIO_GROUP0_CHIP0_LPC_BASE_ADDR), + securityOverride(0), allowAttrOverrides(0) {} // Simple way to tell if data is valid uint64_t eyeCatch; @@ -100,14 +101,14 @@ struct BlToHbData size_t hbbHeaderSize; // Secure Setting - Secure Access Bit bool secureAccessBit; - // Secure Setting - Security Override - bool securityOverride; - // Secure Setting - Allow Attribute Overrides in Securemode - bool allowAttrOverrides; // XSCOM MMIO BAR uint64_t xscomBAR; // LPC MMIO BAR uint64_t lpcBAR; + // Secure Setting - Security Override + bool securityOverride; + // Secure Setting - Allow Attribute Overrides in Securemode + bool allowAttrOverrides; } __attribute__((packed)); /** diff --git a/src/kernel/bltohbdatamgr.C b/src/kernel/bltohbdatamgr.C index 95a21ab17..8358c5840 100644 --- a/src/kernel/bltohbdatamgr.C +++ b/src/kernel/bltohbdatamgr.C @@ -131,9 +131,18 @@ printk("Version=%lX\n",i_data.version); if(iv_data.version >= Bootloader::BLTOHB_SAB) { iv_data.secureAccessBit = i_data.secureAccessBit; - iv_data.securityOverride = i_data.securityOverride; + } + + if(iv_data.version >= Bootloader::BLTOHB_SECURE_OVERRIDES) + { + iv_data.securityOverride = i_data.securityOverride; iv_data.allowAttrOverrides = i_data.allowAttrOverrides; } + else + { + iv_data.securityOverride = 0; + iv_data.allowAttrOverrides = 0; + } // Ensure Bootloader to HB structure has the MMIO members if( iv_data.version >= Bootloader::BLTOHB_MMIOBARS ) |