summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNick Bofferding <bofferdn@us.ibm.com>2017-03-31 16:44:11 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-04-10 17:20:33 -0400
commitc560af088949a2195a3dc86eb16daa7628daf0e9 (patch)
tree86bd01f88f16237363e1ec2444887cb56db6837f /src
parent8df4bc28dd0a5618c8ad9c9cec1812cf0f065e8e (diff)
downloadtalos-hostboot-c560af088949a2195a3dc86eb16daa7628daf0e9.tar.gz
talos-hostboot-c560af088949a2195a3dc86eb16daa7628daf0e9.zip
Report HW Keys' Hash size in HDAT
Change-Id: I51a336090020a7822289c974a754ae95a8f9e3a1 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38720 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: Christopher J. Engel <cjengel@us.ibm.com> Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: Stephen M. Cprek <smcprek@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/usr/hdat/hdatiplparms.C7
-rwxr-xr-xsrc/usr/hdat/hdatiplparms.H2
-rw-r--r--src/usr/runtime/hdatstructs.H2
-rw-r--r--src/usr/runtime/populate_hbruntime.C7
4 files changed, 12 insertions, 6 deletions
diff --git a/src/usr/hdat/hdatiplparms.C b/src/usr/hdat/hdatiplparms.C
index f50626b88..4f8bcc77e 100755
--- a/src/usr/hdat/hdatiplparms.C
+++ b/src/usr/hdat/hdatiplparms.C
@@ -776,7 +776,7 @@ void HdatIplParms::hdatGetSystemParamters()
HDAT_ERR("Error in getting SYSTEM_BRAND_NAME");
}
- // The next 4 fields are set to their final values in a common handler
+ // The next 5 fields are set to their final values in a common handler
// in istep 21.1, to avoid trust issues when HDAT is initially populated
// by a service processor
this->iv_hdatIPLParams->iv_sysParms.hdatSysSecuritySetting = 0;
@@ -784,8 +784,9 @@ void HdatIplParms::hdatGetSystemParamters()
this->iv_hdatIPLParams->iv_sysParms.hdatTpmConfBits = 0;
this->iv_hdatIPLParams->iv_sysParms.hdatTpmDrawer = 0;
-
- memset(this->iv_hdatIPLParams->iv_sysParms.hdatHwKeyHashValue, 0x00, 64);
+ this->iv_hdatIPLParams->iv_sysParms.hdatHwKeyHashSize = 0;
+ memset(this->iv_hdatIPLParams->iv_sysParms.hdatHwKeyHashValue, 0x00,
+ sizeof(this->iv_hdatIPLParams->iv_sysParms.hdatHwKeyHashValue));
memset(this->iv_hdatIPLParams->iv_sysParms.hdatSystemFamily, 0x00, 64);
TARGETING::ATTR_SYSTEM_FAMILY_type l_systemFamily = {0};
diff --git a/src/usr/hdat/hdatiplparms.H b/src/usr/hdat/hdatiplparms.H
index c490e6bb1..ef3a39eec 100755
--- a/src/usr/hdat/hdatiplparms.H
+++ b/src/usr/hdat/hdatiplparms.H
@@ -105,7 +105,7 @@ struct hdatSysParms_t
uint16_t hdatSysSecuritySetting; // System Security Settings
uint16_t hdatTpmConfBits; // TPM Configuration Bits
uint16_t hdatTpmDrawer; // TPMs/Drawer
- uint16_t hdatReserved6; // Reserved
+ uint16_t hdatHwKeyHashSize; // Size of HW Keys' Hash
uint8_t hdatHwKeyHashValue[64]; // Hardware Keys Hash Value
char hdatSystemFamily[64]; // System Family/Vendor Name
char hdatSystemType[64]; // System Type/Vendor Type
diff --git a/src/usr/runtime/hdatstructs.H b/src/usr/runtime/hdatstructs.H
index 887ecf7fc..4cb51ac41 100644
--- a/src/usr/runtime/hdatstructs.H
+++ b/src/usr/runtime/hdatstructs.H
@@ -266,7 +266,7 @@ struct hdatSysParms_t
uint16_t hdatSysSecuritySetting; // System Security Settings
uint16_t hdatTpmConfBits; // TPM Configuration Bits
uint16_t hdatTpmDrawer; // TPMs/Drawer
- uint16_t hdatReserved6; // Reserved
+ uint16_t hdatHwKeyHashSize; // Size of HW Keys' Hash
uint8_t hdatHwKeyHashValue[64]; // Hardware Keys Hash Value
char hdatSystemFamily[64]; // System Family/Vendor Name
char hdatSystemType[64]; // System Type/Vendor Type
diff --git a/src/usr/runtime/populate_hbruntime.C b/src/usr/runtime/populate_hbruntime.C
index 1e00379e5..534403d0b 100644
--- a/src/usr/runtime/populate_hbruntime.C
+++ b/src/usr/runtime/populate_hbruntime.C
@@ -833,7 +833,12 @@ errlHndl_t populate_hbSecurebootData ( void )
l_sysParmsPtr->hdatTpmDrawer = l_maxTpms;
TRACFCOMP(g_trac_runtime,"Max TPMs = 0x%04X", l_maxTpms);
- // populate hw key hash in hdat
+ // Populate HW Keys' Hash size + value in HDAT
+ l_sysParmsPtr->hdatHwKeyHashSize =
+ sizeof(l_sysParmsPtr->hdatHwKeyHashValue);
+ TRACFCOMP(g_trac_runtime,"HW Keys' Hash Size = %d",
+ l_sysParmsPtr->hdatHwKeyHashSize);
+
#ifdef CONFIG_SECUREBOOT
auto hash = l_sysParmsPtr->hdatHwKeyHashValue;
SECUREBOOT::getHwKeyHash(hash);
OpenPOWER on IntegriCloud