summaryrefslogtreecommitdiffstats
path: root/hw/sparc32_dma.c
Commit message (Collapse)AuthorAgeFilesLines
* sparc32: ledma extra registers need tracing tooBob Breuer2010-12-201-3/+8
| | | | | | | | Also trace the extra registers, and update the comments with new info from Artyom Tarasenko. Signed-off-by: Bob Breuer <breuerr@mc.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* sparc32: ledma extra registersBob Breuer2010-12-181-1/+14
| | | | | | | | | | ledma has 0x20 bytes of registers according to OBP, and at least Solaris9 reads the 5th register which is beyond what we've mapped. So let's setup a flag (inspired by a previous patch from Blue Swirl) to identify ledma from espdma, and map another 16 bytes of registers which return 0. Signed-off-by: Bob Breuer <breuerr@mc.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Add endianness as io mem parameterAlexander Graf2010-12-111-1/+2
| | | | | | | | | | | | | As stated before, devices can be little, big or native endian. The target endianness is not of their concern, so we need to push things down a level. This patch adds a parameter to cpu_register_io_memory that allows a device to choose its endianness. For now, all devices simply choose native endian, because that's the same behavior as before. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* sparc32: convert debug printf statements to tracepointsBlue Swirl2010-10-311-29/+13
| | | | | | Replace debug printf statements with tracepoints. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* ESP: fix ESP DMA access when DMA is not enabledBlue Swirl2010-09-111-4/+19
| | | | | | | | | | | | | | Sending ESP a command caused it to trigger DMA immediately even if DMA was not enabled at the DMA controller. Add a signal from DMA controller to ESP to tell ESP about changes in DMA enable bit. Also use the correct function for setting up GPIO outputs. This fixes NetBSD 1.6.1 through 3.0 boot. Thanks to Artyom Tarasenko for extensive debugging of the problem. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* sparc32 protect read-only bits in DMA CSR registersArtyom Tarasenko2010-05-221-4/+8
| | | | | | | | | | | | On a real hardware changing read-only bits has no effect Use a mask common for SCSI and Ethernet registers. The crucial bit is DMA_INTR, because setting or clearing it may produce spurious interrupts. This patch allows booting Solaris 2.3 Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* sparc32 fix spurious dma interrupts v2Artyom Tarasenko2010-02-151-10/+24
| | | | | | | | | | | | | | | Don't raise irq when not enabled. Raise irq on enabling if DMA_INTR is set Don't clear irq unless it was raised by DMA, as there are other irq sources Don't set DMA_INTR bit spuriously. v1->v2: - Don't clear irq unless it was raised by DMA - Raise irq on enabling if DMA_INTR is set - Assume revertion of 787cfbc432bf1d353a77cbdb613754f3963371a3 Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Revert "Sparc32: improve DMA controller IRQ debugging"Blue Swirl2010-02-151-2/+0
| | | | This reverts commit 787cfbc432bf1d353a77cbdb613754f3963371a3.
* Sparc32: improve DMA controller IRQ debuggingBlue Swirl2010-01-161-0/+2
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* sparc32 (mostly): remove unneeded calls to device resetBlue Swirl2009-11-071-1/+0
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* sparc32: convert DMA controller to reset + vmsd, fix reset on initBlue Swirl2009-10-241-5/+6
| | | | | | Add a missing call to reset on device init. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Revert "Get rid of _t suffix"Anthony Liguori2009-10-011-4/+4
| | | | | | | | | | | | In the very least, a change like this requires discussion on the list. The naming convention is goofy and it causes a massive merge problem. Something like this _must_ be presented on the list first so people can provide input and cope with it. This reverts commit 99a0949b720a0936da2052cb9a46db04ffc6db29. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Get rid of _t suffixmalc2009-10-011-4/+4
| | | | | | | Some not so obvious bits, slirp and Xen were left alone for the time being. Signed-off-by: malc <av1474@comtv.ru>
* Sparc32: port DMA controller to VMState designBlue Swirl2009-08-281-22/+11
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* qdev: add return value to init() callbacks.Gerd Hoffmann2009-08-271-1/+2
| | | | | | | | | | | | | | | | | | Sorry folks, but it has to be. One more of these invasive qdev patches. We have a serious design bug in the qdev interface: device init callbacks can't signal failure because the init() callback has no return value. This patch fixes it. We have already one case in-tree where this is needed: Try -device virtio-blk-pci (without drive= specified) and watch qemu segfault. This patch fixes it. With usb+scsi being converted to qdev we'll get more devices where the init callback can fail for various reasons. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Make CPURead/WriteFunc structure 'const'Blue Swirl2009-08-251-2/+2
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* qdev/prop: convert sparc32_dma.c to helper macros.Gerd Hoffmann2009-08-101-6/+2
| | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
* Sparc32: move sparc32_dma init to sun4m.cBlue Swirl2009-08-081-21/+1
| | | | | | Also connect ESP and Lance reset signals to DMA. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* qdev: rework device properties.Gerd Hoffmann2009-07-161-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is a major overhaul of the device properties. The properties are saved directly in the device state struct now, the linked list of property values is gone. Advantages: * We don't have to maintain the list with the property values. * The value in the property list and the value actually used by the device can't go out of sync any more (used to happen for the pci.devfn == -1 case) because there is only one place where the value is stored. * A record describing the property is required now, you can't set random properties any more. There are bus-specific and device-specific properties. The former should be used for properties common to all bus drivers. Typical use case is bus addressing, i.e. pci.devfn and i2c.address. Properties have a PropertyInfo struct attached with name, size and function pointers to parse and print properties. A few common property types have PropertyInfos defined in qdev-properties.c. Drivers are free to implement their own very special property parsers if needed. Properties can have default values. If unset they are zero-filled. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Sparc32: convert sparc32_dma to qdevBlue Swirl2009-07-151-11/+46
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Revert "Introduce reset notifier order"Jan Kiszka2009-06-291-1/+1
| | | | | | | | | This reverts commit 8217606e6edb49591b4a6fd5a0d1229cebe470a9 (and updates later added users of qemu_register_reset), we solved the problem it originally addressed less invasively. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Remove io_index argument from cpu_register_io_memory()Avi Kivity2009-06-161-1/+1
| | | | | | | | | The parameter is always zero except when registering the three internal io regions (ROM, unassigned, notdirty). Remove the parameter to reduce the API's power, thus facilitating future change. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Introduce reset notifier orderJan Kiszka2009-05-221-1/+1
| | | | | | | | | | | | | | | Add the parameter 'order' to qemu_register_reset and sort callbacks on registration. On system reset, callbacks with lower order will be invoked before those with higher order. Update all existing users to the standard order 0. Note: At least for x86, the existing users seem to assume that handlers are called in their registration order. Therefore, the patch preserves this property. If someone feels bored, (s)he could try to identify this dependency and express it properly on callback registration. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Replace gcc variadic macro extension with C99 versionBlue Swirl2009-05-131-3/+3
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* hw: remove error handling from qemu_malloc() callers (Avi Kivity)aliguori2009-02-051-2/+0
| | | | | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162
* Revert part of r5853blueswir12008-12-151-2/+5
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6057 c046a42c-6fe2-441c-8c8c-71466251a162
* Remove address maskingblueswir12008-12-021-3/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5853 c046a42c-6fe2-441c-8c8c-71466251a162
* Register only valid register access widthsblueswir12008-01-011-4/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3881 c046a42c-6fe2-441c-8c8c-71466251a162
* Break up vl.h.pbrook2007-11-171-1/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
* find -type f | xargs sed -i 's/[\t ]$//g' # on most filesths2007-09-161-2/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
* Remove old leftoversblueswir12007-08-161-3/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3121 c046a42c-6fe2-441c-8c8c-71466251a162
* Use qemu_irq for a reset signal between DMA and ESP/Lanceblueswir12007-08-161-13/+7
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3120 c046a42c-6fe2-441c-8c8c-71466251a162
* Use qemu_irqs between dma controllers and esp, lanceblueswir12007-05-271-16/+14
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2873 c046a42c-6fe2-441c-8c8c-71466251a162
* Split DMA controller in twoblueswir12007-05-261-41/+31
| | | | | | | Fix register size related bugs git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2869 c046a42c-6fe2-441c-8c8c-71466251a162
* Use full 36-bit physical address space on SS10blueswir12007-05-191-2/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2830 c046a42c-6fe2-441c-8c8c-71466251a162
* Unify IRQ handling.pbrook2007-04-071-20/+19
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162
* better PCNET endianness supportbellard2006-09-031-4/+38
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2147 c046a42c-6fe2-441c-8c8c-71466251a162
* Separate the DMA controllers - Convert ESP to new DMA methods (Blue Swirl)bellard2006-09-031-0/+249
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2143 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud