From ac79397267fe3b9e010549ace38a1e4c8c360d54 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Sat, 11 Nov 2023 00:57:51 +0100 Subject: OvmfPkg: exclude the CSM-based VideoDxe driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CSM-based VideoDxe driver is a special UEFI_DRIVER module that both follows and doesn't follow the UEFI driver model. Namely, in the Supported and Start members of its Driver Binding Protocol instance, it consumes the Legacy Bios Protocol directly from the UEFI protocol database, as opposed to (only) opening protocols on the handle that it is supposed to bind. Furthermore, the driver "marks" its own image handle with the NULL-interface "Legacy Bios" (pseudo-protocol) GUID, in order to "inform back" the provider of the Legacy Bios Protocol, i.e., LegacyBiosDxe, that VideoDxe is a "BIOS Thunk Driver" in the system. Quoting "OvmfPkg/Csm/Include/Guid/LegacyBios.h", such a driver follows the UEFI Driver Model, but still uses the Int86() or FarCall() services of the Legacy Bios Protocol as the basis for the UEFI protocol it produces. In a sense, there is a circular dependency between VideoDxe and LegacyBiosDxe; each knows about the other. However, VideoDxe is a UEFI_DRIVER, while LegacyBiosDxe is a platform DXE_DRIVER with a very long DEPEX. Therefore, for keeping dependencies conceptually intact, first exclude VideoDxe from the OVMF platforms. Always include the hypervisor-specific real UEFI video driver. --*-- Note that the pathname "IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/VideoDxe.inf" in the bhyve platform DSC and FDF files is bogus anyway. Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Corvin Köhne Cc: Gerd Hoffmann Cc: Jiewen Yao Cc: Rebecca Cran Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4588 Signed-off-by: Laszlo Ersek Message-Id: <20231110235820.644381-9-lersek@redhat.com> Reviewed-by: Jiewen Yao Reviewed-by: Ard Biesheuvel Acked-by: Corvin Köhne Acked-by: Gerd Hoffmann --- OvmfPkg/OvmfPkgX64.fdf | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'OvmfPkg/OvmfPkgX64.fdf') diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf index 9c35b6e848..3ee7e1be9b 100644 --- a/OvmfPkg/OvmfPkgX64.fdf +++ b/OvmfPkg/OvmfPkgX64.fdf @@ -360,13 +360,11 @@ INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf !ifdef $(CSM_ENABLE) -INF OvmfPkg/Csm/BiosThunk/VideoDxe/VideoDxe.inf INF OvmfPkg/Csm/LegacyBiosDxe/LegacyBiosDxe.inf INF RuleOverride=CSM OvmfPkg/Csm/Csm16/Csm16.inf -!else -INF OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf !endif +INF OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf INF OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf INF OvmfPkg/VirtioGpuDxe/VirtioGpu.inf INF OvmfPkg/PlatformDxe/Platform.inf -- cgit v1.2.3