summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* MIPS Magnum: fix memory-mapped i8042aurel322008-12-103-20/+14
| | | | | | | | | | | | | | | | | | | | | | Current implementation of memory-mapped i8042 controller is atm implemented with an interface shift (it_shift) parameter, like most all memory-mapped devices in Qemu. However, this isn't suitable for MIPS Magnum, where i8042 controller is at 0x80005000 up to 0x80005fff. Thomas Bogendoerfer (from #mipslinux) tested the behaviour of a real machine, and found that odd addresses are for status/command register, and even addresses for data register. Attached patch implements this behaviour by replacing the it_shift parameter by a mask one. Incidentally, keyboard now works on OpenBSD 2.3, which accesses i8042 controller at 0x80005060 and 0x80005061. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5962 c046a42c-6fe2-441c-8c8c-71466251a162
* KVM: Coalesced MMIO supportaliguori2008-12-094-0/+16
| | | | | | | | | | | | | | | | | | MMIO exits are more expensive in KVM or Xen than in QEMU because they involve, at least, privilege transitions. However, MMIO write operations can be effectively batched if those writes do not have side effects. Good examples of this include VGA pixel operations when in a planar mode. As it turns out, we can get a nice boost in other areas too. Laurent mentioned a 9.7% performance boost in iperf with the coalesced MMIO changes for the e1000 when he originally posted this work for KVM. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5961 c046a42c-6fe2-441c-8c8c-71466251a162
* Move spitz microdrive to PCMCIA socket 0.balrog2008-12-071-5/+5
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5946 c046a42c-6fe2-441c-8c8c-71466251a162
* MIPS: remove a few warningsaurel322008-12-073-2/+4
| | | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5944 c046a42c-6fe2-441c-8c8c-71466251a162
* Parallel port resetaurel322008-12-071-5/+11
| | | | | | | | | Attached patch adds a reset handler to parallel port, so it gets correct register values after a reset. (Hervé Poussineau) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5942 c046a42c-6fe2-441c-8c8c-71466251a162
* target-ppc: kill a few warningsaurel322008-12-071-0/+2
| | | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5941 c046a42c-6fe2-441c-8c8c-71466251a162
* SH4: SCI improvementaurel322008-12-071-6/+6
| | | | | | | | | | | | | | | This patch simply implement one register of SH4's SCI := Serial Communication Interface. R2D evaluation board uses SCI for SPI connection. So, Linux kernel for R2D with default configuration causes a QEMU assertion failure when it initializes SPI driver. This patch avoids it and reduces the kernel config modification work for QEMU. Completing SCI implementation task is left. Other board support is desirable to confirm this task, which uses SCI for a serial terminal. (Shin-ichiro KAWASAKI) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5939 c046a42c-6fe2-441c-8c8c-71466251a162
* SH4: kill a few warningsaurel322008-12-075-3/+9
| | | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5938 c046a42c-6fe2-441c-8c8c-71466251a162
* SH4: Eliminate P4 to A7 mangling (Takashi YOSHII).balrog2008-12-075-4/+18
| | | | | | | | | | | | | | | | | | | | | Main purpose of this is to delete *physical = address & 0x1fffffff; at target-sh4/helper.c:449, using new mmio rule introduced by #5849 This masking is a nice trick to realize P4/A7 duality of SH registers. But, IMHO, it is logically wrong. Most of SH4 cpu control registers in P4 area(0xfc000000...0xffffffff) have one more address called A7 which is usually P4 address with upper 3bits masked. This is an address only appears in TLB's physical address part. Current code use trick writing drivers as if they are really in A7 (that's why you see many *_A7 in hw/sh*.c), and using translation P4 to A7. Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5935 c046a42c-6fe2-441c-8c8c-71466251a162
* SH: improve the way sh7750 registers io memory (Takashi YOSHII).balrog2008-12-072-55/+41
| | | | | | | | | | | | | | | | | Fixes to be needed for commit #5849 "Change MMIO callbacks..." hw/sh7750.c: - Divide region of CPU control registers to avoid overlapping to peripheral modules. - Delete unused var "icr", which had moved to hw/sh_intc.c. hw/sm501.c: - Merge non page aligned palette registers into the region of control registers. Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5934 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix some new warnings introduced after r5022blueswir12008-12-071-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5933 c046a42c-6fe2-441c-8c8c-71466251a162
* SH: r2d pci support (Takashi YOSHII).balrog2008-12-072-0/+44
| | | | | | | | | | | | | | | | | | | This patch adds pci support to sh/r2d board. This is the first user of PCIC support I formerly sent. PCIC actually is inside of chip with CPU core on SH7751. But, this code is written as if SH7750 and PCIC are on board. I care little about physical device boundary, but fitting with qemu's design. This patch also adds some BSC (Bus State Controller) registers, because PCI device driver software have to accesses them. Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5932 c046a42c-6fe2-441c-8c8c-71466251a162
* SH: Don't subtract bases from access addresses in PCIC.balrog2008-12-071-5/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5928 c046a42c-6fe2-441c-8c8c-71466251a162
* SH: On-chip PCI controller support (Takashi YOSHII).balrog2008-12-071-0/+207
| | | | | | | | | | This patch adds SuperH on-chip PCI controller(PCIC) support. Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5927 c046a42c-6fe2-441c-8c8c-71466251a162
* sh4: Add r2d onboard FPGA IRQ controller (Takashi YOSHII).balrog2008-12-071-5/+63
| | | | | | | | | | This adds IRQ controller in FPGA on r2d, and use it for CF. Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5926 c046a42c-6fe2-441c-8c8c-71466251a162
* sh4: Add IRL (4-bit encoded interrupt input) support (Takashi YOSHII).balrog2008-12-074-1/+59
| | | | | | | | | | | This patch adds IRL(4bit encoded 15 level interrupt input) support to SH using qemu_irq as a multi level (!=on/off) signal. Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5925 c046a42c-6fe2-441c-8c8c-71466251a162
* sh4: mmio based CF support on r2d board (Takashi YOSHII).balrog2008-12-073-0/+101
| | | | | | | | | | | | | This patch adds emulation for a CompactFlash on sh4/r2d board. The device is CF, but wired to be worked as True-IDE mode, and connected directly to SH bus. So, this code is to support generally mmio based IDEs which are supported by "pata_platform" driver in linux kernel. Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5924 c046a42c-6fe2-441c-8c8c-71466251a162
* PXA: Account for offset from page start in a subpage mapping.balrog2008-12-071-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5917 c046a42c-6fe2-441c-8c8c-71466251a162
* omap1: fix uart3 init (Jean-Christophe PLAGNIOL-VILLARD).balrog2008-12-071-1/+1
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5906 c046a42c-6fe2-441c-8c8c-71466251a162
* omap1: add OSC_12M_SEL UART register support (original patch from ↵balrog2008-12-071-10/+17
| | | | | | Jean-Christophe PLAGNIOL-VILLARD) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5905 c046a42c-6fe2-441c-8c8c-71466251a162
* pflash_cfi01: add Single Byte Program (Jean-Christophe PLAGNIOL-VILLARD).balrog2008-12-071-34/+53
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5904 c046a42c-6fe2-441c-8c8c-71466251a162
* SCSI: Handle inquiry commands of varying length (Justin Chevrier).balrog2008-12-071-3/+8
| | | | | | | | | | | | | | | | Openserver 5.0.5 sends an Inquiry command to the emulated SCSI disk expecting a response length of 40 bytes. Currently the response to an Inquiry command is hardcoded to 36 bytes. When receiving a response of length 36 instead of 40 Openserver panics. Modifications to original patch based on feedback from Ryan Harper and Paul Brook. Thanks guys. Signed-off-by: Justin Chevrier <address@hidden> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5903 c046a42c-6fe2-441c-8c8c-71466251a162
* LSI53C895A: Handle empty SCRIPTS opcode (Justin Chevrier)balrog2008-12-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basically after each DMA transfer the Openserver driver would issue an empty (0) SCRIPTS opcode. As the opcode is essentially a NOP it has no second DWORD and therefore the DSP should only be incremented by 4 bytes instead of the 8 bytes we currently do. Here's a snippet of the log: lsi_scsi: Data ready tag=0x100d9 len=16384 ... lsi_scsi: SCRIPTS dsp=068c5e50 opcode 01000400 arg 07a09000 lsi_scsi: DMA addr=0x07a09000 len=1024 lsi_scsi: SCRIPTS dsp=068c5e58 opcode 00000000 arg 01000400 lsi_scsi: Wrong phase got 1 expected 0 Note the 2nd DWORD after the empty opcode; the next opcode in the DMA transfer sequence. As can be expected the address after that has the next DMA address to use. After the attached patch the DMA transfer is able to complete successfully: lsi_scsi: SCRIPTS dsp=068c5e50 opcode 01000400 arg 07a0d000 lsi_scsi: DMA addr=0x07a0d000 len=1024 lsi_scsi: SCRIPTS dsp=068c5e5c opcode 01000400 arg 07a0d400 lsi_scsi: DMA addr=0x07a0d400 len=1024 ... Tested againsted Openserver 5.0.5 and Debian ARM. Signed-off-by: Justin Chevrier <address@hidden> Acked-by: Ryan Harper <ryanh@us.ibm.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5902 c046a42c-6fe2-441c-8c8c-71466251a162
* LSI53C895A: Remove current_dma_len hackbalrog2008-12-071-1/+0
| | | | | | | | | Signed-off-by: Justin Chevrier <address@hidden> Acked-by: Ryan Harper <ryanh@us.ibm.com> Acked-by: Chris Wright <chrisw@sous-sol.org> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5901 c046a42c-6fe2-441c-8c8c-71466251a162
* Remove a duplicate omap_l4_attach(), add one missing elsewhere.balrog2008-12-072-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5900 c046a42c-6fe2-441c-8c8c-71466251a162
* Don't wrap I2C registers addresses on PXA270.balrog2008-12-071-4/+7
| | | | | | | | This way the registers will only be visible at the given offset instead of every 0x100 bytes. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5899 c046a42c-6fe2-441c-8c8c-71466251a162
* ETRAX-FS: Simplify the DMA blocks address registration and decoding.edgar_igl2008-12-071-18/+7
| | | | | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5898 c046a42c-6fe2-441c-8c8c-71466251a162
* ETRAX-FS: No need to decode the address anymore.edgar_igl2008-12-061-2/+2
| | | | | | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5897 c046a42c-6fe2-441c-8c8c-71466251a162
* Revert "hw/apic.c: use fls() from host-utils"aurel322008-12-061-1/+7
| | | | | | | | This reverts commit 5876. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5890 c046a42c-6fe2-441c-8c8c-71466251a162
* Make struct iovec universally availablealiguori2008-12-051-9/+0
| | | | | | | | | | | Vectored IO APIs will require some sort of vector argument. It makes sense to use struct iovec and just define it globally for Windows. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5889 c046a42c-6fe2-441c-8c8c-71466251a162
* Attached patch contains warning fixes.blueswir12008-12-051-0/+2
| | | | | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5888 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix PPC PREP platform, broken by commit 5849aurel322008-12-051-1/+1
| | | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5884 c046a42c-6fe2-441c-8c8c-71466251a162
* hw/ppc4xx_pci.c: kill two warningsaurel322008-12-051-2/+2
| | | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5883 c046a42c-6fe2-441c-8c8c-71466251a162
* do boundary check based on absolute value (Glauber Costa)aliguori2008-12-041-2/+4
| | | | | | | | | | | | | | | | | | | For backward operations, dstpitch and srcpitch can be negative. This leads BLTUNSAFE macro into an overflow, and as a result, it avoids performing operations that are perfectly valid. The visible effect that led to that patch was the gnome-panel bar in Fedora10. Before this patch, you could see garbage clobbering a big portion of the bar. After this patch, this garbage is gone. Signed-off-by: Glauber Costa <glommer@redhat.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5880 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix RTC initial date computationaurel322008-12-043-8/+8
| | | | | | | | | | | qemu_get_clock() returns a structure containing the time the user wants to be set (either UTC time, a local time, or a given date). Use mktimegm() instead of mktime() to convert it into POSIX time without taking the host timezone into account. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5878 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix windows build after virtio changesaliguori2008-12-042-15/+34
| | | | | | | | | | Windows does not have sys/uio.h and does not have err.h. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5877 c046a42c-6fe2-441c-8c8c-71466251a162
* hw/apic.c: use fls() from host-utilsaurel322008-12-041-7/+1
| | | | | | | | ...and fix a bug, the implementation in hw/apic.c was wrong. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5876 c046a42c-6fe2-441c-8c8c-71466251a162
* Add virtio-balloon supportaliguori2008-12-043-0/+241
| | | | | | | | | | | | | | This adds a VirtIO based balloon driver. It uses madvise() to actually balloon the memory when possible. Until 2.6.27, KVM forced memory pinning so we must disable ballooning unless the kernel actually supports it when using KVM. It's always safe when using TCG. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5874 c046a42c-6fe2-441c-8c8c-71466251a162
* Remove TARGET_PAGE_SIZE from virtio interface (Hollis Blanchard)aliguori2008-12-042-3/+19
| | | | | | | | | | | | | | | | TARGET_PAGE_SIZE should only be used internal to qemu, not in guest/host interfaces. The virtio frontend code in Linux uses two constants (PFN shift and vring alignment) for the interface, so update qemu to match. I've tested this with PowerPC KVM and confirmed that it fixes virtio problems when using non-TARGET_PAGE_SIZE pages in the guest. Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5871 c046a42c-6fe2-441c-8c8c-71466251a162
* Add virtio-blk supportaliguori2008-12-043-0/+337
| | | | | | | | | | | | | | Virtio-blk is a paravirtual block device based on VirtIO. It can be used by specifying the if=virtio parameter to the -drive parameter. When using -enable-kvm, it can achieve very good performance compared to IDE or SCSI. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5870 c046a42c-6fe2-441c-8c8c-71466251a162
* Virtio core supportaliguori2008-12-042-0/+968
| | | | | | | | | | | | This patch adds core support for VirtIO. VirtIO is a paravirtualization framework that has been in Linux since 2.6.21. A PCI transport has been available since 2.6.25. Network drivers are also available for Windows. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5869 c046a42c-6fe2-441c-8c8c-71466251a162
* Make audio violate POSIX lessmalc2008-12-0310-15/+15
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5864 c046a42c-6fe2-441c-8c8c-71466251a162
* More consistent PAGE_xxx defines, avoid conflicting with system PAGE_xxxblueswir12008-12-031-7/+7
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5863 c046a42c-6fe2-441c-8c8c-71466251a162
* IBM PowerPC 4xx 32-bit PCI controller emulationaurel322008-12-022-0/+427
| | | | | | | | | | This PCI controller can be found on a number of 4xx SoCs, including the 440EP. Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Acked-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5862 c046a42c-6fe2-441c-8c8c-71466251a162
* Remove address masking after some rearrangingblueswir12008-12-022-99/+142
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5854 c046a42c-6fe2-441c-8c8c-71466251a162
* Remove address maskingblueswir12008-12-0211-43/+45
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5853 c046a42c-6fe2-441c-8c8c-71466251a162
* Change MMIO callbacks to use offsets, not absolute addresses.pbrook2008-12-0180-846/+380
| | | | | | | Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5849 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix ICCS command (Herve Poussineau)blueswir12008-11-301-0/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5818 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix 'enable selection' command (esp_4_ensel.diff)blueswir12008-11-291-0/+1
| | | | | | | | | Indicate success after 'enable selection' command Signed-off-by: Herve Poussineau <hpoussin@reactos.org> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5814 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix command len detection (esp_3_cmdlen.diff)blueswir12008-11-291-4/+4
| | | | | | | | | When command is not DMA, TCMID and TCLO registers are not filled. Use command buffer len instead Signed-off-by: Herve Poussineau <hpoussin@reactos.org> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5813 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud