diff options
author | Chris Engel <cjengel@us.ibm.com> | 2017-07-06 22:04:32 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-08-11 10:04:45 -0400 |
commit | a0e8246b27da999d4d8beba64994daef6333a442 (patch) | |
tree | e86e7042b4442112718aedf90703904a8c4510bf /src/usr/secureboot/trusted/trustedTypes.C | |
parent | f08b3735c1402f8fe9292822e1eb95b43357b4ce (diff) | |
download | talos-hostboot-a0e8246b27da999d4d8beba64994daef6333a442.tar.gz talos-hostboot-a0e8246b27da999d4d8beba64994daef6333a442.zip |
MFG support to validate TPM provisioning
Change-Id: I137b6f6c81cbcd3c2379e4ef34ddff021c3cd576
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42835
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Timothy R. Block <block@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>
Reviewed-by: Stephen M. Cprek <smcprek@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: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/secureboot/trusted/trustedTypes.C')
-rw-r--r-- | src/usr/secureboot/trusted/trustedTypes.C | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/src/usr/secureboot/trusted/trustedTypes.C b/src/usr/secureboot/trusted/trustedTypes.C index 9e2581ef6..fe8112151 100644 --- a/src/usr/secureboot/trusted/trustedTypes.C +++ b/src/usr/secureboot/trusted/trustedTypes.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -127,6 +127,26 @@ namespace TRUSTEDBOOT return i_tpmBuf; } + const uint8_t* TPML_HANDLE_unmarshal(TPML_HANDLE* val, + const uint8_t* i_tpmBuf, + size_t* io_tpmBufSize) + { + i_tpmBuf = unmarshalChunk(i_tpmBuf, io_tpmBufSize, + &(val->count), sizeof(val->count)); + + // Now we know the count as well + if (val->count <= MAX_TPML_HANDLES) { + i_tpmBuf = unmarshalChunk(i_tpmBuf, io_tpmBufSize, + &(val->handles[0]), + sizeof(uint32_t) * val->count); + } + else + { + return NULL; + } + + return i_tpmBuf; + } const uint8_t* TPMS_CAPABILITY_DATA_unmarshal(TPMS_CAPABILITY_DATA* val, const uint8_t* i_tpmBuf, @@ -138,6 +158,13 @@ namespace TRUSTEDBOOT switch (val->capability) { + case TPM_CAP_HANDLES: + { + return TPML_HANDLE_unmarshal( + &(val->data.tpmHandles), i_tpmBuf, + io_tpmBufSize); + } + break; case TPM_CAP_TPM_PROPERTIES: { return TPML_TAGGED_TPM_PROPERTY_unmarshal( |