From ded1cecd3631ffe62a03c44c7c7aa28fb3f8fdad Mon Sep 17 00:00:00 2001 From: Luigi Semenzato Date: Thu, 27 May 2010 15:19:58 -0700 Subject: [PATCH] Add missing TPM constant and fix test code. Review URL: http://codereview.chromium.org/2320001 --- vboot_firmware/lib/include/tss_constants.h | 1 + vboot_firmware/linktest/main.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/vboot_firmware/lib/include/tss_constants.h b/vboot_firmware/lib/include/tss_constants.h index 523f075e42..e14e2e0c38 100644 --- a/vboot_firmware/lib/include/tss_constants.h +++ b/vboot_firmware/lib/include/tss_constants.h @@ -28,6 +28,7 @@ #define TPM_NV_INDEX_LOCK ((uint32_t)0xffffffff) #define TPM_NV_PER_WRITE_STCLEAR (((uint32_t)1)<<14) #define TPM_NV_PER_PPWRITE (((uint32_t)1)<<0) +#define TPM_NV_PER_GLOBALLOCK (((uint32_t)1)<<15) typedef uint8_t TSS_BOOL; typedef uint16_t TPM_STRUCTURE_TAG; diff --git a/vboot_firmware/linktest/main.c b/vboot_firmware/linktest/main.c index 518f763022..d6496b4153 100644 --- a/vboot_firmware/linktest/main.c +++ b/vboot_firmware/linktest/main.c @@ -38,7 +38,8 @@ int main(void) SetupTPM(); GetStoredVersion(0); WriteStoredVersion(0, 0); - LockStoredVersion(0); + LockFirmwareVersions(); + LockKernelVersionsByLockingPP(); // tlcl.h TlclLibinit(); @@ -53,8 +54,8 @@ int main(void) TlclSetNvLocked(); TlclIsOwned(); TlclForceClear(); - TlclPhysicalEnable(); - TlclPhysicalSetDeactivated(0); + TlclSetEnable(); + TlclSetDeactivated(0); TlclGetFlags(0, 0); return 0;