diff options
author | Simon Glass <sjg@chromium.org> | 2021-02-06 14:23:39 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-03-02 15:53:37 -0500 |
commit | eadcbc7896e8d3eefafc8a34dee125a7d7eecead (patch) | |
tree | 0d3e45b04d1b41e8f826a33b1f107d5926164430 /include/tpm-v2.h | |
parent | 1bea7cc430316674dfe3dd44b6bb53c38c4946cd (diff) | |
download | u-boot-eadcbc7896e8d3eefafc8a34dee125a7d7eecead.zip u-boot-eadcbc7896e8d3eefafc8a34dee125a7d7eecead.tar.gz u-boot-eadcbc7896e8d3eefafc8a34dee125a7d7eecead.tar.bz2 |
tpm: Add an implementation of define_space
Add support for this so that the TPM can be set up for use with
Chromium OS verified boot.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'include/tpm-v2.h')
-rw-r--r-- | include/tpm-v2.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/tpm-v2.h b/include/tpm-v2.h index 56eaa65..aa8b651 100644 --- a/include/tpm-v2.h +++ b/include/tpm-v2.h @@ -240,6 +240,7 @@ enum tpm2_command_codes { TPM2_CC_CLEAR = 0x0126, TPM2_CC_CLEARCONTROL = 0x0127, TPM2_CC_HIERCHANGEAUTH = 0x0129, + TPM2_CC_NV_DEFINE_SPACE = 0x012a, TPM2_CC_PCR_SETAUTHPOL = 0x012C, TPM2_CC_DAM_RESET = 0x0139, TPM2_CC_DAM_PARAMETERS = 0x013A, @@ -389,6 +390,23 @@ u32 tpm2_clear(struct udevice *dev, u32 handle, const char *pw, const ssize_t pw_sz); /** + * Issue a TPM_NV_DefineSpace command + * + * This allows a space to be defined with given attributes and policy + * + * @dev TPM device + * @space_index index of the area + * @space_size size of area in bytes + * @nv_attributes TPM_NV_ATTRIBUTES of the area + * @nv_policy policy to use + * @nv_policy_size size of the policy + * @return return code of the operation + */ +u32 tpm2_nv_define_space(struct udevice *dev, u32 space_index, + size_t space_size, u32 nv_attributes, + const u8 *nv_policy, size_t nv_policy_size); + +/** * Issue a TPM2_PCR_Extend command. * * @dev TPM device |