]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/QemuVideoDxe/Driver.c
OvmfPkg: simply use the Bochs interface for vmsvga
[mirror_edk2.git] / OvmfPkg / QemuVideoDxe / Driver.c
index 2304afd1e686f4b3df8e76e3ab5ffa2c65aecc47..8e02700d396020a78a79f7c77b33f44d1139a79e 100644 (file)
@@ -69,6 +69,12 @@ QEMU_VIDEO_CARD gQemuVideoCardList[] = {
         0x1050,\r
         QEMU_VIDEO_BOCHS_MMIO,\r
         L"QEMU VirtIO VGA"\r
+    },{\r
+        PCI_CLASS_DISPLAY_VGA,\r
+        0x15ad,\r
+        0x0405,\r
+        QEMU_VIDEO_VMWARE_SVGA,\r
+        L"QEMU VMWare SVGA"\r
     },{\r
         0 /* end of list */\r
     }\r
@@ -316,6 +322,14 @@ QemuVideoControllerDriverStart (
     }\r
   }\r
 \r
+  //\r
+  // VMWare SVGA is handled like Bochs (with port IO only).\r
+  //\r
+  if (Private->Variant == QEMU_VIDEO_VMWARE_SVGA) {\r
+    Private->Variant = QEMU_VIDEO_BOCHS;\r
+    Private->FrameBufferVramBarIndex = PCI_BAR_IDX1;\r
+  }\r
+\r
   //\r
   // Check if accessing the bochs interface works.\r
   //\r
@@ -764,7 +778,7 @@ ClearScreen (
   Private->PciIo->Mem.Write (\r
                         Private->PciIo,\r
                         EfiPciIoWidthFillUint32,\r
-                        0,\r
+                        Private->FrameBufferVramBarIndex,\r
                         0,\r
                         0x400000 >> 2,\r
                         &Color\r