diff options
author | Stefan Berger <stefanb@linux.ibm.com> | 2021-12-16 21:37:22 -0500 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-17 17:36:14 +0000 |
commit | ee1f8262b83dd88b30091e6e81221ff299796099 (patch) | |
tree | 58bfeb0ab1cf83c99f459d6f832e3c3db2c29dc4 /OvmfPkg | |
parent | f129b1f06f46f00fcfb770fad0f3cc400408ecf5 (diff) | |
download | edk2-ee1f8262b83dd88b30091e6e81221ff299796099.tar.gz edk2-ee1f8262b83dd88b30091e6e81221ff299796099.tar.bz2 edk2-ee1f8262b83dd88b30091e6e81221ff299796099.zip |
OvmfPkg: Call PlatformInitializeConsole for GPU passthrough case
For GPU passthrough support we have to initialize the console after
EfiBootManagerDispatchDeferredImages() has loaded ROMs, so call it after
this. This was the calling order before the TCG physical presence support
had to be moved and the console initialized earlier so user interaction
could be supported before processing TCG physical presence opcodes.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Tested-by: Shivanshu Goyal <shivanshu3@gmail.com>
Acked-by: Jiewen Yao <jiewen.yao@intel.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'OvmfPkg')
3 files changed, 17 insertions, 0 deletions
diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c index 5feadc51d7..0918c35f1f 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c @@ -448,6 +448,13 @@ PlatformBootManagerBeforeConsole ( //
EfiBootManagerDispatchDeferredImages ();
+ //
+ // GPU passthrough only allows Console enablement after ROM image load
+ //
+ PlatformInitializeConsole (
+ XenDetected () ? gXenPlatformConsole : gPlatformConsole
+ );
+
FrontPageTimeout = GetFrontPageTimeoutFromQemu ();
PcdStatus = PcdSet16S (PcdPlatformBootTimeOut, FrontPageTimeout);
ASSERT_RETURN_ERROR (PcdStatus);
diff --git a/OvmfPkg/Library/PlatformBootManagerLibBhyve/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLibBhyve/BdsPlatform.c index 119f24b330..bf2701965f 100644 --- a/OvmfPkg/Library/PlatformBootManagerLibBhyve/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBootManagerLibBhyve/BdsPlatform.c @@ -434,6 +434,11 @@ PlatformBootManagerBeforeConsole ( //
EfiBootManagerDispatchDeferredImages ();
+ //
+ // GPU passthrough only allows Console enablement after ROM image load
+ //
+ PlatformInitializeConsole (gPlatformConsole);
+
PlatformRegisterOptionsAndKeys ();
//
diff --git a/OvmfPkg/Library/PlatformBootManagerLibGrub/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLibGrub/BdsPlatform.c index 9c6848bbff..a402589206 100644 --- a/OvmfPkg/Library/PlatformBootManagerLibGrub/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBootManagerLibGrub/BdsPlatform.c @@ -392,6 +392,11 @@ PlatformBootManagerBeforeConsole ( //
EfiBootManagerDispatchDeferredImages ();
+ //
+ // GPU passthrough only allows Console enablement after ROM image load
+ //
+ PlatformInitializeConsole (gPlatformConsole);
+
Status = gRT->SetVariable (
EFI_TIME_OUT_VARIABLE_NAME,
&gEfiGlobalVariableGuid,
|