summaryrefslogtreecommitdiffstats
path: root/src/include/usr/secureboot
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/include/usr/secureboot
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/include/usr/secureboot')
-rw-r--r--src/include/usr/secureboot/containerheader.H16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/include/usr/secureboot/containerheader.H b/src/include/usr/secureboot/containerheader.H
index 5a554f0fc..49ecc9223 100644
--- a/src/include/usr/secureboot/containerheader.H
+++ b/src/include/usr/secureboot/containerheader.H
@@ -58,6 +58,7 @@ class ContainerHeader
iv_pHdrStart = reinterpret_cast<const uint8_t*>(i_header);
memset(&iv_headerInfo, 0x00, sizeof(iv_headerInfo));
memset(iv_hwKeyHash, 0, sizeof(SHA512_t));
+ memset(iv_componentId,0x00,sizeof(iv_componentId));
parse_header(i_header);
};
@@ -142,6 +143,14 @@ class ContainerHeader
*/
bool isValid() const;
+ /**
+ * @brief Returns the container's component ID as an invariant
+ * character string, or an empty string if none provided.
+ *
+ * @return const char* Component ID string
+ */
+ const char* componentId() const;
+
private:
/**
* @brief Default Constructor in private to prevent being instantiated
@@ -161,6 +170,13 @@ class ContainerHeader
ROM_sw_sig_raw sw_sig;
};
+ /**
+ * @brief Container's component ID (one byte larger than associated
+ * container header field to allow for a NULL terminator)
+ */
+ char iv_componentId[ sizeof(ROM_sw_header_raw::component_id)
+ + sizeof(uint8_t) ];
+
// Entire cached container header content
SecureHeaderInfo iv_headerInfo;
OpenPOWER on IntegriCloud