]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
SecurityPkg: Add a PCD to skip Opal password prompt
[mirror_edk2.git] / SecurityPkg / Tcg / Opal / OpalPassword / OpalDriver.c
index 38268539fb055b9ddb51f693e3cfc144bf06cbf1..734c5f06ff054fe35c1377c96d70784537d2c820 100644 (file)
@@ -988,6 +988,10 @@ OpalDriverRequestPassword (
 \r
     IsLocked = OpalDeviceLocked (&Dev->OpalDisk.SupportedAttributes, &Dev->OpalDisk.LockingFeature);\r
 \r
+    if (IsLocked && PcdGetBool (PcdSkipOpalDxeUnlock)) {\r
+      return;\r
+    }\r
+\r
     while (Count < MAX_PASSWORD_TRY_COUNT) {\r
       Password = OpalDriverPopUpPasswordInput (Dev, PopUpString, NULL, &PressEsc);\r
       if (PressEsc) {\r