sandbox: tpm: Finish comments for struct sandbox_tpm2

Tidy up the missing comments for this struct.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2021-07-18 14:18:01 -06:00
parent 7f350a959c
commit 46aed06cb7

View file

@ -45,19 +45,31 @@ static const u8 sandbox_extended_once_pcr[] = {
0xea, 0x98, 0x31, 0xa9, 0x27, 0x59, 0xfb, 0x4b,
};
/*
* Information about our TPM emulation. This is preserved in the sandbox
* state file if enabled.
*
* @init_done: true if open() has been called
* @startup_done: true if TPM2_CC_STARTUP has been processed
* @tests_done: true if TPM2_CC_SELF_TEST has be processed
* @pw: TPM password per hierarchy
* @pw_sz: Size of each password in bytes
* @properties: TPM properties
* @pcr: TPM Platform Configuration Registers. Each of these holds a hash and
* can be 'extended' a number of times, meaning another hash is added into
* its value (initial value all zeroes)
* @pcr_extensions: Number of times each PCR has been extended (starts at 0)
* @nvdata: non-volatile data, used to store important things for the platform
*/
struct sandbox_tpm2 {
/* TPM internal states */
bool init_done;
bool startup_done;
bool tests_done;
/* TPM password per hierarchy */
char pw[TPM2_HIERARCHY_NB][TPM2_DIGEST_LEN + 1];
int pw_sz[TPM2_HIERARCHY_NB];
/* TPM properties */
u32 properties[TPM2_PROPERTY_NB];
/* TPM PCRs */
u8 pcr[SANDBOX_TPM_PCR_NB][TPM2_DIGEST_LEN];
/* TPM PCR extensions */
u32 pcr_extensions[SANDBOX_TPM_PCR_NB];
};