summaryrefslogtreecommitdiff
path: root/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c
diff options
context:
space:
mode:
authorEric Dong <eric.dong@intel.com>2016-11-23 16:26:36 +0800
committerStar Zeng <star.zeng@intel.com>2016-11-23 16:30:03 +0800
commit252b891b2b49dddad5e3850146719d14c22f1c60 (patch)
tree7e430a6a78bcc4284d8e14c2e3379b0350b998a6 /SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c
parent67bb14259baaf2237b81bcbf2568517b3310b294 (diff)
Revert old "Enable BlockSid related PP actions" patch series.
New solution for this issue will be provided. This reverts commits from d1947ce509d745f32db6b7fecc03dc9c778b9350 to bda034c34deea6eb43edcef28018a9ace8f04637. Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com>
Diffstat (limited to 'SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c')
-rw-r--r--SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c b/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c
index 1c26a5e353..91324cd61d 100644
--- a/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c
+++ b/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c
@@ -417,15 +417,28 @@ ReadyToBootCallback (
IN VOID *Context
)
{
- OPAL_DRIVER_DEVICE *Itr;
- TCG_RESULT Result;
- OPAL_SESSION Session;
- UINT32 PpStorageFlag;
+ EFI_STATUS Status;
+ OPAL_DRIVER_DEVICE* Itr;
+ TCG_RESULT Result;
+ OPAL_EXTRA_INFO_VAR OpalExtraInfo;
+ UINTN DataSize;
+ OPAL_SESSION Session;
gBS->CloseEvent (Event);
- PpStorageFlag = TcgPhysicalPresenceStorageLibReturnStorageFlags();
- if ((PpStorageFlag & TCG_BIOS_STORAGE_MANAGEMENT_FLAG_ENABLE_BLOCK_SID) != 0) {
+ DataSize = sizeof (OPAL_EXTRA_INFO_VAR);
+ Status = gRT->GetVariable (
+ OPAL_EXTRA_INFO_VAR_NAME,
+ &gOpalExtraInfoVariableGuid,
+ NULL,
+ &DataSize,
+ &OpalExtraInfo
+ );
+ if (EFI_ERROR (Status)) {
+ return;
+ }
+
+ if (OpalExtraInfo.EnableBlockSid == TRUE) {
//
// Send BlockSID command to each Opal disk
//