From 3058711f8b12cf11585e0eda2a1b573f0d871667 Mon Sep 17 00:00:00 2001 From: kavsrf Date: Mon, 17 Apr 2017 23:30:06 +0300 Subject: TPM 2.0 --- DcsCfg/DcsCfgMain.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'DcsCfg/DcsCfgMain.c') diff --git a/DcsCfg/DcsCfgMain.c b/DcsCfg/DcsCfgMain.c index 3abd759..5e5d819 100644 --- a/DcsCfg/DcsCfgMain.c +++ b/DcsCfg/DcsCfgMain.c @@ -29,6 +29,7 @@ https://opensource.org/licenses/LGPL-3.0 #include "common/Tcdefs.h" #include "crypto/cpu.h" #include "Library/DcsCfgLib.h" +#include "../Include/Library/DcsTpmLib.h" ////////////////////////////////////////////////////////////////////////// @@ -368,7 +369,14 @@ DcsCfgMain( opt2++; } ePcr = (UINT32)StrDecimalToUintn(opt2); - Tpm12ListPcrs(sPcr, ePcr); + res = GetTpm(); + if (!EFI_ERROR(res)) { + if (gTpm->TpmVersion == 0x102) { + Tpm12ListPcrs(sPcr, ePcr); + } else { + Tpm2ListPcrs(sPcr, ePcr); + } + } } if (ShellCommandLineGetFlag(Package, OPT_TPM_NVLIST)) { @@ -376,7 +384,7 @@ DcsCfgMain( } if (ShellCommandLineGetFlag(Package, OPT_TPM_CFG)) { - Tpm12DcsConfigure(); + TpmDcsConfigure(); } // Graph -- cgit v1.2.3