summaryrefslogtreecommitdiffstats
path: root/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c
diff options
context:
space:
mode:
authorYao, Jiewen <jiewen.yao@intel.com>2016-01-26 01:30:55 +0000
committerjyao1 <jyao1@Edk2>2016-01-26 01:30:55 +0000
commit518b6f6565095f328bd90589874fb1abfee27afd (patch)
tree936c1b890a01d7a801756af0a4333499bd74dc92 /SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c
parent8e997ab8d32ea9c4882912ad514e6a20901cf54e (diff)
downloadedk2-518b6f6565095f328bd90589874fb1abfee27afd.tar.gz
edk2-518b6f6565095f328bd90589874fb1abfee27afd.tar.bz2
edk2-518b6f6565095f328bd90589874fb1abfee27afd.zip
SecurityPkg: Add TPM PTP support in TCG2 Config.
This patch add PTP CRB support in BIOS Setup. It can: 1) Display the PTP capability (TIS/FIFO/CRB) 2) Display the PTP current interface (TIS/FIFO/CRB) 3) Let user select CRB/FIFO, if supported. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19743 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c')
-rw-r--r--SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c
index 881368345b..968670f04d 100644
--- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c
+++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c
@@ -1,7 +1,7 @@
/** @file
The module entry point for Tcg2 configuration module.
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -159,20 +159,6 @@ Tcg2ConfigDriverEntryPoint (
UpdateDefaultPCRBanks (Tcg2ConfigBin + sizeof(UINT32), ReadUnaligned32((UINT32 *)Tcg2ConfigBin) - sizeof(UINT32), CurrentActivePCRBanks);
//
- // Save to variable so platform driver can get it.
- //
- Status = gRT->SetVariable (
- TCG2_STORAGE_NAME,
- &gTcg2ConfigFormSetGuid,
- EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
- sizeof(Tcg2Configuration),
- &Tcg2Configuration
- );
- if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "Tcg2ConfigDriver: Fail to set TCG2_STORAGE_NAME\n"));
- }
-
- //
// Sync data from PCD to variable, so that we do not need detect again in S3 phase.
//
Tcg2DeviceDetection.TpmDeviceDetected = TPM_DEVICE_NULL;
@@ -184,6 +170,7 @@ Tcg2ConfigDriverEntryPoint (
}
PrivateData->TpmDeviceDetected = Tcg2DeviceDetection.TpmDeviceDetected;
+ Tcg2Configuration.TpmDevice = Tcg2DeviceDetection.TpmDeviceDetected;
//
// Save to variable so platform driver can get it.
@@ -208,6 +195,20 @@ Tcg2ConfigDriverEntryPoint (
}
//
+ // Save to variable so platform driver can get it.
+ //
+ Status = gRT->SetVariable (
+ TCG2_STORAGE_NAME,
+ &gTcg2ConfigFormSetGuid,
+ EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
+ sizeof(Tcg2Configuration),
+ &Tcg2Configuration
+ );
+ if (EFI_ERROR (Status)) {
+ DEBUG ((EFI_D_ERROR, "Tcg2ConfigDriver: Fail to set TCG2_STORAGE_NAME\n"));
+ }
+
+ //
// We should lock Tcg2DeviceDetection, because it contains information needed at S3.
//
Status = gBS->LocateProtocol (&gEdkiiVariableLockProtocolGuid, NULL, (VOID **)&VariableLockProtocol);