summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* exec.h cleanupBlue Swirl2011-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move softmmu_exec.h include directives from target-*/exec.h to target-*/op_helper.c. Move also various other stuff only used in op_helper.c there. Define global env in dyngen-exec.h. For i386, move wrappers for segment and FPU helpers from user-exec.c to op_helper.c. Implement raise_exception_err_env() to handle dynamic CPUState. Move the function declarations to cpu.h since they can be used outside of op_helper.c context. LM32, s390x, UniCore32: remove unused cpu_halted(), regs_to_env() and env_to_regs(). ARM: make raise_exception() static. Convert #include "exec.h" to #include "cpu.h" #include "dyngen-exec.h" and remove now unused target-*/exec.h. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* revamp acpitable parsing and allow to specify complete (headerful) tableMichael Tokarev2011-07-301-126/+172
| | | | | | | | | | | | | | | | | | | | This patch almost rewrites acpi_table_add() function (but still leaves it using old get_param_value() interface). The result is that it's now possible to specify whole table (together with a header) in an external file, instead of just data portion, with a new file= parameter, but at the same time it's still possible to specify header fields as before. Now with the checkpatch.pl formatting fixes, thanks to Stefan Hajnoczi for suggestions, with changes from Isaku Yamahata, and with my further refinements. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Cc: Isaku Yamahata <yamahata@valinux.co.jp> Cc: John Baboval <john.baboval@virtualcomputer.com> Cc: Blue Swirl <blauwirbel@gmail.com> [yamahata@valinux.co.jp: fix compile error, comment fallthrough] Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* sd: do not add one sector to the disk sizeVincent Palatin2011-07-301-3/+1
| | | | | | | | | This leads to random off-by-one error. When the size of the SD is exactly 1GB, the emulation was returning a wrong SDHC CSD descriptor. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* usb-hid: Fix 0/0 position for Windows in tablet modeJan Kiszka2011-07-301-0/+5
| | | | | | | | | For unknown reasons, Windows drivers (tested with XP and Win7) ignore usb-tablet events that move the pointer to 0/0. So always report 0/0 as 1/0. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* Add support for Zipit Z2 machineVasily Khoruzhick2011-07-301-0/+358
| | | | | | | | Zipit Z2 is small PXA270 based handheld. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* onenand: Add missing brace.Andrzej Zaborowski2011-07-301-0/+1
| | | | Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* hw/onenand: program actions can only clear bitsJuha Riihimäki2011-07-301-29/+106
| | | | | | | | | | | | | | | The program actions onenand_prog_main() and onenand_prog_spare() can only set bits. This implies a rewrite of onenand_erase() to not use the program functions, since erase does need to set bits. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* onenand: Handle various ID fields separatelyJuha Riihimäki2011-07-303-14/+23
| | | | | | | | | | | | | | Handle the manufacturer, device and version IDs separately rather than smooshing them all together into a single uint32_t. Note that the ID registers are actually 16 bit, even though typically the top bits are 0 and the Read Identification Data command only returns the bottom 8 bits. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* onenand: Pass BlockDriverState to init functionPeter Maydell2011-07-303-10/+12
| | | | | | | | Pass the BlockDriverState to the onenand init function so it doesn't need to look up the drive itself. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* hw/nand: qdevifyJuha Riihimäki2011-07-305-81/+103
| | | | | | | | | | | Qdevify the NAND device. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* hw/nand: Writing to NAND can only clear bitsPeter Maydell2011-07-301-4/+13
| | | | | | | | Writing to a NAND device cannot set bits, it can only clear them; implement this rather than simply copying the data. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* hw/nand: Support multiple reads following READ STATUSJuha Riihimäki2011-07-301-3/+8
| | | | | | | | | | | | After receiving READ STATUS command all subsequent IO reads should return the status register value until another command is issued. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* hw/nand: Support devices wider than 8 bitsJuha Riihimäki2011-07-302-34/+88
| | | | | | | | | | | Support NAND devices which are wider than 8 bits. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* nand: Bump vmstate version after changing structure.Andrzej Zaborowski2011-07-301-3/+3
| | | | Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* hw/nand: Support large NAND devicesJuha Riihimäki2011-07-301-21/+27
| | | | | | | | | | | Add support for NAND devices of over 1Gb. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* hw/nand: Pass block device state to init functionPeter Maydell2011-07-305-10/+15
| | | | | | | | Pass the BlockDeviceState to the nand_init() function rather than having it look it up via drive_get() itself. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* lm832x: Take DeviceState pointer in lm832x_key_event()Peter Maydell2011-07-303-7/+6
| | | | | | | | | | | | | Since lm832x has been qdev'ified, its users will generally have a DeviceState pointer rather than an i2c_slave pointer, so adjust lm832x_key_event's prototype to suit. This allows the n810 (its only user) to actually pass a correct pointer to it rather than NULL. The effect is that we no longer segfault when a key is pressed. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* hw/omap_gpio.c: Convert to qdevJuha Riihimäki2011-07-306-173/+218
| | | | | | | | | | | Convert the OMAP GPIO module to qdev. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* hw/omap_clk: Add the clock for the OMAP2430-specific fifth GPIO modulePeter Maydell2011-07-301-1/+5
| | | | | | | | The OMAP2430 has a fifth GPIO module which earlier OMAP2 models lack; add the clock definition for it. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* hw/omap_l4.c: Add helper function omap_l4_region_baseJuha Riihimäki2011-07-302-0/+8
| | | | | | | | | | | | Add helper function omap_l4_region_base() to return the base address of a particular region of an L4 target agent. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* Merge remote-tracking branch 'agraf/xen-next' into stagingAnthony Liguori2011-07-295-3/+93
|\
| * xen: implement unplug protocol in xen_platformStefano Stabellini2011-07-264-2/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unplug protocol is necessary to support PV drivers in the guest: the drivers expect to be able to "unplug" emulated disks and nics before initializing the Xen PV interfaces. It is responsibility of the guest to make sure that the unplug is done before the emulated devices or the PV interface start to be used. We use pci_for_each_device to walk the PCI bus, identify the devices and disks that we want to disable and dynamically unplug them. Changes in v2: - use PCI_CLASS constants; - replace pci_unplug_device with qdev_unplug; - do not import hw/ide/internal.h in xen_platform.c; Changes in v3: - introduce piix3-ide-xen, that support hot-unplug; - move the unplug code to hw/ide/piix.c; - just call qdev_unplug from xen_platform.c to unplug the IDE disks; Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * xen: make xen_enabled even more cleverAlexander Graf2011-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using xen_enabled() we're currently only checking if xen is enabled at all during the build. But what if you want to build multiple targets out of which only one can potentially run xen code? That means that for generic code we'll still have to fall back to the variable and potentially slow the code down, but it's not as important as that is mostly xen device emulation which is not touched for non-xen targets. The target specific code however can with this patch see that it's unable to ever execute xen code. We can thus always return 0 on xen_enabled(), giving gcc enough hints to evict the mapcache code from the target memory management code. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Anthony PERARD <anthony.perard@citrix.com>
| * xen: Fix xen_enabled().Anthony PERARD2011-07-261-1/+1
| | | | | | | | | | | | | | | | Use the "host" CONFIG_ define instead of the "target" one. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* | Merge remote-tracking branch 'kraxel/migration.2' into stagingAnthony Liguori2011-07-298-0/+51
|\ \
| * | usb-serial doesn't support migrationGerd Hoffmann2011-07-201-0/+7
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-net doesn't support migrationGerd Hoffmann2011-07-201-0/+6
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-bt doesn't support migrationGerd Hoffmann2011-07-201-0/+6
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-wacom doesn't support migrationGerd Hoffmann2011-07-201-0/+6
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb storage: first migration support bits.Gerd Hoffmann2011-07-201-0/+12
| | | | | | | | | | | | | | | | | | | | | Tag vmstate as unmigratable for the time being, to be removed when mgration support is finished. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | ehci doesn't support migrationGerd Hoffmann2011-07-201-0/+7
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | ahci doesn't support migrationGerd Hoffmann2011-07-201-0/+6
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | vmstate: add no_migrate flag to VMStateDescriptionGerd Hoffmann2011-07-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This allows to easily tag devices as non-migratable, so any attempt to migrate a virtual machine with the device in question active will make migration fail. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | multiboot: Fix bss segment supportGöran Weinholt2011-07-291-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Multiboot images can specify a bss segment. The boot loader must clear the memory of the bss and ensure that no modules or structures are allocated inside it. Several fields are provided in the Multiboot header that were previously not used properly. The header is now used to determine how much data should be read from the image and how much memory should be reserved to the bss segment. Signed-off-by: Göran Weinholt <goran@weinholt.se> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | Fix last sector write on sd cardDr. David Alan Gilbert2011-07-291-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When writing the last sector of an SD card using WRITE_MULTIPLE_BLOCK QEmu throws an error saying that we've run off the end, and leaves itself in the wrong state. Tested on ARM Vexpress model. Signed-off-by: Dr. David Alan Gilbert <david.gilbert@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | showing a splash picture when startwayne2011-07-291-1/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added options to let qemu transfer two configuration files to bios: "bootsplash.bmp" and "etc/boot-menu-wait", which could be specified by command -boot splash=P,splash-time=T P is jpg/bmp file name or an absolute path, T have a max value of 0xffff, unit is ms. With these two options, if user invoke qemu with menu=on option, then a splash picture would be showed in a given time. For example: qemu -boot menu=on,splash=/root/boot.bmp,splash-time=5000 would make boot.bmp shown as a brand with 5 seconds in the booting up process. This feature need the new seabios's support, which could be got from git. Signed-off-by: Wayne Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | usb-ohci: convert to MemoryRegionAvi Kivity2011-07-291-25/+17
| | | | | | | | | | | | | | | | | | Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | sysbus: add MemoryRegion based memory management APIAvi Kivity2011-07-292-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Allow registering sysbus device memory using a MemoryRegion. Once all users are converted, sysbus_init_mmio() and sysbus_init_mmio_cb() will be removed. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | pci: add MemoryRegion based BAR management APIAvi Kivity2011-07-292-8/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | Allow registering a BAR using a MemoryRegion. Once all users are converted, pci_register_bar() and pci_register_bar_simple() will be removed. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | pci: pass address space to pci bus when createdAvi Kivity2011-07-2922-35/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is now done sloppily, via get_system_memory(). Eventually callers will be converted to stop using that. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | pc: move global memory map out of pc_init1() and into its callersAvi Kivity2011-07-291-7/+8
| | | | | | | | | | | | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | pc: convert pc_memory_init() to memory APIAvi Kivity2011-07-292-19/+41
| | | | | | | | | | | | | | | | | | Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | pc: grab system_memoryAvi Kivity2011-07-293-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | While eventually this should come from the machine initialization function, take a short cut to avoid converting all machines now. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | qdev: Reset hot-plugged devicesJan Kiszka2011-07-291-0/+3
| |/ |/| | | | | | | | | | | | | | | Device models rely on the core invoking their reset handlers after init. We do this in the cold-plug case, but so far we miss this step after hot-plug. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | Fix chrdev return value conversionBlue Swirl2011-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | 6e1db57b2ac9025c2443c665a0d9e78748637b26 didn't convert brlapi or win32 chrdevs, breaking build for those. Fix by converting the chrdevs. Acked-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | Correct spelling of licensedMatthew Fernandez2011-07-2361-61/+61
| | | | | | | | | | | | | | | | | | Correct typos of "licenced" to "licensed". Reviewed-by: Stefan Weil <weil@mail.berlios.de> Reviewed-by: Andreas F=E4rber <andreas.faerber@web.de> Signed-off-by: Matthew Fernandez <matthew.fernandez@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | mc146818rtc: Handle host clock resetsJan Kiszka2011-07-231-0/+20
| | | | | | | | | | | | | | | | | | Make use of the new clock reset notifier to update the RTC whenever rtc_clock is the host clock and that happens to jump backward. This avoids that the RTC stalls for the period the host clock was set back. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | notifier: Pass data argument to callbackJan Kiszka2011-07-232-2/+2
| | | | | | | | | | | | | | | | | | | | | | This allows to pass additional information to the notifier callback which is useful if sender and receiver do not share any other distinct data structure. Will be used first for the clock reset notifier. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | ide: Turn properties any IDE device must have into bus propertiesMarkus Armbruster2011-07-231-1/+4
| | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | virtio-serial: Turn props any virtio-serial-bus device must have into bus propsMarkus Armbruster2011-07-232-4/+5
| | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud