diff options
author | jyao1 <jyao1> | 2013-09-18 05:31:18 +0000 |
---|---|---|
committer | jyao1 <jyao1@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-09-18 05:31:18 +0000 |
commit | c1d932429ef9700a2da64452546be14e92468b07 (patch) | |
tree | 5f2c09763c54a953d5525b6b5da48634992c2aa0 /SecurityPkg/Tcg/TcgConfigDxe | |
parent | 2e61fb38b6aaa17d22f1bf72332ccd4bc2f780eb (diff) | |
download | edk2-c1d932429ef9700a2da64452546be14e92468b07.tar.gz edk2-c1d932429ef9700a2da64452546be14e92468b07.tar.bz2 edk2-c1d932429ef9700a2da64452546be14e92468b07.zip |
Add TPM2 implementation.
signed off by: jiewen.yao@intel.com
reviewed by: guo.dong@intel.com
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14687 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'SecurityPkg/Tcg/TcgConfigDxe')
-rw-r--r-- | SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c | 8 | ||||
-rw-r--r-- | SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c index 2d3728cdb2..a9a10c9e10 100644 --- a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c +++ b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c @@ -1,7 +1,7 @@ /** @file
The module entry point for Tcg configuration module.
-Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2011 - 2013, 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
@@ -13,6 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/
#include "TcgConfigImpl.h"
+#include <Guid/TpmInstance.h>
/**
The entry point for Tcg configuration driver.
@@ -37,6 +38,11 @@ TcgConfigDriverEntryPoint ( TCG_CONFIG_PRIVATE_DATA *PrivateData;
EFI_TCG_PROTOCOL *TcgProtocol;
+ if (!CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), &gEfiTpmDeviceInstanceTpm12Guid)){
+ DEBUG ((EFI_D_ERROR, "No TPM12 instance required!\n"));
+ return EFI_UNSUPPORTED;
+ }
+
Status = TisPcRequestUseTpm ((TIS_TPM_HANDLE) (UINTN) TPM_BASE_ADDRESS);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "TPM not detected!\n"));
diff --git a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf index 5edd6ab4b8..cdfc89c2ec 100644 --- a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf +++ b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf @@ -1,7 +1,7 @@ ## @file
# Component name for Tcg configuration module.
#
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2011 - 2013, 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
@@ -56,6 +56,7 @@ gEfiPhysicalPresenceGuid
gEfiIfrTianoGuid
gTcgConfigFormSetGuid
+ gEfiTpmDeviceInstanceTpm12Guid
[Protocols]
gEfiHiiConfigAccessProtocolGuid ## PRODUCES
@@ -67,6 +68,7 @@ [Pcd]
gEfiSecurityPkgTokenSpaceGuid.PcdHideTpm
+ gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid
[Depex]
gEfiHiiConfigRoutingProtocolGuid AND
|