summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMike Baiocchi <mbaiocch@us.ibm.com>2017-06-16 15:48:51 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-06-16 21:28:19 -0400
commit2895249b06f4064caca13efc15a569fb43139ed7 (patch)
tree0d862f1c507d481cd618f627ae789f31998e14de /src
parent87824e36613d0f1a18ac2873012c7cc0ce98cc01 (diff)
downloadblackbird-hostboot-2895249b06f4064caca13efc15a569fb43139ed7.tar.gz
blackbird-hostboot-2895249b06f4064caca13efc15a569fb43139ed7.zip
Fix Bl-To-Hb Data Issue
This commit fixes an issue where data was incorrectly added to the middle of the existing BlToHbData struct. The secure settings at fault have been moved to the end of the structure. Change-Id: I9ecb3256325aaeb633e250cb60e4f4ffc6010dba RTC:163094 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42005 Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Reviewed-by: Stephen M. Cprek <smcprek@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/bootloader/bootloader.C2
-rw-r--r--src/include/bootloader/bootloaderif.H19
-rw-r--r--src/kernel/bltohbdatamgr.C11
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 )
OpenPOWER on IntegriCloud