summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/BdsDxe
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2016-06-21 13:04:31 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2016-06-23 15:18:09 +0800
commitf5cbc197d4a9599fc955e5805b0e169fd054be11 (patch)
treec85b36d63d203736ad17cfc5a2cdba9e665f4f01 /MdeModulePkg/Universal/BdsDxe
parent142c00c3d659a6d5d66416385b4c93fd9a9f10e6 (diff)
downloadedk2-f5cbc197d4a9599fc955e5805b0e169fd054be11.tar.gz
edk2-f5cbc197d4a9599fc955e5805b0e169fd054be11.tar.bz2
edk2-f5cbc197d4a9599fc955e5805b0e169fd054be11.zip
MdeModulePkg/Bds: Do not boot to UI again when BootNext points to UI
Per UEFI spec the successful returning of boot option triggers boot to UI. But when the BootNext just points to UI, it causes confusing. So the patch avoids booting to UI again when the BootNext points to UI. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Amy Chan <amy.chan@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal/BdsDxe')
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BdsEntry.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
index 3734ff954d..741ddc302b 100644
--- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
+++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
@@ -6,7 +6,7 @@
to enter BDS phase.
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
-Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
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
@@ -923,9 +923,10 @@ BdsEntry (
if (!EFI_ERROR (Status)) {
EfiBootManagerBoot (&LoadOption);
EfiBootManagerFreeLoadOption (&LoadOption);
- if (LoadOption.Status == EFI_SUCCESS) {
+ if ((LoadOption.Status == EFI_SUCCESS) && (LoadOption.OptionNumber != BootManagerMenu.OptionNumber)) {
//
// Boot to Boot Manager Menu upon EFI_SUCCESS
+ // Exception: Do not boot again when the BootNext points to Boot Manager Menu.
//
EfiBootManagerBoot (&BootManagerMenu);
}