diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c index 722776b2b5..c13e8f8bfc 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c @@ -14,7 +14,6 @@ #include "BdsPlatform.h" #include -#include // @@ -1389,14 +1388,10 @@ Routine Description: // Process QEMU's -kernel command line option // TryRunningQemuKernel (); - BdsLibEnumerateAllBootOption (BootOptionList); - SetBootOrderFromQemu (BootOptionList); - // - // The BootOrder variable may have changed, reload the in-memory list with - // it. - // - BdsLibBuildOptionFromVar (BootOptionList, L"BootOrder"); + EfiBootManagerRefreshAllBootOption (); + + SetBootOrderFromQemu (NULL); } /** diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h index b14410cc31..4950d3ae11 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h @@ -47,6 +47,7 @@ Abstract: #include #include #include +#include #include #include