mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 01:02:19 +02:00
tpm: Export the open/close functions
At present these functions are not accessible outside the TPM library, but in some cases we need to call them. Export them in the header file and add a define for the SHA1 digest size. Also adjust tpm_open() to call tpm_close() first so that the TPM is in a known state before opening (e.g. by a previous phase of U-Boot). Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -181,6 +181,24 @@ int do_##cmd(cmd_tbl_t *cmdtp, int flag, \
|
||||
return report_return_code(cmd()); \
|
||||
}
|
||||
|
||||
/**
|
||||
* tpm_open() - Request access to locality 0 for the caller
|
||||
*
|
||||
* After all commands have been completed the caller is supposed to
|
||||
* call tpm_close().
|
||||
*
|
||||
* Returns 0 on success, -ve on failure.
|
||||
*/
|
||||
int tpm_open(struct udevice *dev);
|
||||
|
||||
/**
|
||||
* tpm_close() - Close the current session
|
||||
*
|
||||
* Releasing the locked locality. Returns 0 on success, -ve 1 on
|
||||
* failure (in case lock removal did not succeed).
|
||||
*/
|
||||
int tpm_close(struct udevice *dev);
|
||||
|
||||
/**
|
||||
* tpm_get_desc() - Get a text description of the TPM
|
||||
*
|
||||
|
Reference in New Issue
Block a user