summaryrefslogtreecommitdiffstats
path: root/SecurityPkg
diff options
context:
space:
mode:
authorEric Dong <eric.dong@intel.com>2016-06-02 15:17:59 +0800
committerStar Zeng <star.zeng@intel.com>2016-11-21 15:37:55 +0800
commit182d8208a4b0cf52fad839ba58d6fecae35b467c (patch)
tree697933dfa21ff6e1904dedf69a6bcfa7278edcca /SecurityPkg
parentd6b02b79b0fa2b10a0315f9c1de8ea10efdbc23b (diff)
downloadedk2-182d8208a4b0cf52fad839ba58d6fecae35b467c.tar.gz
edk2-182d8208a4b0cf52fad839ba58d6fecae35b467c.tar.bz2
edk2-182d8208a4b0cf52fad839ba58d6fecae35b467c.zip
SecurityPkg DxeTcgPhysicalPresenceLib: Enable Storage actions.
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>
Diffstat (limited to 'SecurityPkg')
-rw-r--r--SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c19
-rw-r--r--SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf1
2 files changed, 18 insertions, 2 deletions
diff --git a/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c b/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c
index 4f35be80bb..ca8de26b75 100644
--- a/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c
+++ b/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c
@@ -35,6 +35,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Guid/EventGroup.h>
#include <Guid/PhysicalPresenceData.h>
#include <Library/TcgPpVendorLib.h>
+#include <Library/TcgPhysicalPresenceStorageLib.h>
#define CONFIRM_BUFFER_SIZE 4096
@@ -1172,7 +1173,12 @@ TcgPhysicalPresenceLibProcessRequest (
EFI_TCG_PROTOCOL *TcgProtocol;
EDKII_VARIABLE_LOCK_PROTOCOL *VariableLockProtocol;
EFI_PHYSICAL_PRESENCE_FLAGS PpiFlags;
-
+
+ //
+ // Process the storage related action first.
+ //
+ TcgPhysicalPresenceStorageLibProcessRequest();
+
Status = gBS->LocateProtocol (&gEfiTcgProtocolGuid, NULL, (VOID **)&TcgProtocol);
if (EFI_ERROR (Status)) {
return ;
@@ -1317,7 +1323,16 @@ TcgPhysicalPresenceLibNeedUserConfirm(
BOOLEAN CmdEnable;
EFI_TCG_PROTOCOL *TcgProtocol;
EFI_PHYSICAL_PRESENCE_FLAGS PpiFlags;
-
+
+ //
+ // Process the storage related action first.
+ // If confirm need user confirm, just return TRUE.
+ // else continue check other actions.
+ //
+ if (TcgPhysicalPresenceStorageLibNeedUserConfirm()) {
+ return TRUE;
+ }
+
Status = gBS->LocateProtocol (&gEfiTcgProtocolGuid, NULL, (VOID **)&TcgProtocol);
if (EFI_ERROR (Status)) {
return FALSE;
diff --git a/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf b/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf
index 3aacba5c2b..8421dfae4d 100644
--- a/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf
+++ b/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf
@@ -55,6 +55,7 @@
PrintLib
HiiLib
TcgPpVendorLib
+ TcgPhysicalPresenceStorageLib
[Protocols]
gEfiTcgProtocolGuid ## SOMETIMES_CONSUMES