aboutsummaryrefslogtreecommitdiff
path: root/src/std/tcg.h
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.vnet.ibm.com>2016-02-02 13:09:16 -0500
committerKevin O'Connor <kevin@koconnor.net>2016-02-05 20:47:37 -0500
commit7d596dcccfd5bd931a3d74be5dde1615440b78cb (patch)
tree5ca3d40e54f030017c739f7c230a809c3c9c58bd /src/std/tcg.h
parent8b7a0add3acfa14ea28ca9a9fbc410d314c62a10 (diff)
downloadseabios-hppa-7d596dcccfd5bd931a3d74be5dde1615440b78cb.zip
seabios-hppa-7d596dcccfd5bd931a3d74be5dde1615440b78cb.tar.gz
seabios-hppa-7d596dcccfd5bd931a3d74be5dde1615440b78cb.tar.bz2
tpm: Implement tpm20_menu
In the TPM 2 menu we currently only allow to run the TPM2_Clear operation. For this we follow the TCG Physical Presence Interface Specification to be found here: http://www.trustedcomputinggroup.org/resources/tcg_physical_presence_interface_specification Table 3 shows the 'Clear' operation and the sequence of commands to send. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Diffstat (limited to 'src/std/tcg.h')
-rw-r--r--src/std/tcg.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/std/tcg.h b/src/std/tcg.h
index d45c7f6..dd860e6 100644
--- a/src/std/tcg.h
+++ b/src/std/tcg.h
@@ -382,6 +382,8 @@ struct tpm_res_sha1complete {
#define TPM2_ST_SESSIONS 0x8002
/* TPM 2 commands */
+#define TPM2_CC_Clear 0x126
+#define TPM2_CC_ClearControl 0x127
#define TPM2_CC_HierarchyChangeAuth 0x129
#define TPM2_CC_SelfTest 0x143
#define TPM2_CC_Startup 0x144
@@ -443,4 +445,19 @@ struct tpm2_req_extend {
struct tpm2_digest_value digest;
} PACKED;
+struct tpm2_req_clearcontrol {
+ struct tpm_req_header hdr;
+ u32 authhandle;
+ u32 authblocksize;
+ struct tpm2_authblock authblock;
+ u8 disable;
+} PACKED;
+
+struct tpm2_req_clear {
+ struct tpm_req_header hdr;
+ u32 authhandle;
+ u32 authblocksize;
+ struct tpm2_authblock authblock;
+} PACKED;
+
#endif // tcg.h