[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/32] mac99: Add motherboard devices before PCI card
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PULL 15/32] mac99: Add motherboard devices before PCI cards |
Date: |
Fri, 27 Jun 2014 13:52:07 +0200 |
From: BALATON Zoltan <address@hidden>
Change the order of creating devices for New World Mac emulation so
that devices on the motherboard are added first and PCI cards (VGA and
NIC) come later. As a side effect, this also causes OpenBIOS to map
the motherboard devices into the MMIO space to the same addresses as
on real hardware and allow clients that hardcode these addresses (e.g.
MorphOS) to find and use them until OpenBIOS is tought to map devices
to specific addresses. (On real hardware the graphics and network
cards are really on separate buses but we don't model that yet.) This
brings the memory map closer to what is found on PowerMac3,1.
Signed-off-by: BALATON Zoltan <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
hw/ppc/mac_newworld.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index e493dc1..89d3cad 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -373,18 +373,11 @@ static void ppc_core99_init(MachineState *machine)
machine_arch = ARCH_MAC99;
}
/* init basic PC hardware */
- pci_vga_init(pci_bus);
-
escc_mem = escc_init(0, pic[0x25], pic[0x24],
serial_hds[0], serial_hds[1], ESCC_CLOCK, 4);
memory_region_init_alias(escc_bar, NULL, "escc-bar",
escc_mem, 0, memory_region_size(escc_mem));
- for(i = 0; i < nb_nics; i++)
- pci_nic_init_nofail(&nd_table[i], pci_bus, "ne2k_pci", NULL);
-
- ide_drive_get(hd, MAX_IDE_BUS);
-
macio = pci_create(pci_bus, -1, TYPE_NEWWORLD_MACIO);
dev = DEVICE(macio);
qdev_connect_gpio_out(dev, 0, pic[0x19]); /* CUDA */
@@ -395,6 +388,8 @@ static void ppc_core99_init(MachineState *machine)
macio_init(macio, pic_mem, escc_bar);
/* We only emulate 2 out of 3 IDE controllers for now */
+ ide_drive_get(hd, MAX_IDE_BUS);
+
macio_ide = MACIO_IDE(object_resolve_path_component(OBJECT(macio),
"ide[0]"));
macio_ide_init_drives(macio_ide, hd);
@@ -420,8 +415,15 @@ static void ppc_core99_init(MachineState *machine)
}
}
- if (graphic_depth != 15 && graphic_depth != 32 && graphic_depth != 8)
+ pci_vga_init(pci_bus);
+
+ if (graphic_depth != 15 && graphic_depth != 32 && graphic_depth != 8) {
graphic_depth = 15;
+ }
+
+ for (i = 0; i < nb_nics; i++) {
+ pci_nic_init_nofail(&nd_table[i], pci_bus, "ne2k_pci", NULL);
+ }
/* The NewWorld NVRAM is not located in the MacIO device */
dev = qdev_create(NULL, TYPE_MACIO_NVRAM);
--
1.8.1.4
- [Qemu-devel] [PULL 03/32] linux-user: Identify Addition Hardware Capabilities for PowerPC, (continued)
- [Qemu-devel] [PULL 03/32] linux-user: Identify Addition Hardware Capabilities for PowerPC, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 09/32] spapr_iommu: Make in-kernel TCE table optional, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 14/32] target-ppc: Remove unused gen_qemu_ld8s(), Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 11/32] spapr_pci_vfio: Add spapr-pci-vfio-host-bridge to support vfio, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 17/32] target-ppc: Add support for POWER8 pvr 0x4D0000, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 18/32] spapr: Fix code design style (s/SPAPRMachine/sPAPRMachineState), Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 05/32] spapr: Add "qemu, boot-menu" property to /chosen, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 04/32] linux-user: Support HWCAP2 in PowerPC, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 08/32] spapr: Fix RTAS token numbers, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 07/32] PPC: Add support for Apple gdb in gdbstub, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 15/32] mac99: Add motherboard devices before PCI cards,
Alexander Graf <=
- [Qemu-devel] [PULL 22/32] spapr: Add RTAS sysparm UUID, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 19/32] spapr: Define a 2.1 pseries machine, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 10/32] vfio: Add vfio_container_ioctl(), Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 25/32] xics: Add xics_find_source(), Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 29/32] xics: Implement xics_ics_free(), Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 32/32] PPC: e500: Only create dt entries for existing serial ports, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 21/32] spapr: Fix RTAS sysparm DIAGNOSTICS_RUN_MODE, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 24/32] xics: Add flags for interrupts, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 26/32] xics: Disable flags reset on xics reset, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 16/32] uninorth: Fix PCI hole size, Alexander Graf, 2014/06/27