summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2014-02-14qdev: Add enum property types to QAPI schemaPaolo Bonzini3-27/+13
Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14block: Handle "rechs" and "large" translation optionsPaolo Bonzini1-3/+5
Sure, CHS translation is an obscure topic, and legacy options for hard-disk geometries are obscure as well. But since QEMU does nothing with it except telling the BIOS, and since there "large" and "rechs" are listed in the enums, parsing them seems to be the bare minimum. Acked-by: Stefan Hajnoczi <stefanha@gmail.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14qdev: Remove hex8/32/64 property typesPaolo Bonzini32-80/+53
Replace them with uint8/32/64. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14qdev: Remove most legacy printersPaolo Bonzini1-60/+0
Their functionality is either aesthetic only (e.g. on/off vs. true/false) or obtained by the "human mode" of StringOutputVisitor. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14qdev: Inline qdev_prop_parse()Paolo Bonzini1-7/+1
Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14qdev: Legacy properties are just stringsPaolo Bonzini1-6/+2
prop->info->legacy_name is still used by "-device foo,?". Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14qdev: Legacy properties are now read-onlyPaolo Bonzini2-37/+3
Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14qdev: Remove legacy parsers for hex8/32/64Paolo Bonzini1-54/+0
The hexNN property types have not been accepting values not prefixed by "0x" since QEMU 1.2. Parse those values as decimals now. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14qdev: Sizes are now parsed by StringInputVisitorPaolo Bonzini1-11/+0
Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14ipack: Move IndustryPack out of hw/char/Andreas Färber7-91/+7
Move the header defining an IPackBus and IPackDevice base class into a new include/ directory and move their implementation and a PCI-IndustryPack bridge out of hw/char/ directory into a new hw/ipack/. Acked-by: Alberto Garcia <agarcia@igalia.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14ipoctal232: QOM parent field cleanupAndreas Färber1-4/+6
Clean up accesses to IPOctalState::dev field and rename it. Acked-by: Alberto Garcia <agarcia@igalia.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14ipack: QOM parent field cleanup for IPackDeviceAndreas Färber1-1/+4
Rename the IPackDevice::qdev field to avoid accidental use. Acked-by: Alberto Garcia <agarcia@igalia.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14ipack: QOM parent field cleanup for IPackBusAndreas Färber1-1/+3
Clean up the only user of IPackBus::qbus field and rename it. Acked-by: Alberto Garcia <agarcia@igalia.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14ipack: Convert to QOM realizeAndreas Färber3-26/+29
Acked-by: Alberto Garcia <agarcia@igalia.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14twl92230: QOM'ifyAndreas Färber1-14/+21
Replace usages of FROM_I2C_SLAVE() and direct parent field accesses with QOM cast macro. Rename parent field. Add missing braces while at it. Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14ds1338: QOM'ifyAndreas Färber1-8/+13
Replace usages of FROM_I2C_SLAVE() with QOM cast macro. Rename parent field. Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14lm832x: QOM'ifyAndreas Färber1-9/+13
Replace usages of FROM_I2C_SLAVE() and direct parent field accesses with QOM cast macro. Rename parent field. Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14max7310: QOM'ifyAndreas Färber1-9/+14
Replace FROM_I2C_SLAVE() usages with QOM cast macro. Rename parent field. Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14ssd0303: QOM'ifyAndreas Färber1-6/+12
Replace usages of FROM_I2C_SLAVE() with QOM cast macro. Rename parent field. Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14wm8750: QOM'ifyAndreas Färber1-13/+20
Replace usages of FROM_I2C_SLAVE() and direct parent field accesses with QOM cast macro. Rename parent field. Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14z2: QOM'ify AER915Andreas Färber1-7/+13
Replace usages of FROM_I2C_SLAVE() with QOM cast macro. Rename the parent field. Reuse the type constant in z2_init(). Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> [AF: Use TYPE_AER915 in z2_init() too] Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14tosa: QOM'ify DACAndreas Färber1-5/+11
Replace usages of FROM_I2C_SLAVE() with QOM cast macro. Rename parent field. Use type constant in tosa_tg_init(). Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14pxa2xx: QOM'ify I2C slaveAndreas Färber1-13/+25
Replace usages of FROM_I2C_SLAVE() and direct parent field accesses with QOM cast macro. Rename parent field to assure we caught all. Reuse type constant in pxa2xx_i2c_init(). Add some missing braces while at it. Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14i2c: Rename i2c_bus to I2CBusAndreas Färber25-62/+62
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14nand: Don't use qdev_create() in nand_init()Andreas Färber1-1/+1
Commit 7426aa72c36c908a7d0eae3e38568bb0a70de479 (nand: Don't inherit from Sysbus) changed the parent type of TYPE_NAND but continued to use qdev_create(), which handled a NULL BusState as SysBus. Use object_new() instead, and reuse the TYPE_NAND define while at it. Reported-by: Markus Armbruster <armbru@redhat.com> Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-13ppcemb-softmmu: Drop Mac and e500 emulationAndreas Färber1-2/+2
They are still available in ppc-softmmu and ppc64-softmmu. Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-13Merge remote-tracking branch 'remotes/afaerber/tags/prep-for-upstream' into ↵Peter Maydell3-5/+5
staging PReP machine and devices * Cleanups for Raven PCI host bridge * Removal of PReP machine and devices from qemu-system-ppcemb # gpg: Signature made Mon 10 Feb 2014 16:19:03 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/prep-for-upstream: prep: Drop from ppcemb-softmmu raven: Use constant PCI_NUM_PINS instead of 4 prep: Kill get_system_io() usage Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-11petalogix-ml605: Create the CPU with object_new()Edgar E. Iglesias1-5/+2
This is to allow future patches to set properties before cpu::realize(). Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2014-02-11exec: Make cpu_physical_memory_write_rom input an ASEdgar E. Iglesias3-3/+6
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2014-02-11exec: Make stb_phys input an AddressSpaceEdgar E. Iglesias6-17/+25
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2014-02-11exec: Make stw_*_phys input an AddressSpaceEdgar E. Iglesias8-14/+20
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2014-02-11exec: Make stl_phys_notdirty input an AddressSpaceEdgar E. Iglesias2-5/+6
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2014-02-11exec: Make stl_*_phys input an AddressSpaceEdgar E. Iglesias13-31/+36
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2014-02-11exec: Make stq_*_phys input an AddressSpaceEdgar E. Iglesias6-9/+14
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2014-02-11exec: Make lduw_*_phys input an AddressSpaceEdgar E. Iglesias5-16/+19
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2014-02-11exec: Make ldq/ldub_*_phys input an AddressSpaceEdgar E. Iglesias9-21/+27
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2014-02-11exec: Make ldl_*_phys input an AddressSpaceEdgar E. Iglesias10-18/+29
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2014-02-11Merge remote-tracking branch ↵Peter Maydell8-37/+738
'remotes/pmaydell/tags/pull-target-arm-20140208' into staging target-arm queue: * more A64 Neon instructions * AArch32 VCVTB and VCVTT ARMv8 instructions * fixes to inaccuracies in GIC emulation * libvixl disassembler for A64 * Allwinner SoC ethernet controller * zynq software system reset support # gpg: Signature made Sat 08 Feb 2014 15:53:05 GMT using RSA key ID 14360CDE # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" * remotes/pmaydell/tags/pull-target-arm-20140208: (29 commits) arm/zynq: Add software system reset via SCLR hw/arm/allwinner-a10: initialize EMAC hw/net: add support for Allwinner EMAC Fast Ethernet controller util/fifo8: clear fifo head upon reset util/fifo8: implement push/pop of multiple bytes disas: Implement disassembly output for A64 disas/libvixl: Fix upstream libvixl compilation issues disas: Add subset of libvixl sources for A64 disassembler rules.mak: Link with C++ if we have a C++ compiler rules.mak: Support .cc as a C++ source file suffix arm_gic: Add GICC_APRn state to the GICState vmstate: Add uint32 2D-array support arm_gic: Support setting/getting binary point reg arm_gic: Keep track of SGI sources arm_gic: Fix GIC pending behavior target-arm: Add support for AArch32 64bit VCVTB and VCVTT target-arm: A64: Add FNEG and FABS to the SIMD 2-reg-misc group target-arm: A64: Add 2-reg-misc REV* instructions target-arm: A64: Add narrowing 2-reg-misc instructions target-arm: A64: Implement 2-reg-misc CNT, NOT and RBIT ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-10Merge remote-tracking branch 'remotes/kvaneesh/for-upstream' into stagingPeter Maydell5-12/+25
* remotes/kvaneesh/for-upstream: hw/9pfs: fix P9_STATS_GEN handling hw/9pfs: make get_st_gen() return ENOTTY error on special files hw/9pfs: handle undefined FS_IOC_GETVERSION case in handle_ioc_getversion() hw/9pfs: fix error handing in local_ioc_getversion() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-10prep: Drop from ppcemb-softmmuAndreas Färber1-1/+1
ppcemb covers only embedded processors, which does not include PReP. Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2014-02-09raven: Use constant PCI_NUM_PINS instead of 4Hervé Poussineau1-3/+3
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2014-02-09prep: Kill get_system_io() usageHervé Poussineau1-1/+1
While ISA address space in prep machine is currently the one returned by get_system_io(), this depends of the implementation of i82378/raven devices, and this may not be the case forever. Use the right ISA address space when adding some more ports to it. We can use whatever ISA device on the right ISA bus, as all ISA devices on the same ISA bus share the same ISA address space. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2014-02-08Merge remote-tracking branch 'remotes/mwalle/tags/lm32-fixes/20140204' into ↵Peter Maydell7-6/+25
staging target-lm32: fixes # gpg: Signature made Tue 04 Feb 2014 18:47:56 GMT using DSA key ID 3F98A378 # gpg: Can't check signature: public key not found * remotes/mwalle/tags/lm32-fixes/20140204: hw/lm32: print error if cpu model is not found target-lm32: stop VM on illegal or unknown instruction lm32_sys: dump cpu state if test case fails lm32_sys: print test result on stderr target-lm32: add breakpoint/watchpoint support target-lm32: move model features to LM32CPU target-lm32: kill cpu_abort() calls milkymist-vgafb: swap pixel data in source buffer lm32_uart/lm32_juart: use qemu_chr_fe_write_all() milkymist-uart: use qemu_chr_fe_write_all() instead of qemu_chr_fe_write() tests: lm32: new rule for single test cases lm32_sys: increase test case name length limit Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-08arm/zynq: Add software system reset via SCLRSebastian Huber1-0/+5
Support software-driven system reset via the register in the SCLR. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-08hw/arm/allwinner-a10: initialize EMACBeniamino Galvani2-2/+25
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-08hw/net: add support for Allwinner EMAC Fast Ethernet controllerBeniamino Galvani2-0/+540
This patch adds support for the Fast Ethernet MAC found on Allwinner SoCs, together with a basic emulation of Realtek RTL8201CP PHY. Since there is no public documentation of the Allwinner controller, the implementation is based on Linux kernel driver. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-08arm_gic: Add GICC_APRn state to the GICStateChristoffer Dall2-2/+8
The GICC_APRn registers are not currently supported by the ARM GIC v2.0 emulation. This patch adds the missing state. Note that we also change the number of APRs to use a define GIC_NR_APRS based on the maximum number of preemption levels. This patch also adds RAZ/WI accessors for the four registers on the emulated CPU interface. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-08arm_gic: Support setting/getting binary point regChristoffer Dall2-5/+13
Add a binary_point field to the gic emulation structure and support setting/getting this register now when we have it. We don't actually support interrupt grouping yet, oh well. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-08arm_gic: Keep track of SGI sourcesChristoffer Dall2-14/+89
Right now the arm gic emulation doesn't keep track of the source of an SGI (which apparently Linux guests don't use, or they're fine with assuming CPU 0 always). Add the necessary matrix on the GICState structure and maintain the data when setting and clearing the pending state of an IRQ and make the state visible to the guest. Note that we always choose to present the source as the lowest-numbered CPU in case multiple cores have signalled the same SGI number to a core on the system. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-08arm_gic: Fix GIC pending behaviorChristoffer Dall2-18/+62
The existing implementation of the pending behavior in gic_set_irq, gic_complete_irq, and the distributor pending set/clear registers does not follow the semantics of the GICv2.0 specs, but may implement the 11MPCore support. Therefore, maintain the existing semantics for 11MPCore and v7M NVIC and change the behavior to be in accordance with the GICv2.0 specs for "generic implementations" (s->revision == 1 || s->revision == 2). Generic implementations distinguish between setting a level-triggered interrupt pending through writes to the GICD_ISPENDR and when hardware raises the interrupt line. Writing to the GICD_ICPENDR will not cause the interrupt to become non-pending if the line is still active, and conversely, if the line is deactivated but the interrupt is marked as pending through a write to GICD_ISPENDR, the interrupt remains pending. Handle this situation in the GIC_TEST_PENDING (which now becomes a static inline named gic_test_pending) and let the 'pending' field correspond only to the latched state of the D-flip flop in the GICv2.0 specs Figure 4-10. The following changes are added: gic_test_pending: Make this a static inline and split out the 11MPCore from the generic behavior. For the generic behavior, consider interrupts pending if: ((s->irq_state[irq].pending & (cm) != 0) || (!GIC_TEST_EDGE_TRIGGER(irq) && GIC_TEST_LEVEL(irq, cm)) gic_set_irq: Split out the 11MPCore from the generic behavior. For the generic behavior, always GIC_SET_LEVEL() on positive level, but only GIC_SET_PENDING for edge-triggered interrupts and always simply GIC_CLEAR_LEVEL() on negative level. gic_complete_irq: Only resample the line for line-triggered interrupts on an 11MPCore. Generic implementations will sample the line directly in gic_test_pending(). Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>