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>
This commit is contained in:
parent
d6b02b79b0
commit
182d8208a4
@ -35,6 +35,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#include <Guid/EventGroup.h>
|
#include <Guid/EventGroup.h>
|
||||||
#include <Guid/PhysicalPresenceData.h>
|
#include <Guid/PhysicalPresenceData.h>
|
||||||
#include <Library/TcgPpVendorLib.h>
|
#include <Library/TcgPpVendorLib.h>
|
||||||
|
#include <Library/TcgPhysicalPresenceStorageLib.h>
|
||||||
|
|
||||||
#define CONFIRM_BUFFER_SIZE 4096
|
#define CONFIRM_BUFFER_SIZE 4096
|
||||||
|
|
||||||
@ -1173,6 +1174,11 @@ TcgPhysicalPresenceLibProcessRequest (
|
|||||||
EDKII_VARIABLE_LOCK_PROTOCOL *VariableLockProtocol;
|
EDKII_VARIABLE_LOCK_PROTOCOL *VariableLockProtocol;
|
||||||
EFI_PHYSICAL_PRESENCE_FLAGS PpiFlags;
|
EFI_PHYSICAL_PRESENCE_FLAGS PpiFlags;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Process the storage related action first.
|
||||||
|
//
|
||||||
|
TcgPhysicalPresenceStorageLibProcessRequest();
|
||||||
|
|
||||||
Status = gBS->LocateProtocol (&gEfiTcgProtocolGuid, NULL, (VOID **)&TcgProtocol);
|
Status = gBS->LocateProtocol (&gEfiTcgProtocolGuid, NULL, (VOID **)&TcgProtocol);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return ;
|
return ;
|
||||||
@ -1318,6 +1324,15 @@ TcgPhysicalPresenceLibNeedUserConfirm(
|
|||||||
EFI_TCG_PROTOCOL *TcgProtocol;
|
EFI_TCG_PROTOCOL *TcgProtocol;
|
||||||
EFI_PHYSICAL_PRESENCE_FLAGS PpiFlags;
|
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);
|
Status = gBS->LocateProtocol (&gEfiTcgProtocolGuid, NULL, (VOID **)&TcgProtocol);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -55,6 +55,7 @@
|
|||||||
PrintLib
|
PrintLib
|
||||||
HiiLib
|
HiiLib
|
||||||
TcgPpVendorLib
|
TcgPpVendorLib
|
||||||
|
TcgPhysicalPresenceStorageLib
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiTcgProtocolGuid ## SOMETIMES_CONSUMES
|
gEfiTcgProtocolGuid ## SOMETIMES_CONSUMES
|
||||||
|
Loading…
x
Reference in New Issue
Block a user