summaryrefslogtreecommitdiff
path: root/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c
diff options
context:
space:
mode:
Diffstat (limited to 'SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c')
-rw-r--r--SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c8
1 files changed, 7 insertions, 1 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"));