summaryrefslogtreecommitdiffstats
path: root/src/usr/secureboot/common
diff options
context:
space:
mode:
authorNick Bofferding <bofferdn@us.ibm.com>2017-09-13 20:32:31 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-09-21 12:31:26 -0400
commit229ad66260fe34db94acaae5128d61f05951f218 (patch)
treeb78af25aad99627c0fe38bc9e483a7c0aa33f162 /src/usr/secureboot/common
parentce2eb298ea1c4fb5e68674eb4d76ba0e06920cbc (diff)
downloadtalos-hostboot-229ad66260fe34db94acaae5128d61f05951f218.tar.gz
talos-hostboot-229ad66260fe34db94acaae5128d61f05951f218.zip
Secure Boot: Support reading component ID from container's SW header
- Repurposed container SW header reserved field for component ID - Parse component ID when reading container header - Implement user API to read component ID Change-Id: I005f0e1cb20d4022333d05bfe86d88bf706f60de Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46173 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@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/usr/secureboot/common')
-rw-r--r--src/usr/secureboot/common/containerheader.C8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/usr/secureboot/common/containerheader.C b/src/usr/secureboot/common/containerheader.C
index 3671b75c7..169c1254d 100644
--- a/src/usr/secureboot/common/containerheader.C
+++ b/src/usr/secureboot/common/containerheader.C
@@ -69,6 +69,8 @@ void ContainerHeader::parse_header(const void* i_header)
/*---- Parse ROM_sw_header_raw ----*/
l_size = offsetof(ROM_sw_header_raw, ecid);
safeMemCpyAndInc(&iv_headerInfo.sw_hdr, l_hdr, l_size);
+ strncpy(iv_componentId,iv_headerInfo.sw_hdr.component_id,
+ sizeof(iv_headerInfo.sw_hdr.component_id));
// Get ECID array
l_size = iv_headerInfo.sw_hdr.ecid_count * ECID_SIZE;
@@ -126,6 +128,7 @@ void ContainerHeader::print() const
}
/*---- Print ROM_sw_header_raw ----*/
+ TRACFCOMP(g_trac_secure,"component_id \"%s\"", componentId());
TRACFCOMP(g_trac_secure,"payload_size 0x%X", iv_headerInfo.sw_hdr.payload_size );
TRACFBIN(g_trac_secure,"payload_hash", iv_headerInfo.sw_hdr.payload_hash, SHA512_DIGEST_LENGTH);
@@ -230,6 +233,11 @@ bool ContainerHeader::isValid() const
return iv_isValid;
}
+const char* ContainerHeader::componentId() const
+{
+ return iv_componentId;
+}
+
void ContainerHeader::parseFlags()
{
iv_sbFlags.hw_hb_fw = iv_headerInfo.hw_prefix_hdr.flags & HB_FW_FLAG;
OpenPOWER on IntegriCloud