]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c
Revert old "Enable BlockSid related PP actions" patch series.
[mirror_edk2.git] / SecurityPkg / Tcg / Opal / OpalPasswordDxe / OpalDriver.c
index 1c26a5e3530948ab3c22ec5cc156ff141c2e1674..91324cd61df02b44e0384036f143872c781d395b 100644 (file)
@@ -417,15 +417,28 @@ ReadyToBootCallback (
   IN VOID             *Context\r
   )\r
 {\r
-  OPAL_DRIVER_DEVICE                         *Itr;\r
-  TCG_RESULT                                 Result;\r
-  OPAL_SESSION                               Session;\r
-  UINT32                                     PpStorageFlag;\r
+  EFI_STATUS          Status;\r
+  OPAL_DRIVER_DEVICE* Itr;\r
+  TCG_RESULT          Result;\r
+  OPAL_EXTRA_INFO_VAR OpalExtraInfo;\r
+  UINTN               DataSize;\r
+  OPAL_SESSION        Session;\r
 \r
   gBS->CloseEvent (Event);\r
 \r
-  PpStorageFlag = TcgPhysicalPresenceStorageLibReturnStorageFlags();\r
-  if ((PpStorageFlag & TCG_BIOS_STORAGE_MANAGEMENT_FLAG_ENABLE_BLOCK_SID) != 0) {\r
+  DataSize = sizeof (OPAL_EXTRA_INFO_VAR);\r
+  Status = gRT->GetVariable (\r
+                  OPAL_EXTRA_INFO_VAR_NAME,\r
+                  &gOpalExtraInfoVariableGuid,\r
+                  NULL,\r
+                  &DataSize,\r
+                  &OpalExtraInfo\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    return;\r
+  }\r
+\r
+  if (OpalExtraInfo.EnableBlockSid == TRUE) {\r
     //\r
     // Send BlockSID command to each Opal disk\r
     //\r