summaryrefslogtreecommitdiff
path: root/utility
diff options
context:
space:
mode:
authorMattias Nissler <mnissler@chromium.org>2017-12-05 16:27:42 +0100
committerMattias Nissler <mnissler@chromium.org>2018-04-13 10:03:37 +0000
commitdc060ace1b461e09a8e0547f180377d707ff347d (patch)
treed849c2a4281ffbf77aa73f4f2edef2a197cb1ca4 /utility
parentec9040c4ef51bef43e8c94c1ecd953145861d834 (diff)
downloadvboot-dc060ace1b461e09a8e0547f180377d707ff347d.tar.gz
tpm_lite: Add TlclGetSpaceInfo
The new TlclGetSpaceInfo function returns more detailed information about a defined NVRAM space. The existing TlclGetPermissions function is now using TlclGetSpaceInfo behind the scenes. BRANCH=None BUG=chromium:788719 TEST=New unit tests. Change-Id: I6c4f490d575788b696fd742a69e81e2767ec50f1 Reviewed-on: https://chromium-review.googlesource.com/937705 Trybot-Ready: Mattias Nissler <mnissler@chromium.org> Tested-by: Mattias Nissler <mnissler@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org>
Diffstat (limited to 'utility')
-rw-r--r--utility/tlcl_generator.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/utility/tlcl_generator.c b/utility/tlcl_generator.c
index c545bed1..c021ed36 100644
--- a/utility/tlcl_generator.c
+++ b/utility/tlcl_generator.c
@@ -338,14 +338,14 @@ Command* BuildGetSTClearFlagsCommand(void) {
return cmd;
}
-Command* BuildGetPermissionsCommand(void) {
+Command* BuildGetSpaceInfoCommand(void) {
int size = (kTpmRequestHeaderLength +
sizeof(TPM_CAPABILITY_AREA) + /* capArea */
sizeof(uint32_t) + /* subCapSize */
sizeof(uint32_t)); /* subCap */
Command* cmd = newCommand(TPM_ORD_GetCapability, size);
- cmd->name = "tpm_getpermissions_cmd";
+ cmd->name = "tpm_getspaceinfo_cmd";
AddInitializedField(cmd, kTpmRequestHeaderLength,
sizeof(TPM_CAPABILITY_AREA), TPM_CAP_NV_INDEX);
AddInitializedField(cmd, kTpmRequestHeaderLength +
@@ -634,7 +634,7 @@ Command* (*builders[])(void) = {
BuildPhysicalSetDeactivatedCommand,
BuildGetFlagsCommand,
BuildGetSTClearFlagsCommand,
- BuildGetPermissionsCommand,
+ BuildGetSpaceInfoCommand,
BuildGetOwnershipCommand,
BuildGetRandomCommand,
BuildExtendCommand,
@@ -676,9 +676,6 @@ int main(void) {
printf("/* This file is automatically generated */\n\n");
OutputCommands(commands);
printf("const int kWriteInfoLength = %d;\n", (int) sizeof(TPM_WRITE_INFO));
- printf("const int kNvDataPublicPermissionsOffset = %d;\n",
- (int) (offsetof(TPM_NV_DATA_PUBLIC, permission) +
- offsetof(TPM_NV_ATTRIBUTES, attributes)));
FreeCommands(commands);
return 0;