summaryrefslogtreecommitdiff
path: root/hw/misc/macio/macio.c
AgeCommit message (Collapse)AuthorFilesLines
2015-10-09macio: move DBDMA_init from instance_init to realizePaolo Bonzini1-4/+4
DBDMA_init is not idempotent, and calling it from instance_init breaks a simple object_new/object_unref pair. Work around this, pending qdev-ification of DBDMA, by moving the call to realize. Reported-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1443689999-12182-4-git-send-email-armbru@redhat.com>
2015-10-09hw: do not pass NULL to memory_region_init from instance_initPaolo Bonzini1-3/+3
This causes the region to outlive the object, because it attaches the region to /machine. This is not nice for the "realize" method, but much worse for "instance_init" because it can cause dangling pointers after a simple object_new/object_unref pair. Reported-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1443689999-12182-3-git-send-email-armbru@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com>
2015-07-07macio: remove nonexistent interrupt on pin 1Cormac O'Brien1-2/+0
The current macio implementation declares an interrupt that doesn't appear to exist in the hardware or any other emulator implementation. OpenBIOS detects this interrupt and generates an 'interrupts' property in the macio device tree entry. Mac OS 9 halts boot when it detects this interrupt, so it has been removed to permit further progress in the boot process. Signed-off-by: Cormac O'Brien <i.am.cormac.obrien@gmail.com> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Alexander Graf <agraf@suse.de>
2015-06-03macio: Convert to realize()Markus Armbruster1-33/+38
Convert device models "macio-oldworld" and "macio-newworld". Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2015-03-10macio: fix possible memory leakGonglei1-1/+2
If ret = macio_initfn_ide() is less than 0, the timer_memory will leak the memory it points to. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-09macio.c: include parent PCIDevice state in VMStateDescriptionMark Cave-Ayland1-0/+24
This ensures that the macio PCI device is correctly configured when restoring from a VM snapshot. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Alexander Graf <agraf@suse.de>
2014-09-08PPC: Cuda: Use cuda timer to expose tbfreq to guestAlexander Graf1-0/+10
Mac OS X calibrates a number of frequencies on bootup based on reading tb values on bootup and comparing them to via cuda timer values. The only variable we can really steer well (thanks to KVM) is the cuda frequency. So let's use that one to fake Mac OS X into believing the bus frequency is tbfreq * 4. That way Mac OS X will automatically calculate the correct timebase frequency. With this patch and the patch set I posted earlier I can successfully run Mac OS X 10.2, 10.3 and 10.4 guests with -M mac99 on TCG and KVM. Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2014-09-08PPC: mac99: Fix core99 timer frequencyAlexander Graf1-2/+7
There is a special timer in the mac99 machine that we recently started to emulate. Unfortunately we emulated it in the wrong frequency. This patch adapts the frequency Mac OS X uses to evaluate results from this timer, making calculations it bases off of it work. Signed-off-by: Alexander Graf <agraf@suse.de>
2014-06-16macio: Fix timer endiannessAlexander Graf1-1/+1
The timer registers on our KeyLargo macio emulation are read as byte reversed from the big endian guest, so we better expose them endian reversed as well. This fixes initial hickups of booting Mac OS X with -M mac99 for me. Signed-off-by: Alexander Graf <agraf@suse.de> Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2013-08-30qom: Pass available size to object_initialize()Andreas Färber1-6/+7
To be passed on to object_initialize_with_type(). Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> (virtio-ccw) Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-08-22aio / timers: Switch entire codebase to the new timer APIAlex Bligh1-2/+2
This is an autogenerated patch using scripts/switch-timer-api. Switch the entire code base to using the new timer API. Note this patch may introduce some line length issues. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-11PPC: Add timer handler for newworld mac-ioAlexander Graf1-0/+33
Mac OS X accesses fancy timer registers inside of the mac-io on bootup. These really should be ticking at the mac-io bus frequency, but I don't see anyone upset when we just make them as fast as we want to. With this patch on top of my previous patch queue and latest OpenBIOS I am able to boot Mac OS X 10.4 with -M mac99. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-07-11PPC: g3beige: Move secondary IDE bus to mac-ioAlexander Graf1-38/+55
On a real G3 Beige the secondary IDE bus lives on the mac-io chip, not on some random PCI device. Move it there to become more compatible. While at it, also clean up the IDE channel connection logic. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-07-04memory: add owner argument to initialization functionsPaolo Bonzini1-4/+4
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-07-01mac-io: Add escc-legacy memory alias regionAlexander Graf1-0/+47
Mac OS X's debugging serial driver accesses the ESCC through a different register layout, called "escc-legacy". This layout differs from the normal escc register layout purely by the location of the respective registers. This patch adds a memory alias region that takes normal escc registers and maps them into the escc-legacy register space. With this patch applied, a Mac OS X guest successfully emits debug output on the serial port when run with debug parameters set, for example by running: $ qemu-system-ppc -prom-env -'boot-args=-v debug=0x8 io=0xff serial=0x3' \ -cdrom 10.4.iso -boot d Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-08hw: move target-independent files to subdirectoriesPaolo Bonzini1-0/+305
This patch tackles all files that are compiled once, moving them to subdirectories of hw/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>