diff options
Diffstat (limited to 'utility/tlcl_generator.c')
-rw-r--r-- | utility/tlcl_generator.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/utility/tlcl_generator.c b/utility/tlcl_generator.c index 7ed1d6c3..70ce5fd9 100644 --- a/utility/tlcl_generator.c +++ b/utility/tlcl_generator.c @@ -389,6 +389,21 @@ Command* BuildGetRandomCommand(void) { return cmd; } +Command* BuildGetVersionValCommand(void) { + int size = (kTpmRequestHeaderLength + + sizeof(TPM_CAPABILITY_AREA) + /* capArea */ + sizeof(uint32_t)); /* subCapSize */ + + Command* cmd = newCommand(TPM_ORD_GetCapability, size); + cmd->name = "tpm_getversionval_cmd"; + AddInitializedField(cmd, kTpmRequestHeaderLength, + sizeof(TPM_CAPABILITY_AREA), TPM_CAP_GET_VERSION_VAL); + AddInitializedField(cmd, kTpmRequestHeaderLength + + sizeof(TPM_CAPABILITY_AREA), + sizeof(uint32_t), 0); + return cmd; +} + /* Output the fields of a structure. */ void OutputFields(Field* fld) { @@ -510,6 +525,7 @@ Command* (*builders[])(void) = { BuildGetOwnershipCommand, BuildGetRandomCommand, BuildExtendCommand, + BuildGetVersionValCommand, }; static void FreeFields(Field* fld) { |