diff options
author | Avi Kivity <avi@redhat.com> | 2011-08-15 17:17:37 +0300 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-22 10:47:49 -0500 |
commit | be20f9e902ca47ea84e1b1c1e89b0a55d59b4c11 (patch) | |
tree | 11fd0270b2f59ae1bcc68481fd2156bdcf841d36 /hw/vmware_vga.c | |
parent | f5e6fed879ae10b9f6494a6eed21c1979391d7cb (diff) |
vga: drop get_system_memory() from vga devices and derivatives
Instead, use the bus accessors, or get the address space directly
from the board constructor.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/vmware_vga.c')
-rw-r--r-- | hw/vmware_vga.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c index a840cbd4b..5396a6ca8 100644 --- a/hw/vmware_vga.c +++ b/hw/vmware_vga.c @@ -1207,7 +1207,8 @@ static const VMStateDescription vmstate_vmware_vga = { } }; -static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size) +static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size, + MemoryRegion *address_space) { s->scratch_size = SVGA_SCRATCH_SIZE; s->scratch = g_malloc(s->scratch_size * 4); @@ -1223,7 +1224,7 @@ static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size) s->fifo_ptr = memory_region_get_ram_ptr(&s->fifo_ram); vga_common_init(&s->vga, vga_ram_size); - vga_init(&s->vga); + vga_init(&s->vga, address_space); vmstate_register(NULL, 0, &vmstate_vga_common, &s->vga); vmsvga_reset(s); @@ -1293,7 +1294,7 @@ static int pci_vmsvga_initfn(PCIDevice *dev) "vmsvga-io", 0x10); pci_register_bar(&s->card, 0, PCI_BASE_ADDRESS_SPACE_IO, &s->io_bar); - vmsvga_init(&s->chip, VGA_RAM_SIZE); + vmsvga_init(&s->chip, VGA_RAM_SIZE, pci_address_space(dev)); pci_register_bar(&s->card, 1, PCI_BASE_ADDRESS_MEM_PREFETCH, iomem); pci_register_bar(&s->card, 2, PCI_BASE_ADDRESS_MEM_PREFETCH, @@ -1301,7 +1302,7 @@ static int pci_vmsvga_initfn(PCIDevice *dev) if (!dev->rom_bar) { /* compatibility with pc-0.13 and older */ - vga_init_vbe(&s->chip.vga); + vga_init_vbe(&s->chip.vga, pci_address_space(dev)); } return 0; |