summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2011-01-26sh4: implement missing mmaped TLB write functionsAurelien Jarno1-3/+2
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-26etrax: Dont decrease the granularity of timersEdgar E. Iglesias1-4/+0
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-01-25mips_fulong: remove bogus HAS_AUDIOIsaku Yamahata1-4/+0
remove bogus HAS_AUDIO according to 738012bec4c67e697e766edadab3f522c552a04d. Cc: Blue Swirl <blauwirbel@gmail.com> Cc: Huacai Chen <zltjiangshi@gmail.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-25audio: consolidate audio_init()Isaku Yamahata5-64/+6
consolidate audio_init() and remove references to shoundhw. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-24Merge remote branch 'kwolf/for-anthony' into stagingAnthony Liguori8-95/+55
2011-01-24SPARC: Emulation of Leon3Fabien Chouteau1-0/+218
Leon3 is an open-source VHDL System-On-Chip, well known in space industry (more information on http://www.gaisler.com). Leon3 is made of multiple components available in the GrLib VHDL library. Three devices are implemented: uart, timers and IRQ manager. You can find code for these peripherals in the grlib_* files. Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-24SPARC: Emulation of GRLIB APB UARTFabien Chouteau2-0/+210
This device exposes one parameter: - chardev (ptr) : Pointer to a qemu character device Emulation of GrLib devices is base on the GRLIB IP Core User's Manual: http://www.gaisler.com/products/grlib/grip.pdf Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-24SPARC: Emulation of GRLIB IRQMPFabien Chouteau2-0/+414
This device exposes two parameters: - set_pil_in (ptr) : A function to set the pil_in of the SPARC CPU - set_pil_in_opaque (ptr) : Opaque argument of the set_pil_in function Emulation of GrLib devices is base on the GRLIB IP Core User's Manual: http://www.gaisler.com/products/grlib/grip.pdf Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-24SPARC: Emulation of GRLIB GPTimerFabien Chouteau2-0/+460
This device exposes three parameters: - frequency (uint32) : The system frequency - irq-line (uint32) : IRQ line number for the first timer (others use irq-line + 1, irq-line + 2...) - nr-timers (uint32) : Number of timers Emulation of GrLib devices is base on the GRLIB IP Core User's Manual: http://www.gaisler.com/products/grlib/grip.pdf Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-24usb-msd: Propagate removable bit to SCSI deviceStefan Hajnoczi1-1/+3
USB Mass Storage Devices sometimes have the RMB (removable) bit set in the SCSI INQUIRY response. Thumbdrives tend to have the bit set whereas hard disks do not. Operating systems differentiate between removable devices and fixed devices. Under Linux, the anaconda installer looks for removable devices. Under Windows, only fixed devices may have more than one partition and AutoRun is also affected by the removable bit. For these reasons, allow USB Mass Storage Devices to override the removable bit: qemu -usb -drive if=none,file=test.img,cache=none,id=disk0 -device usb-storage,drive=disk0,removable=on The default is off. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-01-24scsi: Allow scsi_bus_legacy_add_drive() to set removable bitStefan Hajnoczi4-5/+10
scsi-disk devices may wish to override the removable bit. Add support for a qdev property on SCSI devices. This is will be used by usb-msd. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-01-24scsi-disk: Allow overriding SCSI INQUIRY removable bitStefan Hajnoczi1-0/+3
Provide the "removable" qdev property bit to override the SCSI INQUIRY removable (RMB) bit for non-CDROM devices. This will be used by USB Mass Storage Devices, which sometimes have this guest-visible bit set and sometimes do not. They therefore requires a means for user configuration. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-01-24ide: Remove unneeded null pointer checkStefan Weil1-3/+1
With bm == NULL, other code in the same function would crash. This bug was reported by cppcheck: hw/ide/pci.c:280: error: Possible null pointer dereference: bm Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-01-24ide: kill ide_dma_submit_checkChristoph Hellwig1-9/+6
Merge ide_dma_submit_check into it's only caller. Also use tail recursion using a goto instead of a real recursion - this avoid overflowing the stack in the pathological situation of an recurring error that is ignored. We'll still be busy looping in ide_dma_cb, but at least won't eat up all stack space after this. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-01-24ide: also reset io_buffer_index for writesChristoph Hellwig1-2/+1
Currenly the code only resets the io_buffer_index field for reads, but the code seems to expect this for all types of I/O. I guess we simply don't hit large enough transfers that would require this often enough. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-01-24ide: factor dma handling helpersChristoph Hellwig3-80/+36
Factor the DMA I/O path that is duplicated between read and write commands, into common helpers using the s->is_read flag added for the macio ATA controller. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-01-23multiboot: Fix upper memory size in multiboot infoKevin Wolf1-1/+1
The upper memory size field should exclude the first MB of RAM. Signed-off-by: Kevin Wolf <mail@kevin-wolf.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-23Delete useless 'extern' qualifiers for functionsBlue Swirl7-37/+33
'extern' qualifier is useless for function declarations. Delete them. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-21Merge branch 'usb.4' of git://anongit.freedesktop.org/spice/qemuAurelien Jarno15-1619/+1828
* 'usb.4' of git://anongit.freedesktop.org/spice/qemu: (32 commits) usb: zap pdev from usbport usb: rewrite fw path, fix numbering usb: add port property. usb: keep track of physical port address. usb storage: handle long responses usb storage: fix status reporting usb storage: high speed support usb: add device qualifier support usb: add usb_desc_attach usb: add attach callback usb: add speed mask to ports usb: hid: change serial number to "42". usb: hid: remote wakeup support. usb: hub: remote wakeup support. usb: uhci: remote wakeup support. usb: add usb_wakeup() + wakeup callback to port ops usb: rework attach/detach workflow usb: create USBPortOps, move attach there. usb: move remote wakeup handling to common code usb: move USB_REQ_{GET,SET}_CONFIGURATION handling to common code ...
2011-01-21sm501: fix screen redrawAurelien Jarno1-3/+4
Due to signed/unsigned comparison, the dirty bits are never reset, and the screen redrawn each time. Fix that by only using ram_addr_t types, and looking for page_min != addr_max instead. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-20gt64xxx: set isa_mem_base during registrationAurelien Jarno1-0/+5
isa_mem_base is computed from registers during reset, but due to QEMU limitations some devices (e.g. VGA card) need to know it earlier when they are registered. Workaround this by setting the value during registration instead of reset. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-20hw/pl190.c: Fix writing of default vector addressPeter Maydell1-3/+1
The PL190 implementation keeps the default vector address in vect_addr[16], but we weren't using this for writes to the DEFVECTADDR register. As a result of this fix the default_addr structure member is unused and we can delete it. Reported-by: Himanshu Chauhan <hschauhan@nulltrace.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-20Merge remote branch 'mst/for_anthony' into stagingAnthony Liguori6-15/+71
2011-01-20pci: use qemu_malloc() in pcibus_get_dev_path()Isaku Yamahata1-1/+1
use qemu_malloc() instead of direct use of malloc(). Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-01-20msix: simplify write configIsaku Yamahata1-4/+1
use pci_device_deassert_intx(). Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-01-20msi: simplify write config a bit.Isaku Yamahata1-4/+1
use pci_device_deassert_intx(). Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-01-20pci: deassert intx on reset.Isaku Yamahata2-0/+11
deassert intx on device reset. So far pci_device_reset() is used for system reset. In that case, interrupt controller is reset at the same time so that all irq is are deasserted. But now pci bus reset/flr is supported, and in that case irq needs to be disabled explicitly. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-01-20pxa2xx_lcd: restore updating of displayDmitry Eremin-Solenikov1-2/+2
Recently PXA2xx lcd have stopped to be updated incrementally (picture frozen). This patch fixes that by passing non min/max x/y, but rather (correctly) x/y and w/h. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-20pxa2xx: fix vmstate_pxa2xx_i2cDmitry Eremin-Solenikov1-1/+1
vmstate_pxa2xx_i2c incorrectly recursed to itself instead of going to store slave device. Fix that stop stop qemu from segfaulting during savevm for pxa2xx-based devices. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-20scoop: fix access to registers from second instanceDmitry Eremin-Solenikov1-2/+2
Second instance of scoop contains registers shifted to 0x40 from the start of the page. Instead of messing with register mapping, just limit register address to 0x00..0x3f. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-20mainstone: fix name of the allocated memory for romsDmitry Eremin-Solenikov1-1/+2
Mainstone board has two flash chips (emulated by two ram regions), however currently code tries to allocate them with the same name, which fails. Fix that to make mainstone emulation work again. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-20stc91c111: Implement save/restorePeter Maydell1-0/+30
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-20pl080: Implement save/restorePeter Maydell1-3/+55
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-20pl110: Implement save/restorePeter Maydell1-4/+40
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-20pl031: Implement save/restorePeter Maydell1-1/+24
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-20pl050: Implement save/restorePeter Maydell1-5/+30
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-20arm_sysctl: Implement save/restorePeter Maydell1-0/+17
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-20vpb_sic: Implement save/restorePeter Maydell1-3/+21
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-20pl190: Implement save/restorePeter Maydell1-4/+32
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-20gt64xxx: qdev conversionAurelien Jarno3-50/+69
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-20sh_pci: qdev conversionAurelien Jarno3-57/+75
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-20sh_serial: process all received charactersAurelien Jarno1-21/+21
When operating on the SCIF, process all the received characters, as long as the FIFO can handle them. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-20sh_serial: remove one level of indirectionAurelien Jarno1-15/+2
The indirection functions are empty since commit 8da3ff180974732fc4272cb4433fef85c1822961. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-20usb-hid: modifiers should generate an eventAurelien Jarno1-0/+3
When a modifier key is pressed or released, the USB HID keyboard still answers NAK, unless another key is also pressed or released. The patch fixes that by calling usb_hid_changed() when a modifier key is pressed or released. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-19pci: fix device pathsMichael S. Tsirkin1-4/+12
Patch a6a7005d14b3c32d4864a718fb1cb19c789f58a5 generated broken device paths. We snprintf with a length shorter than the output, so the last character is discarded and replaced by the null byte. Fix it up by snprintf to a buffer which is larger by 1 byte and then memcpy the data (without the null byte) to where we need it. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-01-18mips: Expire late timers when reading cp0_countEdgar E. Iglesias1-2/+10
When reading cp0_count from a timer with a late trigger that should already have expired, expire it and raise the timer irq. This makes it possible for guest code (e.g, Linux) that first read cp0_count, then compare it with cp0_compare and check for raised timer interrupt lines to run reliably. Acked-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-01-18mips: Break out cpu_mips_timer_expireEdgar E. Iglesias1-14/+22
Reorganize for future patches, no functional change. Acked-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-01-17sm501: add 2D engine copyrect supportAurelien Jarno1-3/+37
Linux kernel started to use the SM501 2D engine for the console, and especially the copyrect operation. Implement this operation so that recent kernels can be used with QEMU. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-17Merge remote branch 'mst/for_anthony' into stagingAnthony Liguori17-54/+290
2011-01-17acpi_piix4: expose no_hotplug attribute via i/o portMarcelo Tosatti1-0/+37
Expose no_hotplug attribute via I/O port, so ACPI BIOS can indicate removability status to guest OS. An updated seabios is required to make use of this feature (seabios.git commit ID 3c241edf3d7ef29c21). Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Tested-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>