Skip to contentSkip to conversation

use new vgabios.

PATCH New Gerd Hoffmann 1 participant 4 messages Aug 23, 2010 Kbuild

lore
Share & tools
lore
#0 lore raw

cover use new vgabios.

Hi,

This patch series will put the new vgabios (patches posted to the list last week) into use for stdvga and vmware_vga.

For obvious reasons it depends on the new vgabios binaries being present, i.e. vgabios patches being committed to vgabios.git, subtree being updated and vgabios binaries being recompiled + committed to qemu.git.

The patches are also available from
git://anongit.freedesktop.org/spice/qemu vgabios

There is also a "vgabios.testing" branch available. That one has one more commit which just drops in new vgabios binaries, so the patches can easily be tested even before the vgabios patches are committed.

cheers,
Gerd

Gerd Hoffmann (3):
Add new vgabios binaries to blobs list.
switch stdvga to pci vgabios
switch vmware_vga to pci vgabios

 Makefile        |    5 +++--
 hw/vga-pci.c    |    7 +++----
 hw/vmware_vga.c |    7 +------
 3 files changed, 7 insertions(+), 12 deletions(-)
#1 lore raw

PATCH 1/3 Add new vgabios binaries to blobs list.

---
 Makefile |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
Makefile +3 -2
index f95cc2f..867e038 100644
@@ -154,8 +154,9 @@ ar      de     en-us  fi  fr-be  hr     it  lv  nl         pl  ru     th \
 common  de-ch  es     fo  fr-ca  hu     ja  mk  nl-be      pt  sl     tr
 
 ifdef INSTALL_BLOBS
-BLOBS=bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
-video.x openbios-sparc32 openbios-sparc64 openbios-ppc \
+BLOBS=bios.bin vgabios.bin vgabios-cirrus.bin \
+vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin \
+ppc_rom.bin video.x openbios-sparc32 openbios-sparc64 openbios-ppc \
 gpxe-eepro100-80861209.rom \
 gpxe-eepro100-80861229.rom \
 pxe-e1000.bin \
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/3 switch stdvga to pci vgabios

In reply to Gerd Hoffmann

Make stdvga provide the new vgabios binary (with pcibios support) using the PCI option rom bar. Seabios will happily load it from there. The new vga bios will also lookup the framebuffer address in pci config space, so the magic bochs lfb @ 0xe0000000 is not needed any more -> zap it.

Without the patch:

  # dmesg | grep framebuffer
  vesafb: framebuffer at 0xe0000000, mapped to 0xf7e80000, using 1875k, total 8192k
  # lspci -vs2
  00:02.0 VGA compatible controller: Technical Corp. Device 1111 (prog-if 00 [VGA controller])
	Subsystem: Qumranet, Inc. Device 1100
	Physical Slot: 2
	Flags: fast devsel
	Memory at f0000000 (32-bit, prefetchable) [size=8M]
	Expansion ROM at <unassigned> [disabled]

With patch applied:

  # dmesg | grep framebuffer
  vesafb: framebuffer at 0xf0000000, mapped to 0xf7e80000, using 1875k, total 8192k
  # lspci -vs2
  00:02.0 VGA compatible controller: Technical Corp. Device 1111 (prog-if 00 [VGA controller])
	Subsystem: Qumranet, Inc. Device 1100
	Physical Slot: 2
	Flags: fast devsel
	Memory at f0000000 (32-bit, prefetchable) [size=8M]
	Expansion ROM at f0800000 [disabled] [size=64K]

cheers,
Gerd

---
 hw/vga-pci.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
hw/vga-pci.c +3 -4
index 2315f70..eef0e3c 100644
@@ -103,11 +103,10 @@ static int pci_vga_initfn(PCIDevice *dev)
             bios_total_size <<= 1;
         pci_register_bar(&d->dev, PCI_ROM_SLOT, bios_total_size,
                          PCI_BASE_ADDRESS_MEM_PREFETCH, vga_map);
+     } else {
+         if (dev->romfile == NULL)
+             dev->romfile = qemu_strdup("vgabios-stdvga.bin");
      }
-
-    vga_init_vbe(s);
-     /* ROM BIOS */
-     rom_add_vga(VGABIOS_FILENAME);
      return 0;
 }
 
Signature · 1 line
1.7.1
#3 lore raw

PATCH 3/3 switch vmware_vga to pci vgabios

In reply to Gerd Hoffmann
---
 hw/vmware_vga.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
hw/vmware_vga.c +1 -6
index 12bff48..682f287 100644
@@ -114,14 +114,12 @@ struct pci_vmsvga_state_s {
 # define SVGA_IO_BASE		SVGA_LEGACY_BASE_PORT
 # define SVGA_IO_MUL		1
 # define SVGA_FIFO_SIZE		0x10000
-# define SVGA_MEM_BASE		0xe0000000
 # define SVGA_PCI_DEVICE_ID	PCI_DEVICE_ID_VMWARE_SVGA2
 #else
 # define SVGA_ID		SVGA_ID_1
 # define SVGA_IO_BASE		SVGA_LEGACY_BASE_PORT
 # define SVGA_IO_MUL		4
 # define SVGA_FIFO_SIZE		0x10000
-# define SVGA_MEM_BASE		0xe0000000
 # define SVGA_PCI_DEVICE_ID	PCI_DEVICE_ID_VMWARE_SVGA
 #endif
 
@@ -1171,10 +1169,6 @@ static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size)
     vga_init(&s->vga);
     vmstate_register(NULL, 0, &vmstate_vga_common, &s->vga);
 
-    vga_init_vbe(&s->vga);
-
-    rom_add_vga(VGABIOS_FILENAME);
-
     vmsvga_reset(s);
 }
 
@@ -1272,6 +1266,7 @@ static PCIDeviceInfo vmsvga_info = {
     .qdev.size    = sizeof(struct pci_vmsvga_state_s),
     .qdev.vmsd    = &vmstate_vmware_vga,
     .init         = pci_vmsvga_initfn,
+    .romfile      = "vgabios-vmware.bin",
 };
 
 static void vmsvga_register(void)
Signature · 1 line
1.7.1