summaryrefslogtreecommitdiff
path: root/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c
diff options
context:
space:
mode:
authorZhang, Chao B <chao.b.zhang@intel.com>2016-02-22 13:51:53 +0800
committerZhang, Chao B <chao.b.zhang@intel.com>2016-02-22 14:19:04 +0800
commit1826b5e63d0b77437bb846f6f34bf7bf5cf13f47 (patch)
treecfe9820fa8f7b4c078dd836ff910fed99fe67de5 /SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c
parent0a38a95a35e30490be5ceab2517da37f8fcbb3fa (diff)
downloadedk2-platforms-1826b5e63d0b77437bb846f6f34bf7bf5cf13f47.tar.xz
SecurityPkg: TcgConfigDxe: Move TPM state string update to CallBack function
TPM state string update requires HiiHandle which may not be initialized when calling ExtractConfig. Move this logic to CallBack function. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Diffstat (limited to 'SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c')
-rw-r--r--SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c
index 29ec7b0621..a9d3105456 100644
--- a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c
+++ b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c
@@ -73,9 +73,15 @@ TcgConfigDriverEntryPoint (
if (PrivateData == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
+ PrivateData->Configuration = AllocatePool (sizeof (TCG_CONFIGURATION));
+ if (PrivateData->Configuration == NULL) {
+ Status = EFI_OUT_OF_RESOURCES;
+ goto ErrorExit;
+ }
+
PrivateData->TcgProtocol = TcgProtocol;
-
+
//
// Install TCG configuration form
//