From: Andrey Pronin Date: Mon, 18 Jul 2016 18:23:12 +0000 (-0700) Subject: Support 'tpmc setbgloballock' for tpm2 case X-Git-Url: http://git.legacy.paulk.fr/gitweb/?p=vboot.git;a=commitdiff_plain;h=a071c7697883e3a73570cf0c75fa5673cc83673d 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 --- 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