diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2018-06-12 17:44:02 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2018-06-16 16:32:33 +1000 |
commit | d811d61fbc6ca5f2be2185fd7cfa916e7ba613ce (patch) | |
tree | 81ac7600dda6da3bc3ce6b7e50de9c6b40acb1ea /hw/ppc | |
parent | 84051eb400495745035b52e27fe67b962b7a58fa (diff) | |
download | qemu-d811d61fbc6ca5f2be2185fd7cfa916e7ba613ce.zip qemu-d811d61fbc6ca5f2be2185fd7cfa916e7ba613ce.tar.gz qemu-d811d61fbc6ca5f2be2185fd7cfa916e7ba613ce.tar.bz2 |
mac_newworld: add PMU device
The PMU device supercedes the CUDA device found on older New World Macs and
is supported by a larger number of guest OSs from OS 9 to OS X 10.5.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc')
-rw-r--r-- | hw/ppc/mac.h | 1 | ||||
-rw-r--r-- | hw/ppc/mac_newworld.c | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/hw/ppc/mac.h b/hw/ppc/mac.h index b3b7f9d..c0217e6 100644 --- a/hw/ppc/mac.h +++ b/hw/ppc/mac.h @@ -59,6 +59,7 @@ /* New World IRQs */ #define NEWWORLD_CUDA_IRQ 0x19 +#define NEWWORLD_PMU_IRQ 0x19 #define NEWWORLD_ESCCB_IRQ 0x24 #define NEWWORLD_ESCCA_IRQ 0x25 #define NEWWORLD_IDE0_IRQ 0xd diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index ca21d47..ff715ff 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -399,11 +399,19 @@ static void ppc_core99_init(MachineState *machine) macio_ide_init_drives(macio_ide, &hd[MAX_IDE_DEVS]); if (has_adb) { - dev = DEVICE(object_resolve_path_component(OBJECT(macio), "cuda")); + if (has_pmu) { + dev = DEVICE(object_resolve_path_component(OBJECT(macio), "pmu")); + } else { + dev = DEVICE(object_resolve_path_component(OBJECT(macio), "cuda")); + } + adb_bus = qdev_get_child_bus(dev, "adb.0"); dev = qdev_create(adb_bus, TYPE_ADB_KEYBOARD); + qdev_prop_set_bit(dev, "disable-direct-reg3-writes", has_pmu); qdev_init_nofail(dev); + dev = qdev_create(adb_bus, TYPE_ADB_MOUSE); + qdev_prop_set_bit(dev, "disable-direct-reg3-writes", has_pmu); qdev_init_nofail(dev); } |