summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* ETRAX-FS: Don't schedule DMA processing without active channels.edgar_igl2008-11-131-14/+27
| | | | | | | | | | Avoid scheduling DMA processing when all channels are stopped or at end-of-list. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5720 c046a42c-6fe2-441c-8c8c-71466251a162
* ETRAX-FS: Fix a segfault if pflash drive not found.edgar_igl2008-11-131-1/+1
| | | | | | | | | | | drive_get_index() returns -1 if a drive isn't found; don't use -1 to index drives_table. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5719 c046a42c-6fe2-441c-8c8c-71466251a162
* Don't use "hz" in identifiers to make AIX happy.balrog2008-11-125-15/+15
| | | | | | | | malc found AIX headers leak "hz" and so it can't be used there. Change the occurences in hw/. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5709 c046a42c-6fe2-441c-8c8c-71466251a162
* Implement LSI53C895A quirks exposed by OpenServer (Justin Chevrier).balrog2008-11-121-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After going through the debug log and scratching my head for quite some time. I found the following: The problem was with this block move: lsi_scsi: SCRIPTS dsp=0fae8e50 opcode 01000028 arg 00f63c40 lsi_scsi: DMA addr=0x00f63c40 len=36 The number of bytes to be transferred (len) should be 40 which corresponds to the block transfer of length 0x28 (from opcode 01000028). Instead we have a length of 36 (0x24). The code responsible for this is (in 'lsi_do_dma'): if (count > s->current_dma_len) count = s->current_dma_len; Basically we're overwriting the length 40 with the value 36 which I think we just left over in that variable from an earlier transfer. In my patch below I initialize s->current_dma_len to s->dbc before we begin the DMA transfer during Data In phase. The attached patch gets Openserver 5.0.5 past the hardware detection (and it lists the hard drive to boot, woohoo). It appears to stop a little while later (doesn't seem SCSI related), but it's been so long since I've booted Openserver I'm not sure what's supposted to happen after the HW detection using the boot/root disks. Props go to Craig Ringer for the initial post and the code that he posted some of which is in this patch. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5706 c046a42c-6fe2-441c-8c8c-71466251a162
* fix some variable initizalization issues (Stefano Stabellini)aliguori2008-11-121-1/+1
| | | | | | | | | | | this patch fixes two variable initialization issues. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5705 c046a42c-6fe2-441c-8c8c-71466251a162
* windows cdrom cache flush (Stefano Stabellini)aliguori2008-11-111-1/+27
| | | | | | | | | | | | | | | | | Windows only flushes its cache of a CDROM if it gets a SENSE_UNIT_ATTENTION CHECK_CONDITION response to a REQUEST_SENSE command. Make sure it does so after we change the CD. Tab damage fixed by Anthony Liguori Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Steven Smith <steven.smith@citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5698 c046a42c-6fe2-441c-8c8c-71466251a162
* Reintroduce migrate-to-exec: support (Charles Duffy)aliguori2008-11-111-0/+2
| | | | | | | | | | | | | | | | | | | KVM's live migration support included support for exec: URLs, allowing system state to be written or received via an arbitrary popen()ed subprocess. This provides a convenient way to pipe state through a compression algorithm or an arbitrary network transport on its way to its destination, and a convenient way to write state to disk; libvirt's qemu driver currently uses migration to exec: targets for this latter purpose. This version of the patch refactors now-common code from migrate-tcp.c into migrate.c. Signed-off-by: Charles Duffy <Charles_Duffy@messageone.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5694 c046a42c-6fe2-441c-8c8c-71466251a162
* target-alpha: fix syscall error checkaurel322008-11-111-1/+1
| | | | | | | | (re-add commit 5689) Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5692 c046a42c-6fe2-441c-8c8c-71466251a162
* Revert commits 5685 to 5688 committed by mistakeaurel322008-11-111-1/+1
| | | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5691 c046a42c-6fe2-441c-8c8c-71466251a162
* target-alpha: fix syscall error checkaurel322008-11-111-1/+1
| | | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5689 c046a42c-6fe2-441c-8c8c-71466251a162
* Document bluetooth support in qemu-doc.balrog2008-11-091-0/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5654 c046a42c-6fe2-441c-8c8c-71466251a162
* Add qemu_strndup: qemu_strdup with length limit.balrog2008-11-091-4/+4
| | | | | | | | Also optimise qemu_strdup by using memcpy - using pstrcpy is usually suboptimal. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5653 c046a42c-6fe2-441c-8c8c-71466251a162
* Revert r5532, r5536 and a piece of r5531.balrog2008-11-081-5/+5
| | | | | | | | The use of strncat and strndup was correct, pstrcpy and pstrdup wasn't. I'll try to restore building on non-gnu OSes in a later commit. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5651 c046a42c-6fe2-441c-8c8c-71466251a162
* Use an option rom instead of boot sector for -kernelaliguori2008-11-081-22/+50
| | | | | | | | | | | | | | | Generate an option rom instead of using a hijacked boot sector for kernel booting. This just requires adding a small option ROM header and a few more instructions to the boot sector to take over the int19 vector and run our boot code. A disk is no longer needed when using -kernel on x86. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5650 c046a42c-6fe2-441c-8c8c-71466251a162
* Use the right format string to printf sector num with DEBUG_IDE.balrog2008-11-071-2/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5647 c046a42c-6fe2-441c-8c8c-71466251a162
* SM501 emulation for R2D-SH4blueswir12008-11-054-2/+1246
| | | | | | | | | | | | This patch adds minimum emulation of SM501 multifunction device, whose main feature is 2D graphics. It is one of the peripheral of R2D, the SH4 evaluation board. We can see TUX printed on the QEMU console. Signed-off-by: Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5632 c046a42c-6fe2-441c-8c8c-71466251a162
* Use qemu_ram_allocblueswir12008-11-052-20/+31
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5630 c046a42c-6fe2-441c-8c8c-71466251a162
* Add KVM support to QEMUaliguori2008-11-051-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds very basic KVM support. KVM is a kernel module for Linux that allows userspace programs to make use of hardware virtualization support. It current supports x86 hardware virtualization using Intel VT-x or AMD-V. It also supports IA64 VT-i, PPC 440, and S390. This patch only implements the bare minimum support to get a guest booting. It has very little impact the rest of QEMU and attempts to integrate nicely with the rest of QEMU. Even though this implementation is basic, it is significantly faster than TCG. Booting and shutting down a Linux guest: w/TCG: 1:32.36 elapsed 84% CPU w/KVM: 0:31.14 elapsed 59% CPU Right now, KVM is disabled by default and must be explicitly enabled with -enable-kvm. We can enable it by default later when we have had better testing. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5627 c046a42c-6fe2-441c-8c8c-71466251a162
* ETRAX-FS: Make etraxfs_dmac_run local.edgar_igl2008-11-042-2/+1
| | | | | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5624 c046a42c-6fe2-441c-8c8c-71466251a162
* ETRAX-FS: Fix DMA warnings.edgar_igl2008-11-041-8/+11
| | | | | | | Signed-off-by: Jan Kiszka <jan.kiszka@web.de> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5621 c046a42c-6fe2-441c-8c8c-71466251a162
* tc6393xb: non-accelerated FB support (Dmitry Baryshkov).balrog2008-11-044-8/+207
| | | | | | | | Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5617 c046a42c-6fe2-441c-8c8c-71466251a162
* Tosa: dummy lcd support (Dmitry Baryshkov).balrog2008-11-041-0/+84
| | | | | | | | Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5616 c046a42c-6fe2-441c-8c8c-71466251a162
* scoop: GPRR reports the state of GPIO lines (Dmitry Baryshkov).balrog2008-11-041-9/+6
| | | | | | | | Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5615 c046a42c-6fe2-441c-8c8c-71466251a162
* Tosa: disable pxafb as it's not used on tosa (Dmitry Baryshkov).balrog2008-11-041-1/+1
| | | | | | | | Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5614 c046a42c-6fe2-441c-8c8c-71466251a162
* Tosa: provide correct IRQ to tc6393xb init (Dmitry Baryshkov).balrog2008-11-041-1/+2
| | | | | | | | Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5613 c046a42c-6fe2-441c-8c8c-71466251a162
* Tosa: emulate LEDs (Dmitry Baryshkov).balrog2008-11-041-1/+34
| | | | | | | | Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5612 c046a42c-6fe2-441c-8c8c-71466251a162
* tc6393xb: initial support for nand control (Dmitry Baryshkov).balrog2008-11-041-23/+221
| | | | | | | | Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5611 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix RGBT 5:5:5 drawing on pxa2xx lcd (Lars Munch)balrog2008-11-031-0/+1
| | | | | | | | | | This patch fixes the misinterpretaion of the transparency bit for RGBT 5:5:5 mode on pxa2xx LCDC. Signed-off-by: Lars Munch <lars@segv.dk> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5605 c046a42c-6fe2-441c-8c8c-71466251a162
* More realistic max_cpusblueswir12008-11-022-15/+8
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5604 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix loading of unstripped ELF PROM imageblueswir12008-11-021-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5603 c046a42c-6fe2-441c-8c8c-71466251a162
* Halt the CPU using a qemu_irqblueswir12008-11-023-7/+15
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5601 c046a42c-6fe2-441c-8c8c-71466251a162
* CVE-2008-4539: fix a heap overflow in Cirrus emulationaurel322008-11-011-4/+3
| | | | | | | | | | | | The code in hw/cirrus_vga.c has changed a lot between CVE-2007-1320 has been announced and the patch has been applied. As a consequence it has wrongly applied and QEMU is still vulnerable to this bug if using VNC. (noticed by Jan Niehusmann) Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5587 c046a42c-6fe2-441c-8c8c-71466251a162
* Malta & OMAP: add a name to char devicesaurel322008-11-013-5/+5
| | | | | | | | (fixes regression introduced by r5575) Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5585 c046a42c-6fe2-441c-8c8c-71466251a162
* Implement "info chardev" command. (Gerd Hoffmann)aliguori2008-10-311-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes qemu keep track of the character devices in use and implements a "info chardev" monitor command to print a list. qemu_chr_open() sticks the devices into a linked list now. It got a new argument (label), so there is a name for each device. It also assigns a filename to each character device. By default it just copyes the filename passed in. Individual drivers can fill in something else though. qemu_chr_open_pty() sets the filename to name of the pseudo tty allocated. Output looks like this: (qemu) info chardev monitor: filename=unix:/tmp/run.sh-26827/monitor,server,nowait serial0: filename=unix:/tmp/run.sh-26827/console,server serial1: filename=pty:/dev/pts/5 parallel0: filename=vc:640x480 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5575 c046a42c-6fe2-441c-8c8c-71466251a162
* Make DMA bottom-half driven (v2)aliguori2008-10-318-24/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current DMA routines are driven by a call in main_loop_wait() after every select. This patch converts the DMA code to be driven by a constantly rescheduled bottom half. The advantage of using a scheduled bottom half is that we can stop scheduling the bottom half when there no DMA channels are runnable. This means we can potentially detect this case and sleep longer in the main loop. The only two architectures implementing DMA_run() are cris and i386. For cris, I converted it to a simple repeating bottom half. I've only compile tested this as cris does not seem to work on a 64-bit host. It should be functionally identical to the previous implementation so I expect it to work. For x86, I've made sure to only fire the DMA bottom half if there is a DMA channel that is runnable. The effect of this is that unless you're using sb16 or a floppy disk, the DMA bottom half never fires. You probably should test this malc. My own benchmarks actually show slight improvement by it's possible the change in timing could affect your demos. Since v1, I've changed the code to use a BH instead of a timer. cris at least seems to depend on faster than 10ms polling. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5573 c046a42c-6fe2-441c-8c8c-71466251a162
* Sun4c cleanups (Robert Reif)blueswir12008-10-281-10/+5
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5568 c046a42c-6fe2-441c-8c8c-71466251a162
* Set default max_cpus to one.balrog2008-10-2825-38/+12
| | | | | | | Clean-up machine definitions. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5566 c046a42c-6fe2-441c-8c8c-71466251a162
* ETRAX-FS: Process outgoing DMA channels until EOL.edgar_igl2008-10-271-67/+69
| | | | | | | | | | For outgoing DMA channels, keep processing descriptors until hitting end of list. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5553 c046a42c-6fe2-441c-8c8c-71466251a162
* Move sun4c to its own hwdef (Robert Reif)blueswir12008-10-271-239/+241
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5549 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix undeclared symbol warnings from sparseblueswir12008-10-2622-35/+50
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5539 c046a42c-6fe2-441c-8c8c-71466251a162
* Change freeing method because the allocation function was changed in r5532blueswir12008-10-251-3/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5536 c046a42c-6fe2-441c-8c8c-71466251a162
* Replace uses of strndup (a GNU extension) with Qemu pstrdupblueswir12008-10-251-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5532 c046a42c-6fe2-441c-8c8c-71466251a162
* Replace uses of strncpy (a GNU extension) with Qemu pstrcpyblueswir12008-10-251-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5531 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix a bad memcpy length (Bruce Rogers).balrog2008-10-251-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5528 c046a42c-6fe2-441c-8c8c-71466251a162
* Live migration for Win32 (Hervé Poussineau)aliguori2008-10-241-1/+1
| | | | | | | | | | | | | This patch fixes migration so that it works on Win32. This requires using socket specific calls since sockets cannot be treated like file descriptors on win32. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5525 c046a42c-6fe2-441c-8c8c-71466251a162
* hw/pc: don't register the memory hole as unassigned twiceaurel322008-10-241-2/+0
| | | | | | | | | | Since revision 5228, we don't register the memory hole (0xa00000 to 0xfffff) anymore. As a consequence, we don't need to register it again as unassigned. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5522 c046a42c-6fe2-441c-8c8c-71466251a162
* ETRAX-FS: Drop DMA polling for ethernet.edgar_igl2008-10-241-46/+4
| | | | | | | | | | | * Drop DMA poll mode. Instead immediately push rx frames straight into the DMA without waiting for DMA_run to poll them of the fifo. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5520 c046a42c-6fe2-441c-8c8c-71466251a162
* ETRAX-FS: Add support for passing kernel command linesedgar_igl2008-10-221-2/+15
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5516 c046a42c-6fe2-441c-8c8c-71466251a162
* ETRAX-FS: Correct booting of elf linux images from ram.edgar_igl2008-10-221-3/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5515 c046a42c-6fe2-441c-8c8c-71466251a162
* scsi-generic: correct error managementaurel322008-10-171-29/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this patch allows to fully use a tape device connected to qemu through the scsi-generic interface. Previous patch introduced tape SCSI commands management, this one improve error case management: - the SCSI controller command completion must be called with the status value, not the sense value. In the case of scsi-generic, the SCSI status is given by the field status of sg_io_hdr_t (the value is left shifted by one regarding status codes defined in /usr/include/scsi/scsi.h) - when a read is aborted due to a mark/EOF/EOD/EOM, the len reported to controller can be 0. LSI controller emulation doesn't know how to manage this. A workaround found is to call the completion routine with SCSI_REASON_DONE just after calling it with SCSI_REASON_DATA with len=0. This patch also manages correctly the block size of the tape device. This patch has been tested with a real tape device "HP C5683A", linux guest (debian etch) and tools like "mt", "tar" and "btape". Windows guest is not better supported than before... Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5497 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud