mirror of https://github.com/acidanthera/audk.git
QuarkPlatformPkg/PlatformBootManagerLib: Update boot mode handling
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>
This commit is contained in:
parent
8716ac5364
commit
a7f3ed1f52
|
@ -2,7 +2,7 @@
|
||||||
This file include all platform action which can be customized
|
This file include all platform action which can be customized
|
||||||
by IBV/OEM.
|
by IBV/OEM.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -354,9 +354,17 @@ PlatformBootManagerAfterConsole (
|
||||||
}
|
}
|
||||||
|
|
||||||
BootMode = GetBootModeHob();
|
BootMode = GetBootModeHob();
|
||||||
|
|
||||||
|
DEBUG((DEBUG_INFO, "PlatformBootManagerAfterConsole(): BootMode = %02x\n", BootMode));
|
||||||
|
|
||||||
switch (BootMode) {
|
switch (BootMode) {
|
||||||
|
case BOOT_ASSUMING_NO_CONFIGURATION_CHANGES:
|
||||||
|
case BOOT_WITH_MINIMAL_CONFIGURATION:
|
||||||
|
case BOOT_ON_S4_RESUME:
|
||||||
|
EfiBootManagerRefreshAllBootOption ();
|
||||||
|
break;
|
||||||
|
|
||||||
case BOOT_ON_FLASH_UPDATE:
|
case BOOT_ON_FLASH_UPDATE:
|
||||||
DEBUG((DEBUG_INFO, "Capsule Mode detected\n"));
|
|
||||||
if (FeaturePcdGet(PcdSupportUpdateCapsuleReset)) {
|
if (FeaturePcdGet(PcdSupportUpdateCapsuleReset)) {
|
||||||
EfiBootManagerConnectAll ();
|
EfiBootManagerConnectAll ();
|
||||||
EfiBootManagerRefreshAllBootOption ();
|
EfiBootManagerRefreshAllBootOption ();
|
||||||
|
@ -374,15 +382,6 @@ PlatformBootManagerAfterConsole (
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BOOT_IN_RECOVERY_MODE:
|
|
||||||
DEBUG((DEBUG_INFO, "Recovery Mode detected\n"));
|
|
||||||
// Passthrough
|
|
||||||
|
|
||||||
case BOOT_ASSUMING_NO_CONFIGURATION_CHANGES:
|
|
||||||
case BOOT_WITH_MINIMAL_CONFIGURATION:
|
|
||||||
case BOOT_WITH_FULL_CONFIGURATION:
|
|
||||||
case BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS:
|
|
||||||
case BOOT_WITH_DEFAULT_SETTINGS:
|
|
||||||
default:
|
default:
|
||||||
EfiBootManagerConnectAll ();
|
EfiBootManagerConnectAll ();
|
||||||
EfiBootManagerRefreshAllBootOption ();
|
EfiBootManagerRefreshAllBootOption ();
|
||||||
|
@ -390,14 +389,9 @@ PlatformBootManagerAfterConsole (
|
||||||
//
|
//
|
||||||
// Sync ESRT Cache from FMP Instance on demand after Connect All
|
// Sync ESRT Cache from FMP Instance on demand after Connect All
|
||||||
//
|
//
|
||||||
if ((BootMode != BOOT_ASSUMING_NO_CONFIGURATION_CHANGES) &&
|
if (EsrtManagement != NULL) {
|
||||||
(BootMode != BOOT_WITH_MINIMAL_CONFIGURATION) &&
|
EsrtManagement->SyncEsrtFmp();
|
||||||
(BootMode != BOOT_ON_S4_RESUME)) {
|
|
||||||
if (EsrtManagement != NULL) {
|
|
||||||
EsrtManagement->SyncEsrtFmp();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue