[edk2] [PATCH v4 0/3] OvmfPkg/QemuVideoDxe: Add VMWare SVGA framebuffer support

Phil Dennis-Jordan posted 3 patches 6 years, 11 months ago
Only 1 patches received!
There is a newer version of this series
OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf         |   6 +
OvmfPkg/Include/IndustryStandard/VmwareSvga.h | 104 +++++++++++++
OvmfPkg/QemuVideoDxe/Qemu.h                   |  29 ++++
OvmfPkg/QemuVideoDxe/UnalignedIoInternal.h    |  59 +++++++
OvmfPkg/QemuVideoDxe/Driver.c                 | 128 +++++++++++++++-
OvmfPkg/QemuVideoDxe/Gop.c                    |  61 +++++++-
OvmfPkg/QemuVideoDxe/Initialize.c             | 161 ++++++++++++++++++++
OvmfPkg/QemuVideoDxe/UnalignedIoGcc.c         |  70 +++++++++
OvmfPkg/QemuVideoDxe/UnalignedIoIcc.c         |  80 ++++++++++
OvmfPkg/QemuVideoDxe/UnalignedIoMsc.c         |  78 ++++++++++
OvmfPkg/QemuVideoDxe/UnalignedIoUnsupported.c |  66 ++++++++
11 files changed, 835 insertions(+), 7 deletions(-)
create mode 100644 OvmfPkg/Include/IndustryStandard/VmwareSvga.h
create mode 100644 OvmfPkg/QemuVideoDxe/UnalignedIoInternal.h
create mode 100644 OvmfPkg/QemuVideoDxe/UnalignedIoGcc.c
create mode 100644 OvmfPkg/QemuVideoDxe/UnalignedIoIcc.c
create mode 100644 OvmfPkg/QemuVideoDxe/UnalignedIoMsc.c
create mode 100644 OvmfPkg/QemuVideoDxe/UnalignedIoUnsupported.c
[edk2] [PATCH v4 0/3] OvmfPkg/QemuVideoDxe: Add VMWare SVGA framebuffer support
Posted by Phil Dennis-Jordan 6 years, 11 months ago
This extends the QemuVideoDxe driver to support the VMWare SVGA display
device implemented by Qemu. Drivers for this device exist for guest OSes
which do not support Qemu's other display adapters, so supporting it in
OVMF is useful in conjunction with those OSes.

I've tried to follow the existing pattern for device-specific code in
OVMF's QemuVideoDxe driver as much as possible, with a minimum of
additional code.

For the functionality this driver uses, 2 I/O ports are used with
32-bit wide reads and writes. Unfortunately, one of them is not 32-bit
aligned. This is fine as far as x86/x86-64 is concerned, but neither
EDK2's IoLib nor other platforms support such an access pattern.
This issue was already encountered/discussed on the edk2-devel list 4
years ago: http://edk2-devel.narkive.com/bwH3r0us/unaligned-i-o
I've therefore added UnalignedIoWrite/Read32() helper functions for 
Ia32/X64, which I've based on IoLib's aligned ones.

Because querying mode properties on the device is only possible by
actually entering the mode, all display modes are queried on startup
and saved for when they are queried.

Feature branch: https://github.com/pmj/edk2/tree/ovmf_vmware_svga_v4

v2:
- Unaligned I/O helpers are now in a separate commit. [Laszlo]
- New header file with only essential device constants [Laszlo]
- ArmVirtPkg build failures fixed [Laszlo]
- Code formatting improvements in main driver code.

v3:
- Hardware describing header definitions now prefixed [Jordan, Laszlo]
- "2" dropped from "SVGA2" wherever it made sense. [Jordan, Laszlo]
- Various formatting tweaks to the unaligned IO helpers [Laszlo]
- Mode properties are now queried and stored up front. [Laszlo]
- Lots of formatting fixes in the driver code. [Laszlo]
- PCI BAR confusion resolved. [Laszlo]
- Found & fixed a memory leak.

v4: (only patch 3/3 changed)
- Struct assignment fix, pixel mask simplified, comment & whitespace
  fixes. [Laszlo]

Phil Dennis-Jordan (3):
  OvmfPkg: VMWare SVGA display device register definitions
  OvmfPkg/QemuVideoDxe: Helper functions for unaligned port I/O.
  OvmfPkg/QemuVideoDxe: VMWare SVGA device support

 OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf         |   6 +
 OvmfPkg/Include/IndustryStandard/VmwareSvga.h | 104 +++++++++++++
 OvmfPkg/QemuVideoDxe/Qemu.h                   |  29 ++++
 OvmfPkg/QemuVideoDxe/UnalignedIoInternal.h    |  59 +++++++
 OvmfPkg/QemuVideoDxe/Driver.c                 | 128 +++++++++++++++-
 OvmfPkg/QemuVideoDxe/Gop.c                    |  61 +++++++-
 OvmfPkg/QemuVideoDxe/Initialize.c             | 161 ++++++++++++++++++++
 OvmfPkg/QemuVideoDxe/UnalignedIoGcc.c         |  70 +++++++++
 OvmfPkg/QemuVideoDxe/UnalignedIoIcc.c         |  80 ++++++++++
 OvmfPkg/QemuVideoDxe/UnalignedIoMsc.c         |  78 ++++++++++
 OvmfPkg/QemuVideoDxe/UnalignedIoUnsupported.c |  66 ++++++++
 11 files changed, 835 insertions(+), 7 deletions(-)
 create mode 100644 OvmfPkg/Include/IndustryStandard/VmwareSvga.h
 create mode 100644 OvmfPkg/QemuVideoDxe/UnalignedIoInternal.h
 create mode 100644 OvmfPkg/QemuVideoDxe/UnalignedIoGcc.c
 create mode 100644 OvmfPkg/QemuVideoDxe/UnalignedIoIcc.c
 create mode 100644 OvmfPkg/QemuVideoDxe/UnalignedIoMsc.c
 create mode 100644 OvmfPkg/QemuVideoDxe/UnalignedIoUnsupported.c

-- 
2.3.2 (Apple Git-55)

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel