summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* e1000: Fix multi-descriptor packet checksum offloadStefan Hajnoczi2011-03-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | The PCI/PCI-X Family of Gigabit Ethernet Controllers Software Developer’s Manual states the following about the POPTS field: Provides a number of options which control the handling of this packet. This field is ignored except on the first data descriptor of a packet. The current implementation always loads the field and its checksum offload flags. This patch uses only the first descriptor's POPTS field in order to comply with the specification. When Solaris sends multi-descriptor packets it fills in POPTS for the first descriptor only. Therefore this patch is necessary in order to perform checksum offload correctly for multi-descriptor packets. Reported-by: Daniel Pecka <dpecka@techniservit.cz> Reported-by: Gabriele A. Trombetti <gabriele.trombetti@itb.cnr.it> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Merge branch 'for-anthony' of git://github.com/bonzini/qemuAurelien Jarno2011-03-2160-272/+272
|\ | | | | | | | | | | | | | | | | * 'for-anthony' of git://github.com/bonzini/qemu: remove qemu_get_clock add a generic scaling mechanism for timers change all other clock references to use nanosecond resolution accessors change all rt_clock references to use millisecond resolution accessors add more helper functions with explicit milli/nanosecond resolution
| * change all other clock references to use nanosecond resolution accessorsPaolo Bonzini2011-03-2158-246/+246
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was done with: sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \ $(git grep -l 'qemu_get_clock\>' ) sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \ $(git grep -l 'qemu_new_timer\>' ) after checking that get_clock and new_timer never occur twice on the same line. There were no missed occurrences; however, even if there had been, they would have been caught by the compiler. There was exactly one false positive in qemu_run_timers: - current_time = qemu_get_clock (clock); + current_time = qemu_get_clock_ns (clock); which is of course not in this patch. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * change all rt_clock references to use millisecond resolution accessorsPaolo Bonzini2011-03-214-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was done with: sed -i '/get_clock\>.*rt_clock/s/get_clock\>/get_clock_ms/' \ $(git grep -l 'get_clock\>.*rt_clock' ) sed -i '/new_timer\>.*rt_clock/s/new_timer\>/new_timer_ms/' \ $(git grep -l 'new_timer\>.*rt_clock' ) after checking that get_clock and new_timer never occur twice on the same line. There were no missed occurrences; however, even if there had been, they would have been caught by the compiler. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | Merge branch 'for-anthony' of git://repo.or.cz/qemu/kevinAurelien Jarno2011-03-212-14/+29
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-anthony' of git://repo.or.cz/qemu/kevin: Add qcow2 documentation hw/xen_disk: aio_inflight not released in handling ioreq when nr_segments==0 Improve error handling in do_snapshot_blkdev() Fix ATA SMART and CHECK POWER MODE Don't allow multiwrites against a block device without underlying medium tools: Use real async.c instead of stubs Add error message for loading snapshot without VM state block/qcow: Don't ignore immediate read/write and other failures block/vdi: Don't ignore immediate read/write failures
| * | hw/xen_disk: aio_inflight not released in handling ioreq when nr_segments==0Feiran Zheng2011-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In hw/xen_disk.c, async writing ioreq is leaked when ioreq->req.nr_segments==0, because `aio_inflight` flag is not released properly (skipped by misplaced "break"). Signed-off-by: Feiran Zheng <famcool@gmail.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | Fix ATA SMART and CHECK POWER MODEBrian Wheeler2011-03-151-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes two things: 1) CHECK POWER MODE The error return value wasn't always zero, so it would show up as offline. Error is now explicitly set to zero. 2) SMART The smart values that were returned were invalid and tools like skdump would not recognize that the smart data was actually valid and would dump weird output. The data has been fixed up and raw value support was added. Tools like skdump and palimpsest work as expected. Signed-off-by: Brian Wheeler <bdwheele@indiana.edu> Acked-by: Ryan Harper <ryanh@us.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | | hw/arm_sysctl.c: Add the Versatile Express system registersPeter Maydell2011-03-211-1/+63
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the Versatile Express SYS_CFG registers, which provide a generic means of reading or writing configuration information from various parts of the board. We only implement shutdown and reset. Also make the RESETCTL register RAZ/WI on Versatile Express rather than reset the board. Other system registers are generally the same as Versatile and Realview. This includes a VMState version number bump for arm_sysctl, since we have new register state to preserve. It also adds sys_mci to the VMState while we're bumping the version number (an accidental omission from commit b50ff6f5). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | petalogix_ml605_mmu: remove unused variableBlue Swirl2011-03-191-3/+2
| | | | | | | | | | | | | | | | Remove a write-only variable, spotted by GCC 4.6.0: /src/qemu/hw/petalogix_ml605_mmu.c: In function 'petalogix_ml605_init': /src/qemu/hw/petalogix_ml605_mmu.c:153:11: error: variable 'serial' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | i8254: Fix migration from older versionsJan Kiszka2011-03-191-0/+2
| | | | | | | | | | | | | | | | | | qdev conversion broke migration as the previous version used vmstate instance IDs derived from the iobase. Fix it by registering a legacy alias. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | microblaze: Add PetaLogix ml605 MMU little-endian ref designMichal Simek2011-03-162-0/+306
| | | | | | | | | | | | | | | | Add the first Microblaze little endian platform. Platform uses uart16550, axi ethernet, timer, intc. Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
* | xilinx: Add AXIENET & DMA modelsEdgar E. Iglesias2011-03-163-0/+1446
|/ | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
* always qemu_cpu_kick after unhalting a cpuPaolo Bonzini2011-03-133-4/+12
| | | | | | | | | This ensures env->halt_cond is broadcast, and the loop in qemu_tcg_wait_io_event and qemu_kvm_wait_io_event is exited naturally rather than through a timeout. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* hw/fmopl: Fix buffer access out-of-bounds errorsStefan Weil2011-03-131-1/+5
| | | | | | | | | | | | | | | | | Index 75 is one too large for AR_TABLE[75], DR_TABLE[75]. This error was reported by cppcheck. hw/fmopl.c:600: error: Buffer access out-of-bounds: OPL.AR_TABLE hw/fmopl.c:601: error: Buffer access out-of-bounds: OPL.DR_TABLE Fix this by limiting the access to the allowed range. MultiArcadeMachineEmulator has newer versions of fmopl, but using these requires more efforts. Cc: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: malc <av1474@comtv.ru> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* moving eeprom initializationWilliam Dauchy2011-03-132-41/+41
| | | | | | | | | | | The initialization should not be only on reset but also when initializing the device. It resolves a bug when hot plugging a pci network device: the mac address was always null. Signed-off-by: William Dauchy <wdauchy@gmail.com> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* pc: fix wrong CMOS values for floppy drivesBlue Swirl2011-03-121-1/+1
| | | | | | | | | | | | | Before commit 63ffb564dca94f8bda01ed6d209784104630a4d2, states for floppy drives were calculated in fdc.c:fd_revalidate(). There it is also considered whether a disk is inserted or not. The commit didn't copy the logic completely to pc.c, which caused a regression. Fix by adding the same check also to pc.c. Reported-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Tested-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* microblaze: Fix PetaLogix company nameMichal Simek2011-03-111-1/+1
| | | | | | | trivial fix. Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
* vmstate: move timers to use test instead of versionJuan Quintela2011-03-101-3/+12
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: be able to store/save a pci device from a pointerJuan Quintela2011-03-101-0/+8
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Add a way to send a partial arrayJuan Quintela2011-03-101-0/+9
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: add VMSTATE_STRUCT_VARRAY_UINT32Juan Quintela2011-03-101-0/+10
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: add VMSTATE_INT64_ARRAYJuan Quintela2011-03-101-0/+6
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: add VMSTATE_STRUCT_VARRAY_INT32Juan Quintela2011-03-101-0/+10
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: add UINT32 VARRAYSJuan Quintela2011-03-101-0/+11
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Fix varrays with uint8 indexesJuan Quintela2011-03-101-2/+3
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: add VMSTATE_UINT32_EQUALJuan Quintela2011-03-101-0/+4
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* xilinx-ethlite: Simplify byteswapping to/from bramsEdgar E. Iglesias2011-03-101-15/+2
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
* mainstone: PCMCIA supportDmitry Eremin-Solenikov2011-03-102-2/+34
| | | | | | | | Extend mst_fpga and mainstone with logic to support PCMCIA attachment (IRQs, status regs). Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* mainstone: use gpio 0 for connection of FPGA instead of hooking into PIC ↵Dmitry Eremin-Solenikov2011-03-101-1/+1
| | | | | | | directly Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* pxa2xx_timer: Get rid of .level in PXA2xxTimer0.Andrzej Zaborowski2011-03-101-20/+8
|
* pxa2xx_pic: fixup initialisationAndrzej Zaborowski2011-03-101-2/+1
| | | | This is based on Dmitry Eremin-Solenikov's patch but simplified.
* pxa2xx_timer: separate irq for pxa27x handlingDmitry Eremin-Solenikov2011-03-101-4/+5
| | | | | | | | | | | First, sysbus_init_irq shan't be called on on-stack variables. Indeed, it only stores a passed pointer in qdev and the stored irq is later populated, so we get a nice write-to-stack bug. Second, irq for pxa27x should probably be handled in a more gentler way, as we should check if we have events to raise this irq. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* lm32: EVR32 and uclinux BSPMichael Walle2011-03-071-0/+305
| | | | | | | | | This patch adds support for the following two BSPs: - LM32 EVR32 BSP (as used by RTEMS) - uclinux BSP by Theobroma Systems Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* lm32: support for creating device treeMichael Walle2011-03-071-0/+178
| | | | | | | | This patch adds helper functions to create a ROM, which contains a hardware description of a board. This is used in Theobromas LM32 Linux port. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* lm32: system control modelMichael Walle2011-03-071-0/+161
| | | | | | | | | | | | This patch add support for a system control block. It is supposed to act as helper for the emulated program. E.g. shutting down the VM or printing test results. This model is intended for testing purposes only and doesn't fit to any real hardware. Therefore, it is not added to any board by default. Instead a user has to add it explicitly with the '-device' commandline parameter. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* lm32: uart modelMichael Walle2011-03-071-0/+288
| | | | | | | This patch add support for the LatticeMico32 UART. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* lm32: timer modelMichael Walle2011-03-071-0/+222
| | | | | | | This patch adds support for the LatticeMico32 system timer. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* lm32: pic and juart helper functionsMichael Walle2011-03-071-0/+25
| | | | | | | | This patch adds init functions for the PIC and JTAG UART commonly used in the board initialization. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* lm32: juart modelMichael Walle2011-03-072-0/+161
| | | | | | | | | This patch adds the JTAG UART model. It is accessed through special control registers and opcodes. Therefore the translation uses callbacks to this model. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* lm32: interrupt controller modelMichael Walle2011-03-072-0/+201
| | | | | | | | | This patch adds the interrupt controller of the lm32. Because the PIC is accessed through special control registers and opcodes, there are callbacks from the lm32 translation code to this model. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* target-arm: Integrate secondary CPU reset in arm_bootAdam Lackorzynski2011-03-062-22/+15
| | | | | | | | | Integrate secondary CPU reset into arm_boot, removing it from realview.c. On non-Linux systems secondary CPUs start with the same entry as the boot CPU. Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-arm: Fix soft interrupt in GIC distributorAdam Lackorzynski2011-03-061-2/+2
| | | | | | | | Fix selection of target list filter mode. Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* gt64xxx: remove savevm supportJuan Quintela2011-03-061-21/+0
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* vmstate: remove uninorth savevm codeJuan Quintela2011-03-061-21/+0
| | | | | | | It was migrating the wrong structures, no way it would work Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* vmstate: remove grackle_pci savevm codeJuan Quintela2011-03-061-19/+0
| | | | | | | It was migrating the wrong structures, no way it would work Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* hw/sd.c: fix sd_set_cb() crash when bdrv == NULLAurelien Jarno2011-03-061-2/+2
| | | | | | | | | | sd_set_cb() calls bdrv_is_read_only() and bdrv_is_inserted() even if no block driver is associated with the card reader. This patch fixes the issues by not setting the irq in this case, this fixes ARM versatile crash. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* hw/realview: Wire up the MMC card statusPeter Maydell2011-03-061-3/+26
| | | | | | | | | | Instantiate the three PL061 GPIO modules the realview boards have. Connect the MMC card status outputs of the PL181 MMC controller to both the system registers and the GPIO module which handles internal devices. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* hw/irq: Add qemu_irq_split() so one GPIO output can feed two inputsPeter Maydell2011-03-062-0/+18
| | | | | | | | | | Add a qemu_irq_split() function which allows a board to wire a single GPIO output up to two GPIO inputs. This is needed for realview boards, where the MMC card status is visible both in a system register and via a PL061 GPIO module. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* hw/pl061.c: Implement ARM PL061 as well as Luminary onePeter Maydell2011-03-062-5/+20
| | | | | | | | | ARM's PL061 has a different set of ID registers to the one in the Luminary Stellaris; implement this so that the Linux driver can identify the Realview PBX PL061 correctly. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* hw/arm_sysctl.c: Wire MCI register MMC card status bits to GPIO inputsPeter Maydell2011-03-062-1/+50
| | | | | | | | Implement some GPIO inputs which a board can connect up to set the MMC card status bits in the MCI register. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
OpenPOWER on IntegriCloud