summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* [sh4] MMU bug fixaurel322008-08-221-0/+4
| | | | | | | | | | | | | | | | | Some bugs on SH4 MMU are fixed. - When a TLB entry is overwritten or invalidated, tlb_flush_page() should be invoked to invalidate old entry. - When a ASID is changed, tlb_flush() should be invoke to invalidate entries which have old ASID. - The check for shared bit in TLB entry causes multiple TLB hit exception. As SH3's MMU, shared bit is ignored. - ASID is used when MMUCR's SV bit or SR's MD bit is zero. No need to check both bits are zero. (Shin-ichiro KAWASAKI) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5068 c046a42c-6fe2-441c-8c8c-71466251a162
* [sh4] memory mapped TLB entriesaurel322008-08-221-0/+110
| | | | | | | | | | | SH4 MMU's memory mapped TLB feature is implemented. SH-Linux seems to write to memory mapped TLB to invalidate a TLB entry, but does not to read it. So only memory write feature is implemented. Work on memory read feature is left. (Shin-ichiro KAWASAKI) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5067 c046a42c-6fe2-441c-8c8c-71466251a162
* array overflow in hw/stellaris.c and hw/omap_dss.caurel322008-08-222-3/+4
| | | | | | (Jindrich Makovicka) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5064 c046a42c-6fe2-441c-8c8c-71466251a162
* Parallel Port Direction Fixaurel322008-08-221-0/+12
| | | | | | | | | | | | | | | | | | | The direction bit in the control register should not be directly set using PPWCONTROL. The kernel gives the following debug message. parport0 (ppdev0): use data_reverse for this! More over setting the data pins to forward mode does not work, perhaps a bug in the Linux PP driver. The right way to do this is to use PPDATADIR to set the direction. The patch checks if the user is toggling the direction bit, and invokes PPDATADIR to do the job. Signed-off-by: Vijay Kumar B <vijaykumar@bravegnu.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5063 c046a42c-6fe2-441c-8c8c-71466251a162
* PC: suggest a workaround to boot a kernel without hard-diskaurel322008-08-211-1/+1
| | | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5061 c046a42c-6fe2-441c-8c8c-71466251a162
* Ignore IDE command if issued while IDE is busy (Gleb Natapov)aliguori2008-08-211-0/+26
| | | | | | | | | | | | | | | | Feature, Sector Count, LBA Low/Mid/High and Device registers should be written only when both BSY and DRQ are cleared to zero. Command register shall only be written when BSY and DRQ are set to zero for all commands except DEVICE RESET. Data Port register shall be accessed for host PIO data transfer only when DRQ is set to one. Signed-off-by: Gleb Natapov <gleb@qumranet.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5060 c046a42c-6fe2-441c-8c8c-71466251a162
* Add image format option for USB mass-storage devicesaurel322008-08-211-1/+30
| | | | | | | | (fix CVE-2008-1945) Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5059 c046a42c-6fe2-441c-8c8c-71466251a162
* uhci: fixes for save/load-vm (Max Krasnyansky)aliguori2008-08-211-2/+8
| | | | | | | | | | | | | | | | | | For some reason we were not registering save/load-vm handler for piix3 flavor of UHCI and hence save/load was broken. Async transactions need to be canceled when we save the VM because there is no way we can save/restore all that state. Since we do not mess the original TD/QH the driver will simply resubmit the transfers. Tested with Windows XP-SP2 running under QEMU/KQEMU. Signed-off-by: Max Krasnyansky <maxk@kernel.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5054 c046a42c-6fe2-441c-8c8c-71466251a162
* uhci: rewrite UHCI emulator, fully async operation with multiple outstanding ↵aliguori2008-08-211-364/+533
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | transactions (Max Krasnyansky) This is esentially a re-write of the QEMU UHCI layer. My initial goal was to support fully async operation with multiple outstanding async transactions. Along the way I realized that I can greatly simplify and cleanup the overall logic. There was a lot of duplicate and confusing code in the UHCI data structure parsing and other places. We were actually violating UHCI spec in handling async ISOC transaction (host controller is not supposed to write into the frame pointer). The reason I wanted to support fully async operation is because current synchronous version is unusable with most devices exported from host (via usb-linux.c). Transactions take a long time and the whole VM becomes slow as hell. Current async support is very rudimentory and for the most part non-functional. Single transaction at a time is simply not enough. I have a device for which XP driver submits both IN and OUT packets at the same time. IN packet always times out unless OUT packet makes it to the device. Hence we must be able to process both in order for that device to work. The new code is backwards compatible and was first tested agains original synchronous usb-linux.c and builtin usb devices like tablet which is also synchronous. Rewrite of the usb-linux.c is coming up next. Async support was tested against various XP versions (ie XP, SP2, SP3) and a bunch of different USB devices: serial port controllers, mice, keyboard, JTAG dongles (from Xilinx and Altera). ISOC support was only lighly tested and needs more work. It's not any worse than current code though. UHCI parser changes are probably somewhat hard to review without the understanding of the UHCI spec. The async design should be fairly easy to follow. Basically we have a list of async objects for each pending transfer. Async objects are tagged with the original TD (transfer descriptor) address and token. We now support unlimited number of outstanding isoc and one outstanding bulk/intr/ctrl transfer per QH (queue head). UHCI spec does not have a clear protocol for the cancelation of the trasfer requests. Driver can yank out TDs on any frame boundary. In oder to handle that I added somewhat fancy TD validation logic logic to avoid unnecessary cancelations. Signed-off-by: Max Krasnyansky <maxk@kernel.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5050 c046a42c-6fe2-441c-8c8c-71466251a162
* usb: generic packet handler cleanup and documentation (Max Krasnyansky)aliguori2008-08-212-121/+179
| | | | | | | | | | | | | | A bit better documentation of the USB device API, namely return codes. Rewrite of usb_generic_handle_packet() to make it more reable and easier to follow. Signed-off-by: Max Krasnyansky <maxk@kernel.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5049 c046a42c-6fe2-441c-8c8c-71466251a162
* husb: support for USB host device auto connect (Max Krasnyansky)aliguori2008-08-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QEMU can now automatically grab host USB devices that match the filter. For now I just extended 'host:X.Y' and 'host:VID:PID' syntax to handle wildcards. So for example if you do something like usb_add host:5.* QEMU will automatically grab any non-hub device with host address 5.*. Same with the 'host:PID:*', we grab any device that matches PID. Filtering itself is very generic so we can probably add more elaborate syntax like 'host:BUS.ADDR:VID:PID'. So that we can do 'host:5.*:6000:*'. Anyway, it's implemented using a periodic timer that scans host devices and grabs those that match the filter. Timer is started when the first filter is added. We now keep the list of all host devices that we grabbed to make sure that we do not grab the same device twice. btw It's currently possible to grab the same host device more than once. ie You can just do "usb_add host:1.1" more than once, which of course does not work. So this patch fixes that issue too. Along with auto disconnect patch that I send a minute ago the setup is very seamless now. You can just allocate some usb ports to the VMs and plug/unplug devices at any time. Signed-off-by: Max Krasnyansky <maxk@kernel.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5048 c046a42c-6fe2-441c-8c8c-71466251a162
* husb: support for USB host device auto disconnect (Max Krasnyansky)aliguori2008-08-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | I got really annoyed by the fact that you have to manually do usb_del in the monitor when host device is unplugged and decided to fix it :) Basically we now automatically remove guest USB device when the actual host device is disconnected. At first I've extended set_fd_handlerX() stuff to support checking for exceptions on fds. But unfortunately usbfs code does not wake up user-space process when device is removed, which means we need a timer to periodically check if device is still there. So I removed fd exception stuff and implemented it with the timer. Signed-off-by: Max Krasnyansky <maxk@kernel.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5047 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix OpenBSD linker warningsblueswir12008-08-214-18/+28
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5044 c046a42c-6fe2-441c-8c8c-71466251a162
* De-assert PIC IRQs properly at APIC levelaurel322008-08-213-7/+24
| | | | | | | | | | | | | | | | [ Taking latest isapc changes into account. ] Ensure that PIC-delivered IRQs are properly de-asserted in case the APIC is in EXTINT or FIXED mode (with level-triggering selected) on LINT0. Fixes EFI-BIOS boot issues. This patch also cleans up a bit the interface between PIC and APIC, making apic_local_deliver private again. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5041 c046a42c-6fe2-441c-8c8c-71466251a162
* De-assert ISA PIC IRQs properlyaurel322008-08-211-4/+6
| | | | | | | | | | | | | [ Taking latest isapc changes into account. ] In case the PIC IRQ gets de-asserted on an isapc machine, we also have to reset CPU_INTERRUPT_HARD. This is what older qemu (before the routing-through-APIC changes) used to do as well. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5040 c046a42c-6fe2-441c-8c8c-71466251a162
* Silence vmport unless DEBUG is enabled.aliguori2008-08-191-1/+5
| | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5030 c046a42c-6fe2-441c-8c8c-71466251a162
* ACPI suspend type field is 3 bits longaurel322008-08-191-1/+1
| | | | | | | | | According to ACPI spec table 4-13 suspend type field should be 3 bits long. (Gleb Natapov) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5027 c046a42c-6fe2-441c-8c8c-71466251a162
* i386: fix isapc machineaurel322008-08-192-4/+10
| | | | | | | | | - cirrus vga: enable graphic console - pc: don't use apic for interrupts on ISA machine Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5026 c046a42c-6fe2-441c-8c8c-71466251a162
* APIC: Do not start zero-period timers (Jan Kiszka)aliguori2008-08-181-0/+2
| | | | | | | | | | | | | | The APIC timer must not start when the initial count is (still) zero. This caused occasional stalls when booting secondary CPUs of Linux SMP guests. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5024 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix some warnings that would be generated by gcc -Wmissing-prototypesblueswir12008-08-172-4/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5022 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix warnings that would be generated by gcc -Wstrict-prototypesblueswir12008-08-172-4/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5021 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix g364fb video emulationaurel322008-08-172-17/+15
| | | | | | (Hervé Poussineau) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5016 c046a42c-6fe2-441c-8c8c-71466251a162
* Use C99 initializersaurel322008-08-151-8/+8
| | | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5013 c046a42c-6fe2-441c-8c8c-71466251a162
* Cancel IDE outstanding IO on device reset (Gleb Natapov)aliguori2008-08-151-14/+26
| | | | | | | | | | | | Cancel AIO in IDE layer on device rest in order to be in deterministic state during next boot. Signed-off-by: Gleb Natapov <gleb@qumranet.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5011 c046a42c-6fe2-441c-8c8c-71466251a162
* Allow diskless operation for all mips platforms.ths2008-08-134-20/+25
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5001 c046a42c-6fe2-441c-8c8c-71466251a162
* usb-serial: add support for modem linesaurel322008-08-131-9/+45
| | | | | | | Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4998 c046a42c-6fe2-441c-8c8c-71466251a162
* Allow boot without a drive on Sparc machines (partly extracted from Xen)blueswir12008-08-123-0/+15
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4997 c046a42c-6fe2-441c-8c8c-71466251a162
* Use C99 initializersblueswir12008-08-122-56/+56
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4996 c046a42c-6fe2-441c-8c8c-71466251a162
* serial: Always update iir, even when ier is empty (Samuel Thibault)aliguori2008-08-121-5/+0
| | | | | | | | | | | This fixes installation of Windows XP. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4995 c046a42c-6fe2-441c-8c8c-71466251a162
* IDE SEEK_STAT flagaliguori2008-08-111-20/+20
| | | | | | | | | | | | | | Add SEEK_STAT in all non-error cases except sleep request, since our seek times are virtually 0. Although this flag is deprecated by newer ATA standards, Linux at least checks it for CD drives, and would timeout in some case if we do not set it. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4994 c046a42c-6fe2-441c-8c8c-71466251a162
* Upgrade emulated UART to 16550A (Stefano Stabellini)aliguori2008-08-111-94/+392
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch upgrades the emulated UART to 16550A, the code comes from xen-unstable. The main improvement was introduced with the following patch and subsequent email thread: http://lists.xensource.com/archives/html/xen-devel/2007-12/msg00129.html The changes compared to previous version are: - change clock_gettime to qemu_get_clock - no token bucket anymore; - fixed a small bug handling IRQs; this was the problem that prevented kgdb to work over the serial (thanks to Jason Wessel for the help spotting and reproducing this bug). - many many style fixes; - savevm version number increased; - not including termios.h and sys/ioctl.h anymore, declaring static constants in qemu-char.h instead; 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@4993 c046a42c-6fe2-441c-8c8c-71466251a162
* only check RCTL_EN in e1000_can_receive()aliguori2008-08-061-2/+1
| | | | | | | | | | | | | | e1000_receive() has code to raise a receive overflow interrupt when the receive buffer head and tail match. However, with the present implementation of e1000_can_receive(), this code is unreachable -- and etherboot breaks as a result. 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@4987 c046a42c-6fe2-441c-8c8c-71466251a162
* Add qemu_realloc(), by Gerd Hoffmann.ths2008-08-064-6/+6
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4986 c046a42c-6fe2-441c-8c8c-71466251a162
* Move audio/sys-queue.h => sys-queue.haliguori2008-07-291-1/+1
| | | | | | | | | | This makes it easier to reuse in other parts of QEMU. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4975 c046a42c-6fe2-441c-8c8c-71466251a162
* e1000: use common checksumming codealiguori2008-07-291-14/+6
| | | | | | | | | 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@4972 c046a42c-6fe2-441c-8c8c-71466251a162
* Correct audio api usage in OMAP EAC (spotted by malc).balrog2008-07-291-31/+79
| | | | | | | | This is to improve the usage of audio API thanks to explanation from malc. Functionally may not be better. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4969 c046a42c-6fe2-441c-8c8c-71466251a162
* Fill in WLAN and BT platform data in CAL area as expected by Maemo.balrog2008-07-293-6/+52
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4968 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix load width for slave address in i2c_bus_load (Chris Lalancette).balrog2008-07-291-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4966 c046a42c-6fe2-441c-8c8c-71466251a162
* vmware backdoor interface fix (Chris Lalancette)aliguori2008-07-281-0/+8
| | | | | | | | | | | | | VMWare backdoor interface should work with IN/OUT port ops, but currently only IN is supported. BOCHS bios uses OUT to query UUID. The patch adds OUT support. Signed-off-by: Chris Lalancette <clalance@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4957 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix OMAP GPMC register offsets and SYSCTL 8bit io (Kyungmin Park).balrog2008-07-251-3/+54
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4943 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix 24 bit modeblueswir12008-07-241-4/+19
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4937 c046a42c-6fe2-441c-8c8c-71466251a162
* Add OneNAND Unlock All command (Kyungmin Park).balrog2008-07-231-0/+15
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4930 c046a42c-6fe2-441c-8c8c-71466251a162
* Add T1 and T2 CPUs, add a Sun4v machineblueswir12008-07-222-8/+52
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4923 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix a bad comparison, spotted by Paul Brook.balrog2008-07-222-1/+5
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4922 c046a42c-6fe2-441c-8c8c-71466251a162
* Handle on-chip DMA controllers in one place, convert OMAP DMA to use it.balrog2008-07-216-163/+895
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4920 c046a42c-6fe2-441c-8c8c-71466251a162
* Omap DPLL & APLL locking logic.balrog2008-07-213-17/+121
| | | | | | | Reset I2C fifo on new transfers. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4919 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix debug message address formatsblueswir12008-07-201-8/+15
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4910 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix wrong function names in debug messages (Stefan Weil)blueswir12008-07-201-2/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4909 c046a42c-6fe2-441c-8c8c-71466251a162
* Revert "QEMU keyboard issue with Gujin-2.2" (Avi Kivity).balrog2008-07-191-1/+1
| | | | | | | | | | | This reverts commit r3421, which kills the mouse in SuSE Linux 9.1 (there were other reports of breakage earlier also). Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4905 c046a42c-6fe2-441c-8c8c-71466251a162
* Revert "fix power management timer overflow handling" (Avi Kivity).balrog2008-07-191-1/+0
| | | | | | | | | | | | The fix is bogus, causing sci to be deferred for longer and longer. Noticed by Alex Williamson. Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4904 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud