summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/tpm-v2.h16
-rw-r--r--include/tpm_api.h8
2 files changed, 24 insertions, 0 deletions
diff --git a/include/tpm-v2.h b/include/tpm-v2.h
index 2df3dad5532..2b6980e441d 100644
--- a/include/tpm-v2.h
+++ b/include/tpm-v2.h
@@ -690,4 +690,20 @@ u32 tpm2_report_state(struct udevice *dev, uint vendor_cmd, uint vendor_subcmd,
u32 tpm2_enable_nvcommits(struct udevice *dev, uint vendor_cmd,
uint vendor_subcmd);
+/**
+ * tpm2_auto_start() - start up the TPM and perform selftests.
+ * If a testable function has not been tested and is
+ * requested the TPM2 will return TPM_RC_NEEDS_TEST.
+ *
+ * @param dev TPM device
+ * Return: TPM2_RC_TESTING, if TPM2 self-test is in progress.
+ * TPM2_RC_SUCCESS, if testing of all functions is complete without
+ * functional failures.
+ * TPM2_RC_FAILURE, if any test failed.
+ * TPM2_RC_INITIALIZE, if the TPM has not gone through the Startup
+ * sequence
+
+ */
+u32 tpm2_auto_start(struct udevice *dev);
+
#endif /* __TPM_V2_H */
diff --git a/include/tpm_api.h b/include/tpm_api.h
index 8979d9d6df7..022a8bbaeca 100644
--- a/include/tpm_api.h
+++ b/include/tpm_api.h
@@ -331,4 +331,12 @@ static inline bool tpm_is_v2(struct udevice *dev)
return IS_ENABLED(CONFIG_TPM_V2) && tpm_get_version(dev) == TPM_V2;
}
+/**
+ * tpm_auto_start() - start up the TPM and perform selftests
+ *
+ * @param dev TPM device
+ * Return: return code of the operation (0 = success)
+ */
+u32 tpm_auto_start(struct udevice *dev);
+
#endif /* __TPM_API_H */