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/Bhyve/BhyveRfbDxe/GopDriver.c | 2 -- OvmfPkg/Bhyve/BhyveX64.dsc | 6 ------ OvmfPkg/Bhyve/BhyveX64.fdf | 3 --- 3 files changed, 11 deletions(-) (limited to 'OvmfPkg/Bhyve') diff --git a/OvmfPkg/Bhyve/BhyveRfbDxe/GopDriver.c b/OvmfPkg/Bhyve/BhyveRfbDxe/GopDriver.c index bd8a0d804b..8291601cb6 100644 --- a/OvmfPkg/Bhyve/BhyveRfbDxe/GopDriver.c +++ b/OvmfPkg/Bhyve/BhyveRfbDxe/GopDriver.c @@ -302,9 +302,7 @@ EmuGopDriverBindingStart ( // // Install int10 handler // - #ifndef CSM_ENABLE InstallVbeShim (L"Framebuffer", Private->FbAddr); - #endif Done: if (EFI_ERROR (Status)) { diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc index 18b2dcece9..06d59b04b5 100644 --- a/OvmfPkg/Bhyve/BhyveX64.dsc +++ b/OvmfPkg/Bhyve/BhyveX64.dsc @@ -765,12 +765,6 @@ MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf -!ifdef $(CSM_ENABLE) - IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/VideoDxe.inf { - - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf - } -!endif # OvmfPkg/Csm/LegacyBiosDxe/LegacyBiosDxe.inf !ifdef $(CSM_ENABLE) OvmfPkg/Bhyve/Csm/BhyveCsm16/BhyveCsm16.inf diff --git a/OvmfPkg/Bhyve/BhyveX64.fdf b/OvmfPkg/Bhyve/BhyveX64.fdf index 282586fa81..13e66c7304 100644 --- a/OvmfPkg/Bhyve/BhyveX64.fdf +++ b/OvmfPkg/Bhyve/BhyveX64.fdf @@ -296,9 +296,6 @@ INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf -!ifdef $(CSM_ENABLE) -INF IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/VideoDxe.inf -!endif #INF OvmfPkg/Csm/LegacyBiosDxe/LegacyBiosDxe.inf !ifdef $(CSM_ENABLE) INF RuleOverride=CSM OvmfPkg/Bhyve/Csm/BhyveCsm16/BhyveCsm16.inf -- cgit v1.2.3