Message ID | 20180612164402.28680-1-mark.cave-ayland@ilande.co.uk |
---|---|
Headers | show |
Series | mac99: add via-pmu support | expand |
On Tue, Jun 12, 2018 at 05:43:55PM +0100, Mark Cave-Ayland wrote: > This patchset is based upon Ben H's experimental branch which adds PMU > support to the QEMU mac99 machine. Currently mac99 uses the via-cuda > device which works in a lot of cases, but many OSs such as MacOS 10.5 > only support via-pmu. > > A lot of the work I've been doing on the Mac machines over the past > year or so has been to enable me to remove all the hacks from the PMU > work to enable it to be submitted upstream, and here we are. > > The choice of via is controlled with a new "via" machine option which > has 3 values: > > via=cuda > - Use via-cuda as per the current mac99 machine but largely unsupported > > via=pmu-adb > - Use via-pmu but attach the mouse and keyboard to the PMU ADB bus > rather than USB (useful for esoteric OS X images) > > via=pmu > - Use via-pmu with USB mouse and keyboards, as per a real PowerMac3,1 > machine > > Eventually the aim is to switch the mac99 default option to via=pmu but > there are some minor issues with older OS X related to timer calibration > and USB that means I'm not ready to do that just yet. > > Note that the via-pmu device also requires an updated OpenBIOS containing > a suitable PMU driver which have been posted over to the OpenBIOS mailing > list at https://mail.coreboot.org/pipermail/openbios/2018-June/010384.html. > > Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Applied to ppc-for-3.0, thanks. > > > Mark Cave-Ayland (7): > ppc: introduce Core99MachinesState for the mac99 machine > mac_newworld: add via machine option to control mac99 VIA/ADB > configuration > mac_newworld: add gpios to macio devices with PMU enabled > mac_newworld: wire up programmer switch to NMI handler > adb: fix read reg 3 byte ordering > adb: add property to disable direct reg 3 writes > mac_newworld: add PMU device > > default-configs/ppc-softmmu.mak | 2 + > hw/input/adb-kbd.c | 29 +- > hw/input/adb-mouse.c | 41 +- > hw/input/adb.c | 7 + > hw/misc/macio/Makefile.objs | 2 + > hw/misc/macio/gpio.c | 231 +++++++++++ > hw/misc/macio/macio.c | 89 +++- > hw/misc/macio/pmu.c | 871 ++++++++++++++++++++++++++++++++++++++++ > hw/misc/macio/trace-events | 28 ++ > hw/ppc/mac.h | 20 + > hw/ppc/mac_newworld.c | 84 +++- > include/hw/input/adb.h | 1 + > include/hw/misc/macio/gpio.h | 47 +++ > include/hw/misc/macio/macio.h | 7 + > include/hw/misc/macio/pmu.h | 237 +++++++++++ > include/hw/ppc/ppc.h | 1 + > 16 files changed, 1639 insertions(+), 58 deletions(-) > create mode 100644 hw/misc/macio/gpio.c > create mode 100644 hw/misc/macio/pmu.c > create mode 100644 include/hw/misc/macio/gpio.h > create mode 100644 include/hw/misc/macio/pmu.h >
This patchset is based upon Ben H's experimental branch which adds PMU support to the QEMU mac99 machine. Currently mac99 uses the via-cuda device which works in a lot of cases, but many OSs such as MacOS 10.5 only support via-pmu. A lot of the work I've been doing on the Mac machines over the past year or so has been to enable me to remove all the hacks from the PMU work to enable it to be submitted upstream, and here we are. The choice of via is controlled with a new "via" machine option which has 3 values: via=cuda - Use via-cuda as per the current mac99 machine but largely unsupported via=pmu-adb - Use via-pmu but attach the mouse and keyboard to the PMU ADB bus rather than USB (useful for esoteric OS X images) via=pmu - Use via-pmu with USB mouse and keyboards, as per a real PowerMac3,1 machine Eventually the aim is to switch the mac99 default option to via=pmu but there are some minor issues with older OS X related to timer calibration and USB that means I'm not ready to do that just yet. Note that the via-pmu device also requires an updated OpenBIOS containing a suitable PMU driver which have been posted over to the OpenBIOS mailing list at https://mail.coreboot.org/pipermail/openbios/2018-June/010384.html. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Mark Cave-Ayland (7): ppc: introduce Core99MachinesState for the mac99 machine mac_newworld: add via machine option to control mac99 VIA/ADB configuration mac_newworld: add gpios to macio devices with PMU enabled mac_newworld: wire up programmer switch to NMI handler adb: fix read reg 3 byte ordering adb: add property to disable direct reg 3 writes mac_newworld: add PMU device default-configs/ppc-softmmu.mak | 2 + hw/input/adb-kbd.c | 29 +- hw/input/adb-mouse.c | 41 +- hw/input/adb.c | 7 + hw/misc/macio/Makefile.objs | 2 + hw/misc/macio/gpio.c | 231 +++++++++++ hw/misc/macio/macio.c | 89 +++- hw/misc/macio/pmu.c | 871 ++++++++++++++++++++++++++++++++++++++++ hw/misc/macio/trace-events | 28 ++ hw/ppc/mac.h | 20 + hw/ppc/mac_newworld.c | 84 +++- include/hw/input/adb.h | 1 + include/hw/misc/macio/gpio.h | 47 +++ include/hw/misc/macio/macio.h | 7 + include/hw/misc/macio/pmu.h | 237 +++++++++++ include/hw/ppc/ppc.h | 1 + 16 files changed, 1639 insertions(+), 58 deletions(-) create mode 100644 hw/misc/macio/gpio.c create mode 100644 hw/misc/macio/pmu.c create mode 100644 include/hw/misc/macio/gpio.h create mode 100644 include/hw/misc/macio/pmu.h