summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2013-02-28hw/sdhci: introduce standard SD host controllerIgor Mitsyanko3-0/+1613
Device model for standard SD Host Controller Interface (SDHCI) compliant with version 2.00 of SD association specification. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-02-28arm: a9mpcore: Coreify the SCUPeter Crosthwaite3-113/+174
Split the SCU in a9mpcore out into its own object definition. mpcore is now just a container for the mpcore components. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-02-28arm: a9mpcore: remove old_timer_status fieldPeter Crosthwaite1-8/+3
This field was write only and thus unused. Removed. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-02-28arm: mptimer: Remove WDT distinctionPeter Crosthwaite3-64/+41
In QEMU emulation, there is no functional difference between the ARM mpcore private timers and watchdogs. Removed all the distinction between the two from arm_mptimer.c and converted it to be just the mptimer. a9mpcore and arm11mpcore just instantiate the same mptimer object twice to get both timer and WDT. If in the future we want to make the WDT functionally different then we can use either QOM hierarchy to derive WDT from from mptimer, or we can add a property "is-wdt" or some such. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-02-28arm: arm11mpcore, a9mpcore: CamelCased type namesPeter Crosthwaite2-23/+23
To conform with QEMU coding style. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-02-28arm: mptimer: CamelCased type namesPeter Crosthwaite1-28/+28
Trivial find replace on type names "timerblock" and "arm_mptimer_state" to conform with QEMU coding style. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-02-28hw/pflash_cfi01: Treat read in unknown command state as readPeter Maydell1-5/+6
The code for handling the default "unknown command state" case in pflash_read in pflash_cfi01.c comments "reset state & treat it as a read". However the code doesn't actually do this. Moving the default case to the top of the switch so it can fall through into the read case brings this file into line with pflash_cfi02 and makes the code behave as the comments suggest. The pflash_cfi01 code has always had this bug -- it was presumably introduced when the original author copied the cfi02 code and rearranged the order of the switch statement without noticing that the default case relied on the fall-through. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Tested-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 1358777318-7579-3-git-send-email-peter.maydell@linaro.org
2013-02-28hw/pflash_cfi01: Make read after byte-write or erase return statusPeter Maydell1-0/+3
The Intel flash command set requires that a read operation after doing a 'single byte write' command returns the status register; add this case to pflash_read() so we return the correct information. Similarly, the case for the 0x28 flavour of block erase was missing. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Tested-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 1358777318-7579-2-git-send-email-peter.maydell@linaro.org
2013-02-28hw/ds1338: Fix conversion between 12 hours and 24 hours modes.Antoine Mathys1-4/+4
The proper mapping between 24 hours and 12 hours modes is: 0 12 AM 1-11 1-11 AM 12 12 PM 13-23 1-11 PM Fix code accordingly. Signed-off-by: Antoine Mathys <barsamin@gmail.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-02-26Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori6-10/+78
# By Paolo Bonzini (7) and others # Via Kevin Wolf * kwolf/for-anthony: (22 commits) pc: add compatibility machine types for 1.4 blockdev: enable discard by default qemu-nbd: add --discard option blockdev: add discard suboption to -drive block: implement BDRV_O_UNMAP block: complete all IOs before .bdrv_truncate coroutine: trim down nesting level in perf_nesting test coroutine: move pooling to common code qemu-iotests: Test qcow2 image creation options qemu-iotests: Add qemu-img compare test qemu-img: Add compare subcommand qemu-img: Add "Quiet mode" option block: Add synchronous wrapper for bdrv_co_is_allocated_above block: refuse negative iops and bps values block: use Error in do_check_io_limits() qcow2: support compressed clusters in BlockFragInfo qemu-img: add compressed clusters to BlockFragInfo qemu-img: fix missing space in qemu-img check output qcow2: record fragmentation statistics during check qcow2: introduce check_refcounts_l1/l2() flags ...
2013-02-23grlib-apbuart: Add support of various flagsRonald Hecht1-7/+29
- enable/disable Rx and Tx - Rx and Tx interrupt - Tx FIFO empty and Tx SHIFT empty Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-02-23Typo: replace gptimer by apbuartFabien Chouteau1-8/+8
Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-02-23xhci: fix bad print specifierHervé Poussineau1-2/+2
This fixes the following compilation error: hw/usb/hcd-xhci.c:1156:17: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘unsigned int’ Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-02-22pc: add compatibility machine types for 1.4Paolo Bonzini3-5/+63
Adds both pc-i440fx-1.4 and pc-q35-1.4. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-02-22blockdev: enable discard by defaultPaolo Bonzini3-5/+15
Because discard is now a host parameter, we can always fake it as enabled in the guest. This is an extension of the current choice to ignore "not supported" errors from the host when discard_granularity is set to nonzero. The default granularity is set to the logical block size or 4k, whichever is largest, because cluster sizes below 4k are rarely used and 4K is a typical block size for files. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-02-22unbreak hw/usb/redirect.c buildGerd Hoffmann1-1/+1
Commit 8550a02d1239415342959f6a32d178bc05c557cc added a streams parameter to usb_wakeup and didn't update redirect.c. Fix it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-02-21vga: fix byteswapping.Gerd Hoffmann4-13/+13
In case host and guest endianness differ the vga code first creates a shared surface (using qemu_create_displaysurface_from), then goes patch the surface format to indicate that the bytes must be swapped. The switch to pixman broke that hack as the format patching isn't propagated into the pixman image, so ui code using the pixman image directly (such as vnc) uses the wrong format. Fix that by adding a byteswap parameter to qemu_create_displaysurface_from, so we'll use the correct format when creating the surface (and the pixman image) and don't have to patch the format afterwards. [ v2: unbreak xen build ] Cc: qemu-stable@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Cc: agraf@suse.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1361349432-23884-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-02-21Merge remote-tracking branch 'kraxel/usb.78' into stagingAnthony Liguori24-284/+711
# By Gerd Hoffmann # Via Gerd Hoffmann * kraxel/usb.78: uas-uas: usb3 streams usb-xhci: usb3 streams usb-core: usb3 streams usb: fix endpoint descriptor ordering usb-redir: simplify packet copy usb: make usb_packet_copy operate on combined packets usb: add usb_ep_set_halted usb-host: remove usb_host_device_close usb-host: move legacy cmd line bits usb-storage: use scsi_req_enqueue return value allow disabling usb smartcard support make usb devices configurable fix scripts/make_device_config.sh usb: Makefile cleanup
2013-02-21ppc: fix bamboo >256MB RAM initialization in hw/ppc4xx_devs.cAlin Tomescu1-1/+1
I was trying to launch a PowerPC "bamboo" machine with more than 256MB of RAM with qemu-system-ppc -M bamboo -kernel $kernel -initrd $ramdisk -m 512, but QEMU would just hang. However, when I used -m 256, the machine would boot. I looked through the code in hw/ and it seems there is an error when the RAM memory is setup (if my understanding is correct). After patching it, the machine launched and booted successfully with 512MB of RAM. Signed-off-by: Alin Tomescu <tomescu.alin@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-02-21xilinx_axienet.c: Assert no error when making linkPeter Crosthwaite1-1/+3
This gives an awful silent failure when it doesn't work. Assert against link creation failure. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-02-19uas-uas: usb3 streamsGerd Hoffmann1-42/+205
Add usb3 streams support to the uas (usb attached scsi) emulation. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb-xhci: usb3 streamsGerd Hoffmann1-45/+223
Add streams support to the xhci emulation. No secondary streams yet, only linear stream arays are supported for now. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb-core: usb3 streamsGerd Hoffmann14-31/+37
This patch adds support for usb3 streams to the usb subsystem core. This is just adding a streams field / parameter in a number of places. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb: fix endpoint descriptor orderingGerd Hoffmann1-4/+5
Fix the ordering of the endpoint descriptors for superspeed endpoints: The superspeed companion must come first, possible additional descriptors for the endpoint after that. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb-redir: simplify packet copyGerd Hoffmann1-14/+4
usb_packet_copy can handle combined packets now, so it isn't needed to special-case them any more. Also use the new usb_packet_size() function. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb: make usb_packet_copy operate on combined packetsGerd Hoffmann2-5/+15
Likewise usb_packet_skip. Also usb_packet_size. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb: add usb_ep_set_haltedGerd Hoffmann2-0/+7
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb-host: remove usb_host_device_closeGerd Hoffmann4-36/+0
Nobody implements that anyway. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb-host: move legacy cmd line bitsGerd Hoffmann4-101/+190
The code handling the "-usbdevice host:..." legacy command line syntax is moved to the new hw/usb/host-legacy.c file. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb-storage: use scsi_req_enqueue return valueGerd Hoffmann1-2/+3
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19allow disabling usb smartcard supportGerd Hoffmann2-1/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19make usb devices configurableGerd Hoffmann1-8/+12
Leave the core usb devices (usb hub, tablet, mouse, keyboard) enabled unconditionally. Make the other ones configurable. Exceptions: - bluetooth: not qdevified yet, has a vl.c dependency because of that, thus disabling isn't as easy as not linking the object file. - smardcard: ccid-card-emulated depends on that one *and* CONFIG_SMARTCARD_NSS. So it isn't a one-liner and comes as separate patch because of that. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb: Makefile cleanupGerd Hoffmann1-7/+20
Group files, sprinkle in some comments. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-18isa: Split off instance_init for ISADeviceAndreas Färber1-3/+9
Prepares for assigning IRQs before QOM realize. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Message-id: 1361010446-1427-1-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-02-16target-i386: Split command line parsing out of cpu_x86_register()Andreas Färber1-1/+0
In order to instantiate a CPU subtype we will need to know which type, so move the cpu_model splitting into cpu_x86_init(). Parameters need to be set on the X86CPU instance, so move cpu_x86_parse_featurestr() into cpu_x86_init() as well. This leaves cpu_x86_register() operating on the model name only. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-02-16spapr_hcall: Replace open-coded CPU loop with qemu_get_cpu()Andreas Färber1-8/+3
The helper functions all access ppc-specific fields only so don't bother to change arguments to PowerPCCPU and use env_ptr instead. No functional change. Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-02-16ppce500_spin: Replace open-coded CPU loop with qemu_get_cpu()Andreas Färber1-11/+4
Potentially env could be NULL whereas cpu would still be valid and correspond to a previous env. Wrapping this in qemu_get_cpu(), env is no longer needed, so simplify code that existed before 55e5c2850293547203874098f7cec148ffd12dfa. Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-02-16e500: Replace open-coded loop with qemu_get_cpu()Andreas Färber1-8/+3
Since we still need env for ppc-specific fields, obtain it via the new env_ptr fields to avoid "cpu" name conflicts between CPUState and PowerPCCPU for now. This fixes a potential issue with env being NULL at the end of the loop but cpu still being a valid pointer corresponding to a previous env. Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-02-16cpu: Move current_tb field to CPUStateAndreas Färber3-7/+10
Explictly NULL it on CPU reset since it was located before breakpoints. Change vapic_report_tpr_access() argument to CPUState. This also resolves the use of void* for cpu.h independence. Change vAPIC patch_instruction() argument to X86CPU. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-02-16cpu: Move exit_request field to CPUStateAndreas Färber1-2/+3
Since it was located before breakpoints field, it needs to be reset. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-02-16target-m68k: Pass M68kCPU to m68k_set_irq_level()Andreas Färber2-2/+2
Simplifies use of cpu_reset_interrupt() et al. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-02-16mcf_intc: Pass M68kCPU to mcf_intc_init()Andreas Färber3-9/+12
Store it in mcf_intc_state. Prepares for passing it to m68k_set_irq_level(). Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-02-16mcf5206: Pass M68kCPU to mcf5206_init()Andreas Färber3-9/+12
Store it in m5206_mbar_state. Prepares for passing M68kCPU to m68k_set_irq_level(). Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-02-16ppc405_uc: Pass PowerPCCPU to ppc40x_{core,chip,system}_reset()Andreas Färber3-15/+19
Prepares for changing cpu_interrupt() argument to CPUState. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Alexander Graf <agraf@suse.de>
2013-02-16qemu-log: Rename the public-facing cpu_set_log function to qemu_set_logPeter Maydell1-1/+1
Rename the public-facing function cpu_set_log to qemu_set_log. This requires us to rename the internal-only qemu_set_log() to do_qemu_set_log(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-02-13cadance_uart: Accept input after rx FIFO popPeter Crosthwaite1-0/+1
The device returns false from the can receive function when the FIFO is full. This means the device should check for buffered input whenever a byte is popped from the FIFO. Reported-by: Jason Wu <huanyu@xilinx.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 1360632571-25638-1-git-send-email-peter.crosthwaite@xilinx.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-02-13s390: Fix handling of iscs.Cornelia Huck1-2/+2
There are two ways to express an interruption subclass: - As a bitmask, as used in cr6. - As a number, as used in the I/O interruption word. Unfortunately, we have treated to I/O interruption word as if it contained the bitmask as well, which went unnoticed so far as - (queued-for-next) kvm made the same mistake, and - Linux guest kernels don't check the isc value in the I/O interruption word for subchannel interrupts. Make sure that we treat the I/O interruption word correctly. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-02-13s390/sclpconsole: prevent char layer callback during initializationChristian Borntraeger1-4/+1
Starting a qemu with an sclp console and pressing a key very early can result in "qemu-system-s390x: hw/s390x/sclpconsole.c:60: receive_from_chr_layer: Assertion `scon->iov' failed." Lets make sure that the init process is finished, since the iov is allocated after CHR_EVENT_OPENED by also checking for scon->iov. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-02-13xilinx.h: s/xilinx_axiethernetdma()/xilinx_axidma()Peter Crosthwaite2-5/+4
This function has nothing to do with ethernet. Its reusable for all DMA clients. Dropped the "ethernet" in the name accordingly. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-02-13xilinx.h: Dont qdev_create from ethernet_create()Peter Crosthwaite2-12/+7
Pulled the qdev_create functionality out of xilinx_axiethernet_create() and pushed it up to the petalogix_ml605_mmu machine model. This makes the ethernet create+init process consistent with the AXI DMA. Renamed function to xilinx_axiethernet_init accordingly. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>