diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-08-17 10:45:20 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-08-17 10:45:20 +0000 |
commit | 89b6b508929d63b2a3dda18692fcb724afb43336 (patch) | |
tree | 225cf51bb0a1212edc82b6c2c422afc152d537ec | |
parent | d2269f6f64e1b707fc8ea5d43102589c03dd090e (diff) |
vga init changes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2114 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | hw/mips_r4k.c | 4 | ||||
-rw-r--r-- | hw/pc.c | 9 | ||||
-rw-r--r-- | hw/ppc_chrp.c | 12 | ||||
-rw-r--r-- | hw/ppc_prep.c | 4 | ||||
-rw-r--r-- | vl.h | 12 |
5 files changed, 24 insertions, 17 deletions
diff --git a/hw/mips_r4k.c b/hw/mips_r4k.c index 22d742a2e3..bad9163192 100644 --- a/hw/mips_r4k.c +++ b/hw/mips_r4k.c @@ -270,8 +270,8 @@ void mips_r4k_init (int ram_size, int vga_ram_size, int boot_device, isa_pic = pic_init(pic_irq_request, env); pit = pit_init(0x40, 0); serial_init(&pic_set_irq_new, isa_pic, 0x3f8, 4, serial_hds[0]); - vga_initialize(NULL, ds, phys_ram_base + ram_size, ram_size, - vga_ram_size, 0, 0); + isa_vga_init(ds, phys_ram_base + ram_size, ram_size, + vga_ram_size); if (nd_table[0].vlan) { if (nd_table[0].model == NULL @@ -768,8 +768,13 @@ static void pc_init1(int ram_size, int vga_ram_size, int boot_device, vga_ram_size); } } else { - vga_initialize(pci_bus, ds, phys_ram_base + ram_size, ram_size, - vga_ram_size, 0, 0); + if (pci_enabled) { + pci_vga_init(pci_bus, ds, phys_ram_base + ram_size, ram_size, + vga_ram_size, 0, 0); + } else { + isa_vga_init(ds, phys_ram_base + ram_size, ram_size, + vga_ram_size); + } } rtc_state = rtc_init(0x70, 8); diff --git a/hw/ppc_chrp.c b/hw/ppc_chrp.c index 42d599588e..94707690ed 100644 --- a/hw/ppc_chrp.c +++ b/hw/ppc_chrp.c @@ -424,9 +424,9 @@ static void ppc_chrp_init(int ram_size, int vga_ram_size, int boot_device, pic = heathrow_pic_init(&heathrow_pic_mem_index); set_irq = heathrow_pic_set_irq; pci_bus = pci_grackle_init(0xfec00000, pic); - vga_initialize(pci_bus, ds, phys_ram_base + ram_size, - ram_size, vga_ram_size, - vga_bios_offset, vga_bios_size); + pci_vga_init(pci_bus, ds, phys_ram_base + ram_size, + ram_size, vga_ram_size, + vga_bios_offset, vga_bios_size); /* XXX: suppress that */ isa_pic = pic_init(pic_irq_request, NULL); @@ -474,9 +474,9 @@ static void ppc_chrp_init(int ram_size, int vga_ram_size, int boot_device, set_irq = openpic_set_irq; pci_bus = pci_pmac_init(pic); /* init basic PC hardware */ - vga_initialize(pci_bus, ds, phys_ram_base + ram_size, - ram_size, vga_ram_size, - vga_bios_offset, vga_bios_size); + pci_vga_init(pci_bus, ds, phys_ram_base + ram_size, + ram_size, vga_ram_size, + vga_bios_offset, vga_bios_size); /* XXX: suppress that */ isa_pic = pic_init(pic_irq_request, NULL); diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c index a4d7ddfe7e..d75c27c3e4 100644 --- a/hw/ppc_prep.c +++ b/hw/ppc_prep.c @@ -612,8 +612,8 @@ static void ppc_prep_init(int ram_size, int vga_ram_size, int boot_device, cpu_register_physical_memory(0x80000000, 0x00800000, PPC_io_memory); /* init basic PC hardware */ - vga_initialize(pci_bus, ds, phys_ram_base + ram_size, ram_size, - vga_ram_size, 0, 0); + pci_vga_init(pci_bus, ds, phys_ram_base + ram_size, ram_size, + vga_ram_size, 0, 0); rtc_init(0x70, 8); // openpic = openpic_init(0x00000000, 0xF0000000, 1); isa_pic = pic_init(pic_irq_request, first_cpu); @@ -744,8 +744,8 @@ uint32_t pci_default_read_config(PCIDevice *d, uint32_t address, int len); void pci_default_write_config(PCIDevice *d, uint32_t address, uint32_t val, int len); -void generic_pci_save(QEMUFile* f, void *opaque); -int generic_pci_load(QEMUFile* f, void *opaque, int version_id); +void pci_device_save(PCIDevice *s, QEMUFile *f); +int pci_device_load(PCIDevice *s, QEMUFile *f); typedef void (*pci_set_irq_fn)(PCIDevice *pci_dev, void *pic, int irq_num, int level); @@ -834,9 +834,11 @@ static inline void dpy_resize(DisplayState *s, int w, int h) s->dpy_resize(s, w, h); } -int vga_initialize(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base, - unsigned long vga_ram_offset, int vga_ram_size, - unsigned long vga_bios_offset, int vga_bios_size); +int isa_vga_init(DisplayState *ds, uint8_t *vga_ram_base, + unsigned long vga_ram_offset, int vga_ram_size); +int pci_vga_init(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base, + unsigned long vga_ram_offset, int vga_ram_size, + unsigned long vga_bios_offset, int vga_bios_size); /* cirrus_vga.c */ void pci_cirrus_vga_init(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base, |