diff options
Diffstat (limited to 'SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c')
-rw-r--r-- | SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c | 25 |
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
//
|