summaryrefslogtreecommitdiffstats
path: root/hw/sparc
Commit message (Collapse)AuthorAgeFilesLines
* fw_cfg: fix FW_CFG_BOOT_DEVICE update on ppc and sparcGabriel L. Somlo2015-06-101-1/+1
| | | | | | | | | | | | | On ppc, sparc, and sparc64, the value of the FW_CFG_BOOT_DEVICE 16bit fw_cfg entry is repeatedly modified from a series of callbacks, which currently results in the previous value's dynamically allocated memory being leaked. This patch switches updating to the new fw_cfg_modify_i16() call, which does not cause memory leaks. Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* hw/sparc/sun4m.c: Fix misusing qemu_allocate_irqs for single irqShannon Zhao2015-06-031-4/+2
| | | | | | Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* sparc: memory: Replace memory_region_init_ram with ↵Dirk Müller2015-03-252-5/+3
| | | | | | | | | | | | | | | | | | | | memory_region_allocate_system_memory Commit 0b183fc871:"memory: move mem_path handling to memory_region_allocate_system_memory" split memory_region_init_ram and memory_region_init_ram_from_file. Also it moved mem-path handling a step up from memory_region_init_ram to memory_region_allocate_system_memory. Therefore for any board that uses memory_region_init_ram directly, -mem-path is not supported. Fix this by replacing memory_region_init_ram with memory_region_allocate_system_memory. Signed-off-by: Dirk Mueller <dmueller@suse.com> Message-Id: <CAL5wTH7o8uA59Ep0n41i0M19VFWa73n9m172j2W3fjz6=PSVBA@mail.gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* fw_cfg: factor out initialization of FW_CFG_ID (rev. number)Gabriel L. Somlo2015-03-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | The fw_cfg documentation says this of the revision key (0x0001, FW_CFG_ID): > A 32-bit little-endian unsigned int, this item is used as an interface > revision number, and is currently set to 1 by all QEMU architectures > which expose a fw_cfg device. arm/virt doesn't. It could be argued that that's an error in "hw/arm/virt.c"; on the other hand, all of the other fw_cfg providing boards set the interface version to 1 manually, despite the device coming from the same, shared implementation. Therefore, instead of adding fw_cfg_add_i32(fw_cfg, FW_CFG_ID, 1); to arm/virt, consolidate all such existing calls in the fw_cfg initialization code. Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Message-Id: <1426789244-26318-1-git-send-email-somlo@cmu.edu> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed' into ↵Peter Maydell2015-03-111-4/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging qemu-sparc update # gpg: Signature made Tue Mar 10 13:39:51 2015 GMT using RSA key ID AE0F321F # gpg: Good signature from "Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>" * remotes/mcayland/tags/qemu-sparc-signed: sun4u: switch m48t59 NVRAM to MMIO access MAINTAINERS: add myself as SPARC maintainer doc: minor updates to SPARC32 and SPARC64 documentation m48t59: add m48t59 sysbus device m48t59: introduce new base-year qdev property m48t59: let init functions return a Nvram object m48t59: add a Nvram interface m48t59: register a QOM type for each nvram type we support m48t59: move ISA ports/memory regions registration to QOM constructor Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * m48t59: introduce new base-year qdev propertyMark Cave-Ayland2015-03-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | Currently the m48t59 device uses the hardware model in order to determine whether the year value is offset from the hardware value. As this will soon be required by the x59 model, create a qdev base-year property to represent the base year and update the callers appropriately. Reviewed-by: Hervé Poussineau <hpoussin@reactos.org> CC: Andreas Färber <afaerber@suse.de> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
| * m48t59: let init functions return a Nvram objectHervé Poussineau2015-03-101-3/+5
| | | | | | | | | | | | | | | | | | Remove left-overs from header file. Move some functions only used by PReP to hw/ppc/prep.c Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> CC: Andreas Färber <afaerber@suse.de> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
* | sparc/leon3.c: fix memory leakGonglei2015-03-101-0/+1
|/ | | | | Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* hmp: Name HMP info handler functions hmp_info_SUBCOMMAND()Markus Armbruster2015-02-181-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>
* fw_cfg: move boards to fw_cfg_init_io() / fw_cfg_init_mem()Laszlo Ersek2014-12-221-1/+1
| | | | | | | | | | This allows us to drop the fw_cfg_init() shim and to enforce the possible mappings at compile time. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1419250305-31062-3-git-send-email-pbonzini@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* bootdevice: add Error **errp argument for QEMUBootSetHandlerGonglei2014-12-221-2/+2
| | | | | | | | | | | | | | | It will be useful for checking when we change traditional boot order dynamically and propagate error message to the monitor. For x86 architecture, we pass &local_err to set_boot_dev() when vm startup in pc_coms_init(). Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Alexander Graf <agraf@suse.de> Cc: Blue Swirl <blauwirbel@gmail.com> Cc: qemu-ppc@nongnu.org Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
* hw: Convert from BlockDriverState to BlockBackend, mostlyMarkus Armbruster2014-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Device models should access their block backends only through the block-backend.h API. Convert them, and drop direct includes of inappropriate headers. Just four uses of BlockDriverState are left: * The Xen paravirtual block device backend (xen_disk.c) opens images itself when set up via xenbus, bypassing blockdev.c. I figure it should go through qmp_blockdev_add() instead. * Device model "usb-storage" prompts for keys. No other device model does, and this one probably shouldn't do it, either. * ide_issue_trim_cb() uses bdrv_aio_discard() instead of blk_aio_discard() because it fishes its backend out of a BlockAIOCB, which has only the BlockDriverState. * PC87312State has an unused BlockDriverState[] member. The next two commits take care of the latter two. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* tcx: Implement hardware accelerationMark Cave-Ayland2014-09-231-19/+37
| | | | | | | | | | | | | | | The S24/TCX framebuffer is a mildly accelerated video card with blitter, stippler and hardware cursor. * Solaris and NetBSD 6.x use all the hardware acceleration features * The Xorg driver (used by Linux) can use the hardware cursor only This patch implements hardware acceleration in both 8 bit and 24 bit modes. It is based on the NetBSD driver sources and from tests with Solaris. Signed-off-by: Olivier Danet <odanet@caramail.com> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
* memory: add parameter errp to memory_region_init_ramHu Tao2014-09-092-6/+8
| | | | | | | | | Add parameter errp to memory_region_init_ram and update all call sites to pass in &error_abort. Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* tcx: move initialisation from realizefn to initfnMark Cave-Ayland2014-06-051-5/+5
| | | | | | | Initialisation cleanup as suggested by Andreas. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> CC: Andreas Färber <afaerber@suse.de>
* machine: Conversion of QEMUMachineInitArgs to MachineStateMarcel Apfelbaum2014-05-282-38/+38
| | | | | | | | | | | | | Total removal of QEMUMachineInitArgs struct. QEMUMachineInitArgs's fields are copied into MachineState. Removed duplicated fields from MachineState. All the other changes are only mechanical refactoring, no semantic changes. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> (s390) Reviewed-by: Michael S. Tsirkin <mst@redhat.com> (PC) [AF: Renamed ms -> machine, use MACHINE_GET_CLASS()] Signed-off-by: Andreas Färber <afaerber@suse.de>
* sun4m: Add Sun CG3 framebuffer initialisation functionMark Cave-Ayland2014-02-271-3/+59
| | | | | | | | | | | | | | | | | | | | | In order to allow the user to choose the framebuffer for sparc-softmmu, add -vga tcx and -vga cg3 options to the QEMU command line. If no option is specified, the default TCX framebuffer is used. Since proprietary FCode ROMs use a resolution of 1152x900, slightly relax the validation rules to allow both displays to be initiated at the higher resolution used by these ROMs upon request (OpenBIOS FCode ROMs default to the normal QEMU sun4m default resolution of 1024x768). Finally move any fprintf(stderr ...) statements in the areas affected by this patch over to the new error_report() function. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> CC: Blue Swirl <blauwirbel@gmail.com> CC: Anthony Liguori <aliguori@amazon.com> CC: Peter Maydell <peter.maydell@linaro.org> CC: Bob Breuer <breuerr@mc.net> CC: Artyom Tarasenko <atar4qemu@gmail.com>
* sparc/leon3: Initialize stack pointerSebastian Huber2014-02-151-0/+3
| | | | | | | | | | | A lot of real world LEON3 systems are shipped with the GRMON boot loader. This boot loader initializes the stack pointer with the end of RAM address. The application can use this to detect the RAM size of a particular board variant. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de> Reviewed-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* exec: Make cpu_physical_memory_write_rom input an ASEdgar E. Iglesias2014-02-111-1/+2
| | | | | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
* sun4m: Add FCode ROM for TCX framebufferMark Cave-Ayland2013-11-211-7/+10
| | | | | | | | | | | | | | | | | | | | Upstream OpenBIOS now implements SBus probing in order to determine the contents of a physical bus slot, which is required to allow OpenBIOS to identify the framebuffer without help from the fw_cfg interface. SBus probing works by detecting the presence of an FCode program (effectively tokenised Forth) at the base address of each slot, and if present executes it so that it creates its own device node in the OpenBIOS device tree. The FCode ROM is generated as part of the OpenBIOS build and should generally be updated at the same time. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> CC: Blue Swirl <blauwirbel@gmail.com> CC: Bob Breuer <breuerr@mc.net> CC: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* leon3: Don't enforce use of -bios with qtestAndreas Färber2013-11-051-1/+2
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* hw: Clean up bogus default boot orderMarkus Armbruster2013-08-282-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We set default boot order "cad" in every single machine definition except "pseries" and "moxiesim", even though very few boards actually care for boot order, and "cad" makes sense for even fewer. Machines that care: * pc and its variants Accept up to three letters 'a', 'b' (undocumented alias for 'a'), 'c', 'd' and 'n'. Reject all others (fatal with -boot). * nseries (n800, n810) Check whether order starts with 'n'. Silently ignored otherwise. * prep, g3beige, mac99 Extract the first character the machine understands (subset of 'a'..'f'). Silently ignored otherwise. * spapr Accept an arbitrary string (vl.c restricts it to contain only 'a'..'p', no duplicates). * sun4[mdc] Use the first character. Silently ignored otherwise. Strip characters these machines ignore from their default boot order. For all other machines, remove the unused default boot order alltogether. Note that my rename of QEMUMachine member boot_order to default_boot_order and QEMUMachineInitArgs member boot_device to boot_order has a welcome side effect: it makes every use of boot orders visible in this patch, for easy review. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* sun4: Don't prematurely explode QEMUMachineInitArgsMarkus Armbruster2013-08-211-88/+25
| | | | | | | | | Don't explode QEMUMachineInitArgs before passing it to sun4m_hw_init(), sun4uv_init(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* sun4m: QOM cast cleanup for RamDeviceAndreas Färber2013-07-291-6/+9
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* sun4m: QOM cast cleanup for PROMStateAndreas Färber2013-07-291-4/+8
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* sun4m: QOM cast cleanup for AFXStateAndreas Färber2013-07-291-4/+8
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* sun4m: QOM cast cleanup for IDRegStateAndreas Färber2013-07-291-4/+11
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* sun4m: add display width and height to the firmware configurationMark Cave-Ayland2013-07-261-0/+4
| | | | | | | | | | Currently the graphics resolution for TCX is fixed at 1024x768, however other framebuffers are capable of supporting additional resolutions. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> CC: Anthony Liguori <aliguori@us.ibm.com> CC: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* cpu: Replace cpu_single_env with CPUState current_cpuAndreas Färber2013-07-091-3/+2
| | | | | | Move it to qom/cpu.h. Signed-off-by: Andreas Färber <afaerber@suse.de>
* hw/s*: pass owner to memory_region_init* functionsPaolo Bonzini2013-07-041-4/+5
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* memory: add owner argument to initialization functionsPaolo Bonzini2013-07-042-6/+6
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* refer to FWCfgState explicitlyLaszlo Ersek2013-06-021-1/+1
| | | | | | | | | Currently some places use pointer-to-void even though they mean pointer-to-FWCfgState. Clean them up. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* firmware_abi: move to include/hw/nvram/Michael S. Tsirkin2013-06-021-1/+1
| | | | | | | | | | 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>
* Remove Sun4c, Sun4d and a few CPUsBlue Swirl2013-05-261-461/+2
| | | | | | | | | | | Sun4c and Sun4d architectures and related CPUs are not fully implemented (especially Sun4c MMU) and there has been no interest for them. Likewise, a few CPUs (Cypress, Ross etc) are only half implemented. Remove the machines and CPUs, they can be re-added if needed later. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* qdev: Drop taddr propertiesPeter Maydell2013-04-201-1/+0
| | | | | | | | | | | | Drop all the infrastructure for taddr properties (ie ones which are 'hwaddr' sized). These are now unused, and any further desired use would be rather questionable since device properties shouldn't generally depend on a type that is conceptually variable based on the target CPU. 32 or 64 bit integer properties should be used instead as appropriate for the specific device. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* sysemu: avoid proliferation of include/ subdirectoriesPaolo Bonzini2013-04-151-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: move other devices to hw/misc/, configure with default-configs/Paolo Bonzini2013-04-081-5/+0
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: move interrupt controllers to hw/intc/, configure with default-configs/Paolo Bonzini2013-04-081-5/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: move DMA controllers to hw/dma/, configure with default-configs/Paolo Bonzini2013-04-081-2/+2
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: move timer devices to hw/timer/, configure with default-configs/Paolo Bonzini2013-04-081-2/+2
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: move char devices to hw/char/, configure via default-configs/Paolo Bonzini2013-04-081-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: move display devices to hw/display/, configure via default-configs/Paolo Bonzini2013-04-081-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: move audio devices to hw/audio/, configure via default-configs/Paolo Bonzini2013-04-081-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: move NICs to hw/net/, configure via default-configs/Paolo Bonzini2013-04-081-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: move headers to include/Paolo Bonzini2013-04-082-11/+11
| | | | | | | | | 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>
* hw/tcx: Remove unused 'addr' field and the property that sets itPeter Maydell2013-03-281-1/+0
| | | | | | | | | Remove the 'addr' field from TCXState (since it is completely unused), also the qdev property which sets it. This seems to be a relic from many years past; devices don't need to know where they are mapped. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* cpu: Pass CPUState to cpu_interrupt()Andreas Färber2013-03-122-4/+8
| | | | | | | | Move it to qom/cpu.h to avoid issues with include order. Change pc_acpi_smi_interrupt() opaque to X86CPU. Signed-off-by: Andreas Färber <afaerber@suse.de>
* exec: Pass CPUState to cpu_reset_interrupt()Andreas Färber2013-03-122-2/+7
| | | | | | | | | | | | Move it to qom/cpu.c to avoid build failures depending on include order of cpu-qom.h and exec/cpu-all.h. Change opaques of various ..._irq_handler() functions to the appropriate CPU type to facilitate using cpu_reset_interrupt(). Fix Coding Style issues while at it (missing braces, indentation). Signed-off-by: Andreas Färber <afaerber@suse.de>
* cpu: Move halted and interrupt_request fields to CPUStateAndreas Färber2013-03-122-11/+15
| | | | | | | | | | Both fields are used in VMState, thus need to be moved together. Explicitly zero them on reset since they were located before breakpoints. Pass PowerPCCPU to kvmppc_handle_halt(). Signed-off-by: Andreas Färber <afaerber@suse.de>
* hw: move boards and other isolated files to hw/ARCHPaolo Bonzini2013-03-013-2/+2163
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
OpenPOWER on IntegriCloud