diff options
author | Rajiv Andrade <srajiv@linux.vnet.ibm.com> | 2009-02-02 12:23:44 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-02-02 19:23:12 -0500 |
commit | 659aaf2bb5496a425ba14036b5b5900f593e4484 (patch) | |
tree | a9736fc70c8837665bc0f0a375dab5382941d77a /drivers/char/tpm/tpm.h | |
parent | 0883743825e34b81f3ff78aaee3a97cba57586c5 (diff) |
TPM: integrity interface
This patch adds internal kernel support for:
- reading/extending a pcr value
- looking up the tpm_chip for a given chip number
Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'drivers/char/tpm/tpm.h')
-rw-r--r-- | drivers/char/tpm/tpm.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index d64f6b7e5b82..8e00b4ddd083 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/miscdevice.h> | 26 | #include <linux/miscdevice.h> |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/tpm.h> | ||
29 | 30 | ||
30 | enum tpm_timeout { | 31 | enum tpm_timeout { |
31 | TPM_TIMEOUT = 5, /* msecs */ | 32 | TPM_TIMEOUT = 5, /* msecs */ |
@@ -234,11 +235,28 @@ typedef union { | |||
234 | struct tpm_output_header out; | 235 | struct tpm_output_header out; |
235 | } tpm_cmd_header; | 236 | } tpm_cmd_header; |
236 | 237 | ||
238 | #define TPM_DIGEST_SIZE 20 | ||
239 | struct tpm_pcrread_out { | ||
240 | u8 pcr_result[TPM_DIGEST_SIZE]; | ||
241 | }__attribute__((packed)); | ||
242 | |||
243 | struct tpm_pcrread_in { | ||
244 | __be32 pcr_idx; | ||
245 | }__attribute__((packed)); | ||
246 | |||
247 | struct tpm_pcrextend_in { | ||
248 | __be32 pcr_idx; | ||
249 | u8 hash[TPM_DIGEST_SIZE]; | ||
250 | }__attribute__((packed)); | ||
251 | |||
237 | typedef union { | 252 | typedef union { |
238 | struct tpm_getcap_params_out getcap_out; | 253 | struct tpm_getcap_params_out getcap_out; |
239 | struct tpm_readpubek_params_out readpubek_out; | 254 | struct tpm_readpubek_params_out readpubek_out; |
240 | u8 readpubek_out_buffer[sizeof(struct tpm_readpubek_params_out)]; | 255 | u8 readpubek_out_buffer[sizeof(struct tpm_readpubek_params_out)]; |
241 | struct tpm_getcap_params_in getcap_in; | 256 | struct tpm_getcap_params_in getcap_in; |
257 | struct tpm_pcrread_in pcrread_in; | ||
258 | struct tpm_pcrread_out pcrread_out; | ||
259 | struct tpm_pcrextend_in pcrextend_in; | ||
242 | } tpm_cmd_params; | 260 | } tpm_cmd_params; |
243 | 261 | ||
244 | struct tpm_cmd_t { | 262 | struct tpm_cmd_t { |