diff options
author | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2016-08-05 11:07:08 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-08-10 15:01:03 -0400 |
commit | 74544faa47b7fefebfe3a65c1419d5e436986d1b (patch) | |
tree | 6bf10f8537d15749eae9b4aad3942c8ab969ad19 /src/std | |
parent | 996a8a9504f33e318750fbdfa3d0d529654e215a (diff) | |
download | seabios-74544faa47b7fefebfe3a65c1419d5e436986d1b.tar.gz |
tpm: Retrieve the PCR Bank configuration
Implement tpm20_get_capability and retrieve the PCR Bank configuration
from the TPM using this function.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Diffstat (limited to 'src/std')
-rw-r--r-- | src/std/tcg.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/std/tcg.h b/src/std/tcg.h index c59f6715..d60ee09a 100644 --- a/src/std/tcg.h +++ b/src/std/tcg.h @@ -394,12 +394,16 @@ struct tpm_res_sha1complete { #define TPM2_CC_SelfTest 0x143 #define TPM2_CC_Startup 0x144 #define TPM2_CC_StirRandom 0x146 +#define TPM2_CC_GetCapability 0x17a #define TPM2_CC_GetRandom 0x17b #define TPM2_CC_PCR_Extend 0x182 /* TPM 2 error codes */ #define TPM2_RC_INITIALIZE 0x100 +/* TPM 2 Capabilities */ +#define TPM2_CAP_PCRS 0x00000005 + /* TPM 2 data structures */ struct tpm2b_stir { @@ -475,6 +479,31 @@ struct tpm2_req_hierarchycontrol { u8 state; } PACKED; +struct tpm2_req_getcapability { + struct tpm_req_header hdr; + u32 capability; + u32 property; + u32 propertycount; +} PACKED; + +struct tpm2_res_getcapability { + struct tpm_rsp_header hdr; + u8 moreData; + u32 capability; + u8 data[0]; /* capability dependent data */ +} PACKED; + +struct tpms_pcr_selection { + u16 hashAlg; + u8 sizeOfSelect; + u8 pcrSelect[0]; +} PACKED; + +struct tpml_pcr_selection { + u32 count; + struct tpms_pcr_selection selections[0]; +} PACKED; + /* TPM 2 log entry */ struct tpml_digest_values_sha1 { |