[edk2-devel] [PATCH v3] OvmfPkg: Call PlatformInitializeConsole for GPU passthrough case
Stefan Berger
stefanb at linux.ibm.com
Fri Dec 17 02:44:29 UTC 2021
v2 had lost the cc: list for some reason.
I opened this PR: https://github.com/tianocore/edk2/pull/2319
Stefan
On 12/16/21 21:41, Stefan Berger wrote:
> 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.
>
> Fixes: b8675deaa819631db2667df63f89799fe65fc906
> Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=3771
> Cc: Ard Biesheuvel <ardb+tianocore at kernel.org>
> Cc: Jiewen Yao <jiewen.yao at intel.com>
> Cc: Jordan Justen <jordan.l.justen at intel.com>
> Cc: Gerd Hoffmann <kraxel at redhat.com>
> Signed-off-by: Stefan Berger <stefanb at linux.ibm.com>
> Tested-by: Shivanshu Goyal <shivanshu3 at gmail.com>
> ---
> OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c | 7 +++++++
> OvmfPkg/Library/PlatformBootManagerLibBhyve/BdsPlatform.c | 5 +++++
> OvmfPkg/Library/PlatformBootManagerLibGrub/BdsPlatform.c | 5 +++++
> 3 files changed, 17 insertions(+)
>
> 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,
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85036): https://edk2.groups.io/g/devel/message/85036
Mute This Topic: https://groups.io/mt/87782159/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list