From 4b04d9d73604080a42daf737c39b98d4e1245a51 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Wed, 26 Jun 2019 12:37:41 +0100 Subject: OvmfPkg: Don't build in QemuVideoDxe when we have CSM QemuVideoDxe installs its own legacy INT 10h handler for the benefit of systems like Windows 2008r2 which attempt to use INT 10h even when booted via EFI. This interacts extremely badly with a CSM actually attempting to install a real video BIOS. The last thing done before invoking a legacy OpROM is to call INT 10h to set a plain text mode. In the case where it's the video BIOS OpROM being loaded, INT 10h will normally point to an iret stub in the CSM itself. Unless QemuVideoDxe has changed INT10h to point to a location in the 0xC0000 segment that it didn't allocate properly, so the real OpROM has been shadowed over them top of it, and the INT 10h vector now points to some random place in the middle of the newly-shadowed OpROM. Don't Do That Then. QemuVideoDxe doesn't do any acceleration and just sets up a linear framebuffer, so we don't lose much by just unconditionally using BiosVideoDxe instead when CSM is present. Signed-off-by: David Woodhouse Reviewed-by: Laszlo Ersek Message-Id: <20190626113742.819933-4-dwmw2@infradead.org> --- OvmfPkg/OvmfPkgX64.fdf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OvmfPkg/OvmfPkgX64.fdf') diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf index 5af3cdc93d..7440707256 100644 --- a/OvmfPkg/OvmfPkgX64.fdf +++ b/OvmfPkg/OvmfPkgX64.fdf @@ -311,9 +311,10 @@ INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf 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