From d2af9c4c632e4e9501e3e8428245afd7d8d212ae Mon Sep 17 00:00:00 2001 From: liushuai20 Date: Mon, 16 Dec 2024 14:45:42 +0800 Subject: [PATCH] Fix the system boot to a boot manager menu after priority boot option returns with a status of EFI_SUCCESS --- .../Library/PlatformBootManagerLib/MsPlatform.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/MsCorePkg/Library/PlatformBootManagerLib/MsPlatform.c b/MsCorePkg/Library/PlatformBootManagerLib/MsPlatform.c index 170e2e2109..620e644971 100644 --- a/MsCorePkg/Library/PlatformBootManagerLib/MsPlatform.c +++ b/MsCorePkg/Library/PlatformBootManagerLib/MsPlatform.c @@ -128,7 +128,6 @@ PlatformBootManagerPriorityBoot ( ) { EFI_BOOT_MANAGER_LOAD_OPTION BootOption; - EFI_BOOT_MANAGER_LOAD_OPTION BootManagerMenu; EFI_STATUS Status = EFI_SUCCESS; Status = DeviceBootManagerPriorityBoot (&BootOption); @@ -154,24 +153,12 @@ PlatformBootManagerPriorityBoot ( } if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "[Bds] VOL/+ or VOL/- detected, and unable to boot. Code=%r\n", Status)); + DEBUG ((DEBUG_ERROR, "[Bds] Boot priority override detected, and unable to boot. Code=%r\n", Status)); } else { // Attempt the priority boot option. EfiBootManagerBoot (&BootOption); Status = BootOption.Status; EfiBootManagerFreeLoadOption (&BootOption); - - // - // If the priority boot option returns with a status of EFI_SUCCESS, and platform firmware supports boot manager - // menu the boot manager will stop processing boot options here and present a boot manager menu to the user. - // - if (Status == EFI_SUCCESS) { - Status = EfiBootManagerGetBootManagerMenu (&BootManagerMenu); - if (!EFI_ERROR (Status)) { - EfiBootManagerBoot (&BootManagerMenu); - EfiBootManagerFreeLoadOption (&BootManagerMenu); - } - } } return;