OvmfPkg/QemuVideoDxe: Remove dependency on OptionRomPkg

Update the QemuVideoDxe driver to not depend on the
OptionRomPkg to support moving OptionRomPkg to the
edk2-platforms repository.

The only dependency on the OptionRomPkg is the use of
PcdDriverSupportedEfiVersion to set the version value in the
EFI Driver Supported EFI Version Protocol.

Quoting the UEFI-2.8 spec, "This protocol is required for EFI
drivers that are *on* PCI and other plug in cards" (emphasis ours).
However, QemuVideoDxe is always part of the OVMF platform firmware,
and is never read by PciBusDxe from the PCI ROM BAR of QEMU's
emulated graphics cards.

Since this protocol does not apply to QEMU environment, remove
both the PCD and the installation of the EFI Driver Supported EFI
Version Protocol.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
Michael D Kinney
2019-05-09 10:38:07 -07:00
parent 62fdb9bbc5
commit cd5147734c
4 changed files with 3 additions and 36 deletions

View File

@@ -2,7 +2,7 @@
This driver is a sample implementation of the Graphics Output Protocol for
the QEMU (Cirrus Logic 5446) video controller.
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -982,18 +982,5 @@ InitializeQemuVideo (
);
ASSERT_EFI_ERROR (Status);
//
// Install EFI Driver Supported EFI Version Protocol required for
// EFI drivers that are on PCI and other plug in cards.
//
gQemuVideoDriverSupportedEfiVersion.FirmwareVersion = PcdGet32 (PcdDriverSupportedEfiVersion);
Status = gBS->InstallMultipleProtocolInterfaces (
&ImageHandle,
&gEfiDriverSupportedEfiVersionProtocolGuid,
&gQemuVideoDriverSupportedEfiVersion,
NULL
);
ASSERT_EFI_ERROR (Status);
return Status;
}