]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkNt32Pkg/Dxe/PlatformBds/Generic/DeviceMngr/DeviceManager.c
Bug fix for "Tiano BIOS needs to implement an automatic reboot when BIOS settings...
[mirror_edk2.git] / EdkNt32Pkg / Dxe / PlatformBds / Generic / DeviceMngr / DeviceManager.c
index 0e73a4e3fe5492221bf4ef3e4d983c9fd7f4f6a8..3f648b7de6d43eb979b706cd3591758fdb51485b 100644 (file)
@@ -197,6 +197,7 @@ Returns:
   UINTN               VideoOptionSize;\r
   EFI_HII_HANDLE      *HiiHandles;\r
   UINT16              HandleBufferLength;\r
+  BOOLEAN                BootDeviceMngrMenuResetRequired;\r
 \r
   IfrOptionList       = NULL;\r
   VideoOption         = NULL;\r
@@ -435,6 +436,7 @@ Returns:
     gBS->FreePool (IfrOptionList);\r
   }\r
 \r
+  BootDeviceMngrMenuResetRequired = FALSE;\r
   Status = gBrowser->SendForm (\r
                       gBrowser,\r
                       TRUE,                             // Use the database\r
@@ -444,9 +446,13 @@ Returns:
                       FPCallbackInfo.CallbackHandle,\r
                       (UINT8 *) &FPCallbackInfo.Data,\r
                       NULL,\r
-                      NULL\r
+                      &BootDeviceMngrMenuResetRequired\r
                       );\r
 \r
+  if (BootDeviceMngrMenuResetRequired) {\r
+    EnableResetRequired ();\r
+  }\r
+\r
   Hii->ResetStrings (Hii, FPCallbackInfo.DevMgrHiiHandle);\r
 \r
   //\r
@@ -454,6 +460,7 @@ Returns:
   // a target to display\r
   //\r
   if (gCallbackKey != 0 && gCallbackKey < 0x2000) {\r
+    BootDeviceMngrMenuResetRequired = FALSE;\r
     Status = gBrowser->SendForm (\r
                         gBrowser,\r
                         TRUE,                             // Use the database\r
@@ -463,9 +470,12 @@ Returns:
                         NULL,                             // This is the handle that the interface to the callback was installed on\r
                         NULL,\r
                         NULL,\r
-                        NULL\r
+                        &BootDeviceMngrMenuResetRequired\r
                         );\r
 \r
+    if (BootDeviceMngrMenuResetRequired) {\r
+      EnableResetRequired ();\r
+    }\r
     //\r
     // Force return to Device Manager\r
     //\r