summaryrefslogtreecommitdiff
path: root/include/hw/sparc
AgeCommit message (Collapse)AuthorFilesLines
2018-01-09sun4u_iommu: update to reflect IOMMU is no longer part of the APB deviceMark Cave-Ayland1-1/+1
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Acked-by: Artyom Tarasenko <atar4qemu@gmail.com>
2018-01-09sun4u: split IOMMU device out from apb.c to sun4u_iommu.cMark Cave-Ayland1-0/+50
By separating the sun4u IOMMU device into new sun4u_iommu.c and sun4m_iommu.h files we noticeably simplify apb.c whilst bringing sun4u in line with all the other IOMMU-supporting architectures. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Acked-by: Artyom Tarasenko <atar4qemu@gmail.com>
2018-01-09sun4m: remove include/hw/sparc/sun4m.h and all references to itMark Cave-Ayland1-14/+0
With the previous commit there is now nothing left in sun4m.h so it can be removed, along with all remaining references to it. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Acked-by: Artyom Tarasenko <atar4qemu@gmail.com>
2018-01-09sun4m: move IOMMU declarations from sun4m.h to sun4m_iommu.hMark Cave-Ayland2-21/+51
Also updating the relevant .c files as required. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Acked-by: Artyom Tarasenko <atar4qemu@gmail.com>
2018-01-09apb: use gpios to wire up the apb device to the SPARC CPU IRQsMark Cave-Ayland1-0/+2
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com>
2017-10-31sun4m: change TYPE_SUN4M_IOMMU macro from "iommu" to "sun4m-iommu"Mark Cave-Ayland1-1/+1
This is a legacy artifact from when the sun4m IOMMU implementation was the only IOMMU available within QEMU. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2017-10-31sun4m_iommu: remove legacy sparc_iommu_memory_rw() functionMark Cave-Ayland1-16/+0
With the switch to the IOMMU memory region and DMA API, this is no longer required. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2017-10-31sun4m: implement IOMMU translation using IOMMU memory regionMark Cave-Ayland1-0/+5
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2017-10-31sparc32_dma: remove is_ledma hack and replace with memory region aliasMark Cave-Ayland1-1/+1
This hack originated from before the memory region API was introduced, and increased the size of the ledma DMA device to capture incorrect accesses beyond the end of the ledma device. A full analysis can be found on Artyom's blog at http://tyom.blogspot.co.uk/2010/10/bug-in-all-solaris-versions-after-57.html. With the memory API we can now simply alias the incorrect access onto its intended destination allowing us to remove the hack. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2017-10-31sparc32_dma: introduce new SPARC32_DMA type container objectMark Cave-Ayland1-0/+12
Create a new SPARC32_DMA container object (including an appropriate container memory region) and add instances of the SPARC32_ESPDMA_DEVICE and SPARC32_LEDMA_DEVICE as child objects. The benefit is that most of the gpio wiring complexity between esp/espdma and lance/ledma is now hidden within the SPARC32_DMA realize function. Since the sun4m IOMMU is already QOMified we can find a reference to it using object_resolve_path_type() allowing us to completely remove all external references to the iommu pointer. Finally we rework sun4m's sparc32_dma_init() to invoke the new SPARC32_DMA object and wire up the remaining board memory regions/IRQs. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com> Acked-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2017-10-31sparc32_dma: make lance device child of ledma deviceMark Cave-Ayland1-0/+3
This makes it possible to reference the lance device from the ledma device as required. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com> Acked-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2017-10-31sparc32_dma: make esp device child of espdma deviceMark Cave-Ayland1-0/+3
This makes it possible to reference the esp device from the espdma device as required, and by wiring up the device ourselves in sun4m.c we can drop use of the esp_init() function. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com> Acked-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2017-10-31sun4m_iommu: move TYPE_SUN4M_IOMMU declaration to sun4m.hMark Cave-Ayland1-0/+16
This is in preparation to allow the type to be used elsewhere. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2017-10-31sparc32_dma: move type declarations from sparc32_dma.c to sparc32_dma.hMark Cave-Ayland1-0/+37
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com> Acked-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2017-10-27sparc: sun4u/sun4v/niagara: use generic cpu_model parsingIgor Mammedov1-2/+1
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <1507211474-188400-33-git-send-email-imammedo@redhat.com> Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2017-01-27char: rename CharDriverState ChardevMarc-André Lureau1-1/+1
Pick a uniform chardev type name. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-18target-sparc: move common cpu initialisation routines to sparc64.cArtyom Tarasenko1-0/+5
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
2016-10-04intc: make HMP 'info irq' and 'info pic' commands use InterruptStatsProvider ↵Hervé Poussineau1-8/+0
interface Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Message-Id: <1474921408-24710-6-git-send-email-hpoussin@reactos.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-07-12Clean up ill-advised or unusual header guardsMarkus Armbruster1-3/+3
Cleaned up with scripts/clean-header-guards.pl. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
2015-03-02Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' ↵Peter Maydell1-9/+3
into staging QOM infrastructure fixes and device conversions * Assertion fix for device_add with non-device types * Documentation fix * qdev_init() error reporting cleanups # gpg: Signature made Tue Feb 24 13:56:33 2015 GMT using RSA key ID 3E7E013F # gpg: Good signature from "Andreas Färber <afaerber@suse.de>" # gpg: aka "Andreas Färber <afaerber@suse.com>" * remotes/afaerber/tags/qom-devices-for-peter: parallel: parallel_hds_isa_init() shouldn't fail parallel: Factor out common parallel_hds_isa_init() serial: serial_hds_isa_init() shouldn't fail serial: Factor out common serial_hds_isa_init() etsec: Replace qdev_init() by qdev_init_nofail() leon3: Replace unchecked qdev_init() by qdev_init_nofail() ide/isa: Replace unchecked qdev_init() by qdev_init_nofail() qdev: Improve qdev_init_nofail()'s error reporting qom: Fix typo, 'my_class_init' -> 'derived_class_init' qdev: Avoid type assertion in qdev_build_hotpluggable_device_list() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-02-24leon3: Replace unchecked qdev_init() by qdev_init_nofail()Markus Armbruster1-9/+3
grlib_irqmp_create(), grlib_gptimer_create() and grlib_apbuart_create() are helpers to create and realize GRLIB devices. Their only caller leon3_generic_hw_init() doesn't check for failure. Only the first can actually fail, and only when the caller fails to set up a pointer property, which is a programming error. Replace qdev_init() by qdev_init_nofail(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-02-18hmp: Name HMP info handler functions hmp_info_SUBCOMMAND()Markus Armbruster1-2/+2
Some are called do_info_SUBCOMMAND() (old ones, usually), some hmp_info_SUBCOMMAND(), some SUBCOMMAND_info(), sometimes SUBCOMMAND pointlessly differs in spelling. Normalize to hmp_info_SUBCOMMAND(), where SUBCOMMAND is exactly the subcommand name with '-' replaced by '_'. Exceptions: * sun4m_irq_info(), sun4m_pic_info() renamed to sun4m_hmp_info_irq(), sun4m_hmp_info_pic(). * lm32_irq_info(), lm32_pic_info() renamed to lm32_hmp_info_irq(), lm32_hmp_info_pic(). Signed-off-by: Markus Armbruster <armbru@redhat.com>
2013-06-02firmware_abi: move to include/hw/nvram/Michael S. Tsirkin1-73/+0
firmware_abi.h with structs for OpenBIOS landed in hw/sparc/ by mistake - move it to hw/nvram/ alongside fw_cfg.h. In addition to sparc it's included from ppc mac_nvram.c and will need to include it from prep.c in the future. Acked-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-04-08hw: move timer devices to hw/timer/, configure with default-configs/Paolo Bonzini1-0/+2
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move headers to include/Paolo Bonzini4-0/+247
Many of these should be cleaned up with proper qdev-/QOM-ification. Right now there are many catch-all headers in include/hw/ARCH depending on cpu.h, and this makes it necessary to compile these files per-target. However, fixing this does not belong in these patches. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>