|
@@ -34,6 +34,7 @@
|
|
#include <linux/acpi.h>
|
|
#include <linux/acpi.h>
|
|
#include <linux/cdev.h>
|
|
#include <linux/cdev.h>
|
|
#include <linux/highmem.h>
|
|
#include <linux/highmem.h>
|
|
|
|
+#include <linux/tpm_eventlog.h>
|
|
#include <crypto/hash_info.h>
|
|
#include <crypto/hash_info.h>
|
|
|
|
|
|
#ifdef CONFIG_X86
|
|
#ifdef CONFIG_X86
|
|
@@ -385,10 +386,6 @@ struct tpm_cmd_t {
|
|
tpm_cmd_params params;
|
|
tpm_cmd_params params;
|
|
} __packed;
|
|
} __packed;
|
|
|
|
|
|
-struct tpm2_digest {
|
|
|
|
- u16 alg_id;
|
|
|
|
- u8 digest[SHA512_DIGEST_SIZE];
|
|
|
|
-} __packed;
|
|
|
|
|
|
|
|
/* A string buffer type for constructing TPM commands. This is based on the
|
|
/* A string buffer type for constructing TPM commands. This is based on the
|
|
* ideas of string buffer code in security/keys/trusted.h but is heap based
|
|
* ideas of string buffer code in security/keys/trusted.h but is heap based
|
|
@@ -573,4 +570,26 @@ int tpm2_prepare_space(struct tpm_chip *chip, struct tpm_space *space, u32 cc,
|
|
u8 *cmd);
|
|
u8 *cmd);
|
|
int tpm2_commit_space(struct tpm_chip *chip, struct tpm_space *space,
|
|
int tpm2_commit_space(struct tpm_chip *chip, struct tpm_space *space,
|
|
u32 cc, u8 *buf, size_t *bufsiz);
|
|
u32 cc, u8 *buf, size_t *bufsiz);
|
|
|
|
+
|
|
|
|
+extern const struct seq_operations tpm2_binary_b_measurements_seqops;
|
|
|
|
+
|
|
|
|
+#if defined(CONFIG_ACPI)
|
|
|
|
+int tpm_read_log_acpi(struct tpm_chip *chip);
|
|
|
|
+#else
|
|
|
|
+static inline int tpm_read_log_acpi(struct tpm_chip *chip)
|
|
|
|
+{
|
|
|
|
+ return -ENODEV;
|
|
|
|
+}
|
|
|
|
+#endif
|
|
|
|
+#if defined(CONFIG_OF)
|
|
|
|
+int tpm_read_log_of(struct tpm_chip *chip);
|
|
|
|
+#else
|
|
|
|
+static inline int tpm_read_log_of(struct tpm_chip *chip)
|
|
|
|
+{
|
|
|
|
+ return -ENODEV;
|
|
|
|
+}
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+int tpm_bios_log_setup(struct tpm_chip *chip);
|
|
|
|
+void tpm_bios_log_teardown(struct tpm_chip *chip);
|
|
#endif
|
|
#endif
|