Added new commands and reactivated full rebuild after fixing for ARM ebuild.
Review URL: http://codereview.chromium.org/3116025
Change-Id: Ideb82562f6b1c3ce5cd9e0b79de250d0a7bd976e
diff --git a/utility/tpmc.c b/utility/tpmc.c
index b74bf1c..0213b4b 100644
--- a/utility/tpmc.c
+++ b/utility/tpmc.c
@@ -200,6 +200,52 @@
return result;
}
+static uint32_t HandlerGetPermanentFlags(void) {
+ TPM_PERMANENT_FLAGS pflags;
+ uint32_t result = TlclGetPermanentFlags(&pflags);
+ if (result == 0) {
+#define P(name) printf("%s %d\n", #name, pflags.name)
+ P(disable);
+ P(ownership);
+ P(deactivated);
+ P(readPubek);
+ P(disableOwnerClear);
+ P(allowMaintenance);
+ P(physicalPresenceLifetimeLock);
+ P(physicalPresenceHWEnable);
+ P(physicalPresenceCMDEnable);
+ P(CEKPUsed);
+ P(TPMpost);
+ P(TPMpostLock);
+ P(FIPS);
+ P(Operator);
+ P(enableRevokeEK);
+ P(nvLocked);
+ P(readSRKPub);
+ P(tpmEstablished);
+ P(maintenanceDone);
+ P(disableFullDALogicInfo);
+#undef P
+ }
+ return result;
+}
+
+static uint32_t HandlerGetSTClearFlags(void) {
+ TPM_STCLEAR_FLAGS vflags;
+ uint32_t result = TlclGetSTClearFlags(&vflags);
+ if (result == 0) {
+#define P(name) printf("%s %d\n", #name, vflags.name)
+ P(deactivated);
+ P(disableForceClear);
+ P(physicalPresence);
+ P(physicalPresenceLock);
+ P(bGlobalLock);
+#undef P
+ }
+ return result;
+}
+
+
/* Table of TPM commands.
*/
command_record command_table[] = {
@@ -232,6 +278,10 @@
HandlerRead },
{ "getpermissions", "getp", "print space permissions (getp <index>)",
HandlerGetPermissions },
+ { "getpermanentflags", "getpf", "print all permanent flags",
+ HandlerGetPermanentFlags },
+ { "getstclearflags", "getvf", "print all volatile (ST_CLEAR) flags",
+ HandlerGetSTClearFlags },
};
static int n_commands = sizeof(command_table) / sizeof(command_table[0]);