diff options
author | Jaymes Wilks <mjwilks@us.ibm.com> | 2018-04-24 10:01:59 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-05-10 21:49:40 -0400 |
commit | 98bee5bbab00b1fcb8c6b6255ac07e62e2800b60 (patch) | |
tree | 35359cf4fc59989468425e54a9c8b8a510ff87e6 /src/usr/secureboot/trusted/trustedTypes.H | |
parent | 7145f5c28a5b4a8fe689d3250fa95acbdfc0c43f (diff) | |
download | talos-hostboot-98bee5bbab00b1fcb8c6b6255ac07e62e2800b60.tar.gz talos-hostboot-98bee5bbab00b1fcb8c6b6255ac07e62e2800b60.zip |
New API to Retrieve Random Number from the TPM
A new programming interface allows us to obtain random numbers
from the TPM more easily (i.e. in a more high-level way).
Change-Id: Ibd3d3b320411bea146d6eab4d1a59ca760bc726c
RTC:191000
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/57802
Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@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: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/secureboot/trusted/trustedTypes.H')
-rw-r--r-- | src/usr/secureboot/trusted/trustedTypes.H | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/usr/secureboot/trusted/trustedTypes.H b/src/usr/secureboot/trusted/trustedTypes.H index 0798295c5..34fc0fff5 100644 --- a/src/usr/secureboot/trusted/trustedTypes.H +++ b/src/usr/secureboot/trusted/trustedTypes.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -105,6 +105,7 @@ namespace TRUSTEDBOOT // Command Codes TPM_CC_Startup = 0x00000144, TPM_CC_GetCapability = 0x0000017A, + TPM_CC_GetRandom = 0x0000017B, TPM_CC_PCR_Read = 0x0000017E, TPM_CC_PCR_Extend = 0x00000182, @@ -453,6 +454,22 @@ namespace TRUSTEDBOOT size_t* io_tpmBufSize, size_t i_outBufSize); + /// Incoming GetRandom structure + struct _TPM2_GetRandomIn + { + TPM2_BaseIn base; + uint16_t bytesRequested; + } PACKED; + typedef struct _TPM2_GetRandomIn TPM2_GetRandomIn; + + /// Outgoing GetRandom structure + struct _TPM2_GetRandomOut + { + TPM2_BaseOut base; + TPM2B_DIGEST randomBytes; + } PACKED; + typedef struct _TPM2_GetRandomOut TPM2_GetRandomOut; + /// TPM Authorization structure /// This is not the full structure and only works for PW auth with NULL PW struct _TPMS_AUTH_COMMAND |