]> git.proxmox.com Git - mirror_edk2.git/commitdiff
QuarkPlatformPkg/PlatformBootManagerLib: Update boot mode handling
authorMichael D Kinney <michael.d.kinney@intel.com>
Tue, 7 Nov 2017 22:36:28 +0000 (14:36 -0800)
committerMichael D Kinney <michael.d.kinney@intel.com>
Wed, 15 Nov 2017 00:47:35 +0000 (16:47 -0800)
https://bugzilla.tianocore.org/show_bug.cgi?id=768

Update and simplify boot mode handling logic.  This includes
performing minimum connects for the following boot modes:

  BOOT_ASSUMING_NO_CONFIGURATION_CHANGES
  BOOT_WITH_MINIMAL_CONFIGURATION
  BOOT_ON_S4_RESUME

Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Kelly Steele <kelly.steele@intel.com>
QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c

index 3c213180690d740c55bfc2d4faaba9a1f06668b2..53391c6077fe75008f969f9effa752aeb94ff154 100644 (file)
@@ -2,7 +2,7 @@
 This file include all platform action which can be customized\r
 by IBV/OEM.\r
 \r
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -354,9 +354,17 @@ PlatformBootManagerAfterConsole (
   }\r
 \r
   BootMode = GetBootModeHob();\r
+\r
+  DEBUG((DEBUG_INFO, "PlatformBootManagerAfterConsole(): BootMode = %02x\n", BootMode));\r
+\r
   switch (BootMode) {\r
+  case BOOT_ASSUMING_NO_CONFIGURATION_CHANGES:\r
+  case BOOT_WITH_MINIMAL_CONFIGURATION:\r
+  case BOOT_ON_S4_RESUME:\r
+    EfiBootManagerRefreshAllBootOption ();\r
+    break;\r
+\r
   case BOOT_ON_FLASH_UPDATE:\r
-    DEBUG((DEBUG_INFO, "Capsule Mode detected\n"));\r
     if (FeaturePcdGet(PcdSupportUpdateCapsuleReset)) {\r
       EfiBootManagerConnectAll ();\r
       EfiBootManagerRefreshAllBootOption ();\r
@@ -374,15 +382,6 @@ PlatformBootManagerAfterConsole (
     }\r
     break;\r
 \r
-  case BOOT_IN_RECOVERY_MODE:\r
-    DEBUG((DEBUG_INFO, "Recovery Mode detected\n"));\r
-    // Passthrough\r
-\r
-  case BOOT_ASSUMING_NO_CONFIGURATION_CHANGES:\r
-  case BOOT_WITH_MINIMAL_CONFIGURATION:\r
-  case BOOT_WITH_FULL_CONFIGURATION:\r
-  case BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS:\r
-  case BOOT_WITH_DEFAULT_SETTINGS:\r
   default:\r
     EfiBootManagerConnectAll ();\r
     EfiBootManagerRefreshAllBootOption ();\r
@@ -390,14 +389,9 @@ PlatformBootManagerAfterConsole (
     //\r
     // Sync ESRT Cache from FMP Instance on demand after Connect All\r
     //\r
-    if ((BootMode != BOOT_ASSUMING_NO_CONFIGURATION_CHANGES) &&\r
-        (BootMode != BOOT_WITH_MINIMAL_CONFIGURATION) &&\r
-        (BootMode != BOOT_ON_S4_RESUME)) {\r
-      if (EsrtManagement != NULL) {\r
-        EsrtManagement->SyncEsrtFmp();\r
-      }\r
+    if (EsrtManagement != NULL) {\r
+      EsrtManagement->SyncEsrtFmp();\r
     }\r
-\r
     break;\r
   }\r
 \r