From a071c7697883e3a73570cf0c75fa5673cc83673d Mon Sep 17 00:00:00 2001 From: Andrey Pronin Date: Mon, 18 Jul 2016 11:23:12 -0700 Subject: [PATCH] Support 'tpmc setbgloballock' for tpm2 case Some scripts call 'tpmc setbgloballock' or 'tpmc block'. For tpm2 it should be equivalent to pplock, i.e. perform rollback protection actions: writelock for NVRAM firmware index and disable platform hierarchy. BRANCH=none BUG=chrome-os-partner:55210 TEST=run 'tpmc block' on kevin, check that it attempts pplock Change-Id: I51fae6bd111cf3ff3c1dfbed7441868abad8fc15 Reviewed-on: https://chromium-review.googlesource.com/361381 Commit-Ready: Dan Shi Tested-by: Andrey Pronin Reviewed-by: Darren Krahn --- utility/tpmc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utility/tpmc.c b/utility/tpmc.c index f69bcd07..76a63e02 100644 --- a/utility/tpmc.c +++ b/utility/tpmc.c @@ -450,7 +450,10 @@ command_record command_table[] = { #endif { "lockphysicalpresence", "pplock", "lock (turn off) PP until reboot", TlclLockPhysicalPresence }, -#ifndef TPM2_MODE +#ifdef TPM2_MODE + { "setbgloballock", "block", "set rollback protection lock until reboot", + TlclLockPhysicalPresence }, +#else { "setbgloballock", "block", "set the bGlobalLock until reboot", TlclSetGlobalLock }, #endif -- 2.11.0