mirror of
https://github.com/xemu-project/xemu.git
synced 2025-03-06 11:41:45 +00:00
vga: pass owner to vga_init_vbe
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
9eb58a473b
commit
8311832773
@ -137,6 +137,6 @@ int isa_vga_mm_init(hwaddr vram_base,
|
||||
|
||||
s->vga.con = graphic_console_init(NULL, s->vga.hw_ops, s);
|
||||
|
||||
vga_init_vbe(&s->vga, address_space);
|
||||
vga_init_vbe(&s->vga, NULL, address_space);
|
||||
return 0;
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ static void vga_isa_realizefn(DeviceState *dev, Error **errp)
|
||||
memory_region_set_coalescing(vga_io_memory);
|
||||
s->con = graphic_console_init(DEVICE(dev), s->hw_ops, s);
|
||||
|
||||
vga_init_vbe(s, isa_address_space(isadev));
|
||||
vga_init_vbe(s, OBJECT(dev), isa_address_space(isadev));
|
||||
/* ROM BIOS */
|
||||
rom_add_vga(VGABIOS_FILENAME);
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ static int pci_std_vga_initfn(PCIDevice *dev)
|
||||
|
||||
if (!dev->rom_bar) {
|
||||
/* compatibility with pc-0.13 and older */
|
||||
vga_init_vbe(s, pci_address_space(dev));
|
||||
vga_init_vbe(s, OBJECT(dev), pci_address_space(dev));
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -2380,12 +2380,12 @@ void vga_init(VGACommonState *s, Object *obj, MemoryRegion *address_space,
|
||||
}
|
||||
}
|
||||
|
||||
void vga_init_vbe(VGACommonState *s, MemoryRegion *system_memory)
|
||||
void vga_init_vbe(VGACommonState *s, Object *obj, MemoryRegion *system_memory)
|
||||
{
|
||||
/* With pc-0.12 and below we map both the PCI BAR and the fixed VBE region,
|
||||
* so use an alias to avoid double-mapping the same region.
|
||||
*/
|
||||
memory_region_init_alias(&s->vram_vbe, NULL, "vram.vbe",
|
||||
memory_region_init_alias(&s->vram_vbe, obj, "vram.vbe",
|
||||
&s->vram, 0, memory_region_size(&s->vram));
|
||||
/* XXX: use optimized standard vga accesses */
|
||||
memory_region_add_subregion(system_memory,
|
||||
|
@ -198,7 +198,7 @@ void vga_invalidate_scanlines(VGACommonState *s, int y1, int y2);
|
||||
|
||||
int vga_ioport_invalid(VGACommonState *s, uint32_t addr);
|
||||
|
||||
void vga_init_vbe(VGACommonState *s, MemoryRegion *address_space);
|
||||
void vga_init_vbe(VGACommonState *s, Object *obj, MemoryRegion *address_space);
|
||||
uint32_t vbe_ioport_read_data(void *opaque, uint32_t addr);
|
||||
void vbe_ioport_write_index(void *opaque, uint32_t addr, uint32_t val);
|
||||
void vbe_ioport_write_data(void *opaque, uint32_t addr, uint32_t val);
|
||||
|
@ -1272,7 +1272,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, pci_address_space(dev));
|
||||
vga_init_vbe(&s->chip.vga, OBJECT(dev), pci_address_space(dev));
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user