summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Library/PlatformBootManagerLib
diff options
context:
space:
mode:
Diffstat (limited to 'OvmfPkg/Library/PlatformBootManagerLib')
-rw-r--r--OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c16
-rw-r--r--OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf1
2 files changed, 16 insertions, 1 deletions
diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
index 579eae8780..fdd4db5ca8 100644
--- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
+++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
@@ -15,6 +15,8 @@
#include <Library/Tcg2PhysicalPresenceLib.h>
#include <Library/XenPlatformLib.h>
+#include <Library/QemuFwCfgSimpleParserLib.h>
+
//
// Global data
//
@@ -1843,6 +1845,18 @@ PlatformBootManagerAfterConsole (
EfiBootManagerRefreshAllBootOption ();
}
+ BOOLEAN ShellEnabled;
+ RETURN_STATUS RetStatus;
+
+ RetStatus = QemuFwCfgParseBool (
+ "opt/org.tianocore/EFIShellSupport",
+ &ShellEnabled
+ );
+
+ if (RETURN_ERROR (RetStatus)) {
+ ShellEnabled = TRUE;
+ }
+
//
// Register UEFI Shell
//
@@ -1850,7 +1864,7 @@ PlatformBootManagerAfterConsole (
&gUefiShellFileGuid,
L"EFI Internal Shell",
LOAD_OPTION_ACTIVE,
- TRUE
+ ShellEnabled
);
//
diff --git a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
index c6ffc1ed9e..1a422ebb0e 100644
--- a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
+++ b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
@@ -56,6 +56,7 @@
PlatformBmPrintScLib
Tcg2PhysicalPresenceLib
XenPlatformLib
+ QemuFwCfgSimpleParserLib
[Pcd]
gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent