diff options
author | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-16 07:41:07 +0000 |
---|---|---|
committer | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-16 07:41:07 +0000 |
commit | dd37a5e4d7ebc4e698f4c69ad2a5ee922824703f (patch) | |
tree | 93438b029985cb8ce9ee26968d9444c94e775ccf /hw/ppc_chrp.c | |
parent | d0dfae6e91d9b2044523ed4db890860f898af86b (diff) | |
download | qemu-dd37a5e4d7ebc4e698f4c69ad2a5ee922824703f.tar.gz qemu-dd37a5e4d7ebc4e698f4c69ad2a5ee922824703f.tar.bz2 qemu-dd37a5e4d7ebc4e698f4c69ad2a5ee922824703f.zip |
PREP and heathrow machines only support PowerPC CPU with a 6xx bus.
Mac99 machine may also support PowerPC 970 CPU.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2681 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/ppc_chrp.c')
-rw-r--r-- | hw/ppc_chrp.c | 52 |
1 files changed, 40 insertions, 12 deletions
diff --git a/hw/ppc_chrp.c b/hw/ppc_chrp.c index 9a7538cad7..8eef289828 100644 --- a/hw/ppc_chrp.c +++ b/hw/ppc_chrp.c @@ -409,14 +409,18 @@ static void ppc_chrp_init (int ram_size, int vga_ram_size, int boot_device, if (is_heathrow) { isa_mem_base = 0x80000000; - + /* Register 2 MB of ISA IO space */ isa_mmio_init(0xfe000000, 0x00200000); /* init basic PC hardware */ + if (PPC_INPUT(env) != PPC_FLAGS_INPUT_6xx) { + cpu_abort(env, "Only 6xx bus is supported on heathrow machine\n"); + exit(1); + } pic = heathrow_pic_init(&heathrow_pic_mem_index); pci_bus = pci_grackle_init(0xfec00000, pic); - pci_vga_init(pci_bus, ds, phys_ram_base + ram_size, + pci_vga_init(pci_bus, ds, phys_ram_base + ram_size, ram_size, vga_ram_size, vga_bios_offset, vga_bios_size); @@ -468,16 +472,40 @@ static void ppc_chrp_init (int ram_size, int vga_ram_size, int boot_device, /* Mac99 IRQ connection between OpenPIC outputs pins * and PowerPC input pins */ - openpic_irqs[i] = openpic_irqs[0] + (i * OPENPIC_OUTPUT_NB); - openpic_irqs[i][OPENPIC_OUTPUT_INT] = - ((qemu_irq *)env->irq_inputs)[PPC6xx_INPUT_INT]; - openpic_irqs[i][OPENPIC_OUTPUT_CINT] = - ((qemu_irq *)env->irq_inputs)[PPC6xx_INPUT_INT]; - openpic_irqs[i][OPENPIC_OUTPUT_MCK] = - ((qemu_irq *)env->irq_inputs)[PPC6xx_INPUT_MCP]; - openpic_irqs[i][OPENPIC_OUTPUT_DEBUG] = NULL; /* Not connected ? */ - openpic_irqs[i][OPENPIC_OUTPUT_RESET] = - ((qemu_irq *)env->irq_inputs)[PPC6xx_INPUT_HRESET]; /* Check this */ + switch (PPC_INPUT(env)) { + case PPC_FLAGS_INPUT_6xx: + openpic_irqs[i] = openpic_irqs[0] + (i * OPENPIC_OUTPUT_NB); + openpic_irqs[i][OPENPIC_OUTPUT_INT] = + ((qemu_irq *)env->irq_inputs)[PPC6xx_INPUT_INT]; + openpic_irqs[i][OPENPIC_OUTPUT_CINT] = + ((qemu_irq *)env->irq_inputs)[PPC6xx_INPUT_INT]; + openpic_irqs[i][OPENPIC_OUTPUT_MCK] = + ((qemu_irq *)env->irq_inputs)[PPC6xx_INPUT_MCP]; + /* Not connected ? */ + openpic_irqs[i][OPENPIC_OUTPUT_DEBUG] = NULL; + /* Check this */ + openpic_irqs[i][OPENPIC_OUTPUT_RESET] = + ((qemu_irq *)env->irq_inputs)[PPC6xx_INPUT_HRESET]; + break; + case PPC_FLAGS_INPUT_970: + openpic_irqs[i] = openpic_irqs[0] + (i * OPENPIC_OUTPUT_NB); + openpic_irqs[i][OPENPIC_OUTPUT_INT] = + ((qemu_irq *)env->irq_inputs)[PPC970_INPUT_INT]; + openpic_irqs[i][OPENPIC_OUTPUT_CINT] = + ((qemu_irq *)env->irq_inputs)[PPC970_INPUT_INT]; + openpic_irqs[i][OPENPIC_OUTPUT_MCK] = + ((qemu_irq *)env->irq_inputs)[PPC970_INPUT_MCP]; + /* Not connected ? */ + openpic_irqs[i][OPENPIC_OUTPUT_DEBUG] = NULL; + /* Check this */ + openpic_irqs[i][OPENPIC_OUTPUT_RESET] = + ((qemu_irq *)env->irq_inputs)[PPC970_INPUT_HRESET]; + break; + default: + cpu_abort(env, + "Only bus model not supported on mac99 machine\n"); + exit(1); + } } pic = openpic_init(NULL, &openpic_mem_index, smp_cpus, openpic_irqs, NULL); |