summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/QemuVideoDxe/Driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'OvmfPkg/QemuVideoDxe/Driver.c')
-rw-r--r--OvmfPkg/QemuVideoDxe/Driver.c135
1 files changed, 2 insertions, 133 deletions
diff --git a/OvmfPkg/QemuVideoDxe/Driver.c b/OvmfPkg/QemuVideoDxe/Driver.c
index 73eb2cad05..2304afd1e6 100644
--- a/OvmfPkg/QemuVideoDxe/Driver.c
+++ b/OvmfPkg/QemuVideoDxe/Driver.c
@@ -14,10 +14,8 @@
**/
-#include <IndustryStandard/VmwareSvga.h>
-#include <IndustryStandard/Acpi.h>
#include "Qemu.h"
-#include "UnalignedIoInternal.h"
+#include <IndustryStandard/Acpi.h>
EFI_DRIVER_BINDING_PROTOCOL gQemuVideoDriverBinding = {
QemuVideoControllerDriverSupported,
@@ -72,12 +70,6 @@ QEMU_VIDEO_CARD gQemuVideoCardList[] = {
QEMU_VIDEO_BOCHS_MMIO,
L"QEMU VirtIO VGA"
},{
- PCI_CLASS_DISPLAY_VGA,
- VMWARE_PCI_VENDOR_ID_VMWARE,
- VMWARE_PCI_DEVICE_ID_VMWARE_SVGA2,
- QEMU_VIDEO_VMWARE_SVGA,
- L"QEMU VMWare SVGA"
- },{
0 /* end of list */
}
};
@@ -264,7 +256,6 @@ QemuVideoControllerDriverStart (
goto ClosePciIo;
}
Private->Variant = Card->Variant;
- Private->FrameBufferVramBarIndex = PCI_BAR_IDX0;
//
// IsQxl is based on the detected Card->Variant, which at a later point might
@@ -340,58 +331,6 @@ QemuVideoControllerDriverStart (
}
//
- // Check if accessing Vmware SVGA interface works
- //
- if (Private->Variant == QEMU_VIDEO_VMWARE_SVGA) {
- EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *IoDesc;
- UINT32 TargetId;
- UINT32 SvgaIdRead;
-
- IoDesc = NULL;
- Status = Private->PciIo->GetBarAttributes (
- Private->PciIo,
- PCI_BAR_IDX0,
- NULL,
- (VOID**) &IoDesc
- );
- if (EFI_ERROR (Status) ||
- IoDesc->ResType != ACPI_ADDRESS_SPACE_TYPE_IO ||
- IoDesc->AddrRangeMin > MAX_UINT16 + 1 - (VMWARE_SVGA_VALUE_PORT + 4)) {
- if (IoDesc != NULL) {
- FreePool (IoDesc);
- }
- Status = EFI_DEVICE_ERROR;
- goto RestoreAttributes;
- }
- Private->VmwareSvgaBasePort = (UINT16) IoDesc->AddrRangeMin;
- FreePool (IoDesc);
-
- TargetId = VMWARE_SVGA_ID_2;
- while (TRUE) {
- VmwareSvgaWrite (Private, VmwareSvgaRegId, TargetId);
- SvgaIdRead = VmwareSvgaRead (Private, VmwareSvgaRegId);
- if ((SvgaIdRead == TargetId) || (TargetId <= VMWARE_SVGA_ID_0)) {
- break;
- }
- TargetId--;
- }
-
- if (SvgaIdRead != TargetId) {
- DEBUG ((
- DEBUG_ERROR,
- "QemuVideo: QEMU_VIDEO_VMWARE_SVGA ID mismatch "
- "(got 0x%x, base address 0x%x)\n",
- SvgaIdRead,
- Private->VmwareSvgaBasePort
- ));
- Status = EFI_DEVICE_ERROR;
- goto RestoreAttributes;
- }
-
- Private->FrameBufferVramBarIndex = PCI_BAR_IDX1;
- }
-
- //
// Get ParentDevicePath
//
Status = gBS->HandleProtocol (
@@ -446,9 +385,6 @@ QemuVideoControllerDriverStart (
case QEMU_VIDEO_BOCHS:
Status = QemuVideoBochsModeSetup (Private, IsQxl);
break;
- case QEMU_VIDEO_VMWARE_SVGA:
- Status = QemuVideoVmwareSvgaModeSetup (Private);
- break;
default:
ASSERT (FALSE);
Status = EFI_DEVICE_ERROR;
@@ -510,9 +446,6 @@ DestructQemuVideoGraphics:
FreeModeData:
FreePool (Private->ModeData);
- if (Private->VmwareSvgaModeInfo != NULL) {
- FreePool (Private->VmwareSvgaModeInfo);
- }
UninstallGopDevicePath:
gBS->UninstallProtocolInterface (Private->Handle,
@@ -634,9 +567,6 @@ QemuVideoControllerDriverStop (
);
FreePool (Private->ModeData);
- if (Private->VmwareSvgaModeInfo != NULL) {
- FreePool (Private->VmwareSvgaModeInfo);
- }
gBS->UninstallProtocolInterface (Private->Handle,
&gEfiDevicePathProtocolGuid, Private->GopDevicePath);
FreePool (Private->GopDevicePath);
@@ -834,7 +764,7 @@ ClearScreen (
Private->PciIo->Mem.Write (
Private->PciIo,
EfiPciIoWidthFillUint32,
- Private->FrameBufferVramBarIndex,
+ 0,
0,
0x400000 >> 2,
&Color
@@ -972,38 +902,6 @@ BochsRead (
}
VOID
-VmwareSvgaWrite (
- QEMU_VIDEO_PRIVATE_DATA *Private,
- UINT16 Register,
- UINT32 Value
- )
-{
- UnalignedIoWrite32 (
- Private->VmwareSvgaBasePort + VMWARE_SVGA_INDEX_PORT,
- Register
- );
- UnalignedIoWrite32 (
- Private->VmwareSvgaBasePort + VMWARE_SVGA_VALUE_PORT,
- Value
- );
-}
-
-UINT32
-VmwareSvgaRead (
- QEMU_VIDEO_PRIVATE_DATA *Private,
- UINT16 Register
- )
-{
- UnalignedIoWrite32 (
- Private->VmwareSvgaBasePort + VMWARE_SVGA_INDEX_PORT,
- Register
- );
- return UnalignedIoRead32 (
- Private->VmwareSvgaBasePort + VMWARE_SVGA_VALUE_PORT
- );
-}
-
-VOID
VgaOutb (
QEMU_VIDEO_PRIVATE_DATA *Private,
UINTN Reg,
@@ -1057,35 +955,6 @@ InitializeBochsGraphicsMode (
ClearScreen (Private);
}
-VOID
-InitializeVmwareSvgaGraphicsMode (
- QEMU_VIDEO_PRIVATE_DATA *Private,
- QEMU_VIDEO_BOCHS_MODES *ModeData
- )
-{
- UINT32 Capabilities;
-
- VmwareSvgaWrite (Private, VmwareSvgaRegWidth, ModeData->Width);
- VmwareSvgaWrite (Private, VmwareSvgaRegHeight, ModeData->Height);
-
- Capabilities = VmwareSvgaRead (
- Private,
- VmwareSvgaRegCapabilities
- );
- if ((Capabilities & VMWARE_SVGA_CAP_8BIT_EMULATION) != 0) {
- VmwareSvgaWrite (
- Private,
- VmwareSvgaRegBitsPerPixel,
- ModeData->ColorDepth
- );
- }
-
- VmwareSvgaWrite (Private, VmwareSvgaRegEnable, 1);
-
- SetDefaultPalette (Private);
- ClearScreen (Private);
-}
-
EFI_STATUS
EFIAPI
InitializeQemuVideo (