Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Unified Diff: utility/tpmc.c

Issue 3116025: Added new commands and reactivated full rebuild after fixing for ARM ebuild. (Closed) Base URL: ssh://git@chromiumos-git/vboot_reference.git
Patch Set: move to new build flow (no changes expected) Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utility/tlcl_generator.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utility/tpmc.c
diff --git a/utility/tpmc.c b/utility/tpmc.c
index b74bf1c4c307d794ce3de5ef45e59bdda5e8ffbf..0213b4b486ac5c59cc30088407b9c5abbc0a5a30 100644
--- a/utility/tpmc.c
+++ b/utility/tpmc.c
@@ -200,6 +200,52 @@ static uint32_t HandlerGetPermissions(void) {
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 @@ command_record command_table[] = {
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]);
« no previous file with comments | « utility/tlcl_generator.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698