OvmfPkg/QemuVideoDxe: VMWare SVGA device support
In addition to the QXL, Cirrus, etc. VGA adapters, Qemu also implements a basic version of VMWare's SVGA display device. Drivers for this device exist for some guest OSes which do not support Qemu's other display adapters, so supporting it in OVMF is useful in conjunction with those OSes. This change adds support for the SVGA device's framebuffer to QemuVideoDxe's graphics output protocol implementation, based on VMWare's documentation. The most basic initialisation, framebuffer layout query, and mode setting operations are implemented. The device relies on port-based 32-bit I/O, unfortunately on misaligned addresses. This limits the driver's support to the x86 family of platforms. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
committed by
Laszlo Ersek
parent
05a5379458
commit
c137d95081
@@ -92,6 +92,7 @@ typedef enum {
|
||||
QEMU_VIDEO_CIRRUS_5446,
|
||||
QEMU_VIDEO_BOCHS,
|
||||
QEMU_VIDEO_BOCHS_MMIO,
|
||||
QEMU_VIDEO_VMWARE_SVGA,
|
||||
} QEMU_VIDEO_VARIANT;
|
||||
|
||||
typedef struct {
|
||||
@@ -115,10 +116,13 @@ typedef struct {
|
||||
//
|
||||
UINTN MaxMode;
|
||||
QEMU_VIDEO_MODE_DATA *ModeData;
|
||||
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *VmwareSvgaModeInfo;
|
||||
|
||||
QEMU_VIDEO_VARIANT Variant;
|
||||
FRAME_BUFFER_CONFIGURE *FrameBufferBltConfigure;
|
||||
UINTN FrameBufferBltConfigureSize;
|
||||
UINT8 FrameBufferVramBarIndex;
|
||||
UINT16 VmwareSvgaBasePort;
|
||||
} QEMU_VIDEO_PRIVATE_DATA;
|
||||
|
||||
///
|
||||
@@ -502,9 +506,34 @@ QemuVideoBochsModeSetup (
|
||||
BOOLEAN IsQxl
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
QemuVideoVmwareSvgaModeSetup (
|
||||
QEMU_VIDEO_PRIVATE_DATA *Private
|
||||
);
|
||||
|
||||
VOID
|
||||
InstallVbeShim (
|
||||
IN CONST CHAR16 *CardName,
|
||||
IN EFI_PHYSICAL_ADDRESS FrameBufferBase
|
||||
);
|
||||
|
||||
VOID
|
||||
VmwareSvgaWrite (
|
||||
QEMU_VIDEO_PRIVATE_DATA *Private,
|
||||
UINT16 Register,
|
||||
UINT32 Value
|
||||
);
|
||||
|
||||
UINT32
|
||||
VmwareSvgaRead (
|
||||
QEMU_VIDEO_PRIVATE_DATA *Private,
|
||||
UINT16 Register
|
||||
);
|
||||
|
||||
VOID
|
||||
InitializeVmwareSvgaGraphicsMode (
|
||||
QEMU_VIDEO_PRIVATE_DATA *Private,
|
||||
QEMU_VIDEO_BOCHS_MODES *ModeData
|
||||
);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user