Commit Graph

107 Commits

Author SHA1 Message Date
aliguori c45ca54ff9 IDE: Return zero when reading error register with slave selected (Justin Chevrier)
During hardware detection Openserver issues commands to slaves on both primary
and secondary ports. We already return a zero for the status register in this
situation but after reading the status register the Openserver installer
proceeds to check the value of the error register. Currently we return the
existing value in the register. This confuses the installer and it tries to
access the slave units later on. When the command that gets issued later gets
ignored the installer freezes. The patch below returns zero when reading the
error register if a slave unit is selected. Openserver can now successfully be
installed using the emulated IDE hard drive.

Return zero when reading error register with slave selected

Signed-off-by: Justin Chevrier <theburner1@yahoo.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6252 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-08 21:03:07 +00:00
blueswir1 5df23f531c Fix IDE debug
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6251 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-08 20:01:26 +00:00
aurel32 0516ede089 cmd646: correctly enable IDE channels
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6232 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-08 16:01:33 +00:00
aliguori fa879c6414 add "serial" parameter to -drive flag (Gleb Natapov)
Windows calculates HW "uniqueness" based on a hard drive serial number
among other things. The patch allows to specify drive serial number
from a command line.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6214 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-07 17:32:33 +00:00
blueswir1 9b64997f46 VM load/save support for PPC devices
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6142 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-30 19:01:19 +00:00
blueswir1 6e6b736313 Register reset handlers
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6136 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-28 18:27:10 +00:00
aurel32 4fbfcd6d53 IDE: Implement SEEK command
Signed-off-by: Justin Chevrier <theburner1@yahoo.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5972 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-10 18:17:06 +00:00
aurel32 b79e175259 SH4: kill a few warnings
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5938 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-07 22:46:42 +00:00
balrog a4a771c055 sh4: mmio based CF support on r2d board (Takashi YOSHII).
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
2008-12-07 18:41:42 +00:00
aliguori f3d54fc494 Abstract out geometry detection code from IDE for reuse
Virtio will want to use the geometry detection code.  It doesn't belong 
in ide.c anyway.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5797 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-25 21:50:24 +00:00
aliguori d5b4eb4016 Fix media detection on emulated CDROM (Gary Grebus)
This patch tweaks the ATAPI CDROM emulation to fix an annoyance seen
when running a variety of Linux guests: the desktop GUI shows a CDROM
device as present, but is unable to automount the media and display its
contents.

The patch adds the PLAY_AUDIO capability bit to the data returned by
MODE_SENSE commands.  That convinces the guest kernel to determine what
kind of media is present.

Arguably Linux could be smarter about this, but it's my guess there are
few (if any) hardware CDROM drives that don't set the bit, and there are
a large number of Linux distros that exhibit this problem.

Signed-off-by: Gary Grebus <ggrebus@virtualiron.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5752 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-19 15:03:36 +00:00
aliguori 9118e7f08f windows cdrom cache flush (Stefano Stabellini)
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
2008-11-11 20:57:30 +00:00
balrog 18c5f8eab1 Use the right format string to printf sector num with DEBUG_IDE.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5647 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-07 23:05:14 +00:00
aliguori 33256a25b3 Fix IDE DIAGNOSE for packet devices (Vincent Sanders)
The DIAGNOSE command in the qemu IDE implementation has an error when
use dfor packet devices. 

The status register value is dependant on the drive being a packet
device or not, this patch corrects the returned status.

From the ATA/PI specification (V6 draft):

"If the device implements the PACKET command feature set, the device
SHALL clear bits 6,5,4,3,2 and 0 in the Status register to zero."

A selection of physical devices have been checked and do conform to
the specifications behaviour.

Signed-off-by: Vincent Sanders <vince@simtec.co.uk>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5452 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-09 14:19:34 +00:00
balrog 5604e090cb Check that asynchronous (DMA) submission succeeds (Ian Jackson).
If it does not, abort the command immediately rather than dropping
it on the floor.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5369 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-01 01:43:16 +00:00
balrog e162cfb07b Actually check read/write errors in IDE (Ian Jackson).
This patch makes the ide emulation actually take notice of
error returns from bdrv_write and bdrv_aio_{read,write}.

(Cherry picked from qemu-xen e0e7a0afe0e324a1f7d64c240f567b15dbe454cf,
 first posted to qemu-devel Wed, 20 Feb 2008 15:26:41 +0000)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5368 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-01 01:13:37 +00:00
aliguori fcdd25ab56 Ignore IDE command if issued while IDE is busy (Gleb Natapov)
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
2008-08-21 22:40:00 +00:00
aliguori 72c7b06cb7 Cancel IDE outstanding IO on device reset (Gleb Natapov)
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
2008-08-15 18:21:58 +00:00
aliguori 41a2b9596c IDE SEEK_STAT flag
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
2008-08-11 18:52:14 +00:00
ths d1b5c20dcd ide: enable single word DMA, by Stefano Stabellini.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4890 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-18 16:49:42 +00:00
ths 8114e9e8fd Fix ATAPI read drive structure command, by Alex Williamson.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4831 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-03 03:57:14 +00:00
pbrook 18be518729 Remove duplicate device index calculations.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4818 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-01 21:31:54 +00:00
balrog 091d055b3e Fix ATAPI GET_CONFIGURATION function (Alexander Graf, Carlo Marcelo Arenas Belon).
The current implementation of GET_CONFIGURATION in the ATAPI stack of qemu
replies a different length depending on the buffer, the data should be
written into.

On the other hand the SCSI spec defines that length information has to be
consistent and independent of return buffer lengths.

This patch makes the ATAPI emulation behave according to the spec and fixes
the Darwin DVD driver.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Kevin Wolf <kwolf@suse.de>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4649 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-02 03:12:06 +00:00
aurel32 5b9a1293be ide: Enable byte&word access to DMA address register
(Jan Kiszka)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4354 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-06 09:55:56 +00:00
aurel32 1d8cde5beb IDE: Improve DMA transfers by increasing the buffer size
(Ian Jackson)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4132 c046a42c-6fe2-441c-8c8c-71466251a162
2008-03-29 12:15:35 +00:00
balrog c717d8bf13 Simplify guess_disk_lchs - should fix Windows stack corruption spotted by TeLeMan (patch by Tristan Gingold).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3953 c046a42c-6fe2-441c-8c8c-71466251a162
2008-02-03 03:37:46 +00:00
balrog 38453b93dd Set READY_STAT after a WIN_DIAGNOSE per ATA-3 (Till Straumann).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3912 c046a42c-6fe2-441c-8c8c-71466251a162
2008-01-14 03:15:20 +00:00
balrog 38cdea7ccf Multi-profile DVD-ROM support (Carlo Marcelo Arenas Belon).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3910 c046a42c-6fe2-441c-8c8c-71466251a162
2008-01-14 03:05:55 +00:00
balrog 33f002714b Add "cache" parameter to "-drive" (Laurent Vivier).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3848 c046a42c-6fe2-441c-8c8c-71466251a162
2007-12-24 14:33:24 +00:00
ths 69b349765c Fix miscellaneous minor things, by Andre Przywara.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3826 c046a42c-6fe2-441c-8c8c-71466251a162
2007-12-17 03:15:52 +00:00
ths 96b8f136f5 Fix bdrv_get_geometry to return uint64_t, by Andre Przywara.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3825 c046a42c-6fe2-441c-8c8c-71466251a162
2007-12-17 01:35:20 +00:00
ths bee8d6842d qemu_put signedness fixes, by Andre Przywara.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3824 c046a42c-6fe2-441c-8c8c-71466251a162
2007-12-16 23:41:11 +00:00
ths 60fe76f386 Fix wrong signedness, by Andre Przywara.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3815 c046a42c-6fe2-441c-8c8c-71466251a162
2007-12-16 03:02:09 +00:00
balrog f5fdd0a855 IDE should send irq after WIN_DIAGNOSE (Tristan Gingold).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3808 c046a42c-6fe2-441c-8c8c-71466251a162
2007-12-11 22:15:29 +00:00
ths 0d4a05a109 Fix Win98SE MyComputer regression, by Ben Taylor.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3783 c046a42c-6fe2-441c-8c8c-71466251a162
2007-12-09 05:01:52 +00:00
pbrook 9596ebb701 Add statics and missing #includes for prototypes.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3683 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-18 01:44:38 +00:00
pbrook 87ecb68bdf Break up vl.h.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-17 17:14:51 +00:00
ths 31c2a146ec Revert "Last AIO Patch" as requested by Fabrice, it is incomplete and
breaks other (non-Windows) systems.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3552 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-08 16:38:17 +00:00
ths 3b46e62427 find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in the regex.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-17 08:09:54 +00:00
ths 5fafdf24ef find -type f | xargs sed -i 's/[\t ]$//g' # on most files
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-16 21:08:06 +00:00
ths c3e88d8c4f Allow more IDE power management, by Ben Guthro.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3165 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-13 12:28:42 +00:00
ths d14049eaec Partial IDE DVD emulation, by Filip Navara.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3161 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-13 02:20:40 +00:00
ths f0c596cb3d Last AIO patch, by Vladimir N. Oleynik.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3147 c046a42c-6fe2-441c-8c8c-71466251a162
2007-08-26 17:42:20 +00:00
ths 7603d1568e Fix bugs in the ATAPI cdrom driver, by Brandon Philips.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3124 c046a42c-6fe2-441c-8c8c-71466251a162
2007-08-19 21:46:53 +00:00
ths aa1f17c18d Spelling fixes, by Stefan Weil.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3066 c046a42c-6fe2-441c-8c8c-71466251a162
2007-07-11 22:48:58 +00:00
ths afcc3cdfc4 Use the correct PCI IDs for Malta.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2945 c046a42c-6fe2-441c-8c8c-71466251a162
2007-06-06 16:26:14 +00:00
balrog aa941b9445 Savevm/loadvm bits for ARM core, the PXA2xx peripherals and Spitz hardware.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2857 c046a42c-6fe2-441c-8c8c-71466251a162
2007-05-24 18:50:09 +00:00
balrog 9e315fa93c PCMCIA addresses are 26-bit, widen the address type from 16 to 32 bits.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2797 c046a42c-6fe2-441c-8c8c-71466251a162
2007-05-09 20:25:36 +00:00
balrog 201a51fc38 PCMCIA bus support. Parts of CF-ATA command set. Hitachi DSCM microdrive emulation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2748 c046a42c-6fe2-441c-8c8c-71466251a162
2007-04-30 00:51:09 +00:00
pbrook d537cf6c86 Unify IRQ handling.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162
2007-04-07 18:14:41 +00:00