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>
This commit is contained in:
Stefan Berger 2021-12-16 21:37:22 -05:00 committed by mergify[bot]
parent f129b1f06f
commit ee1f8262b8
3 changed files with 17 additions and 0 deletions

View File

@ -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);

View File

@ -434,6 +434,11 @@ PlatformBootManagerBeforeConsole (
//
EfiBootManagerDispatchDeferredImages ();
//
// GPU passthrough only allows Console enablement after ROM image load
//
PlatformInitializeConsole (gPlatformConsole);
PlatformRegisterOptionsAndKeys ();
//

View File

@ -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,