]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg DxeTcgPhysicalPresenceLib: Enable Storage actions.
authorEric Dong <eric.dong@intel.com>
Thu, 2 Jun 2016 07:17:59 +0000 (15:17 +0800)
committerStar Zeng <star.zeng@intel.com>
Mon, 21 Nov 2016 07:37:55 +0000 (15:37 +0800)
After enable storage related actions in the
TcgPhysicalPresenceStorageLib, use this library to support
storage related actions in this library.

Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c
SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf

index 4f35be80bb2d6589d84c9e018647c838848b3381..ca8de26b75a0a0d8d04ea58eab5445787b73f051 100644 (file)
@@ -35,6 +35,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Guid/EventGroup.h>\r
 #include <Guid/PhysicalPresenceData.h>\r
 #include <Library/TcgPpVendorLib.h>\r
+#include <Library/TcgPhysicalPresenceStorageLib.h>\r
 \r
 #define CONFIRM_BUFFER_SIZE         4096\r
 \r
@@ -1172,7 +1173,12 @@ TcgPhysicalPresenceLibProcessRequest (
   EFI_TCG_PROTOCOL                  *TcgProtocol;\r
   EDKII_VARIABLE_LOCK_PROTOCOL      *VariableLockProtocol;\r
   EFI_PHYSICAL_PRESENCE_FLAGS       PpiFlags;\r
-  \r
+\r
+  //\r
+  // Process the storage related action first.\r
+  //\r
+  TcgPhysicalPresenceStorageLibProcessRequest();\r
+\r
   Status = gBS->LocateProtocol (&gEfiTcgProtocolGuid, NULL, (VOID **)&TcgProtocol);\r
   if (EFI_ERROR (Status)) {\r
     return ;\r
@@ -1317,7 +1323,16 @@ TcgPhysicalPresenceLibNeedUserConfirm(
   BOOLEAN                      CmdEnable;\r
   EFI_TCG_PROTOCOL             *TcgProtocol;\r
   EFI_PHYSICAL_PRESENCE_FLAGS  PpiFlags;\r
-  \r
+\r
+  //\r
+  // Process the storage related action first.\r
+  // If confirm need user confirm, just return TRUE.\r
+  // else continue check other actions.\r
+  //\r
+  if (TcgPhysicalPresenceStorageLibNeedUserConfirm()) {\r
+    return TRUE;\r
+  }\r
+\r
   Status = gBS->LocateProtocol (&gEfiTcgProtocolGuid, NULL, (VOID **)&TcgProtocol);\r
   if (EFI_ERROR (Status)) {\r
     return FALSE;\r
index 3aacba5c2b19b91360005c782caf567ec3671ba3..8421dfae4db0954f87061d1b59719d5af7d2597c 100644 (file)
@@ -55,6 +55,7 @@
   PrintLib\r
   HiiLib\r
   TcgPpVendorLib\r
+  TcgPhysicalPresenceStorageLib\r
 \r
 [Protocols]\r
   gEfiTcgProtocolGuid                   ## SOMETIMES_CONSUMES\r