From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DyfI0-0005WP-ME for qemu-devel@nongnu.org; Fri, 29 Jul 2005 20:33:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DyfHx-0005Uk-Le for qemu-devel@nongnu.org; Fri, 29 Jul 2005 20:33:18 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DyfHx-0005U4-C1 for qemu-devel@nongnu.org; Fri, 29 Jul 2005 20:33:17 -0400 Received: from [65.115.46.162] (helo=anuket.mj.niksun.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DyfJe-0008Tg-Vz for qemu-devel@nongnu.org; Fri, 29 Jul 2005 20:35:03 -0400 From: Jung-uk Kim Date: Fri, 29 Jul 2005 20:22:28 -0400 References: <28edec3c0507290000415a350d@mail.gmail.com> <200507291540.52889.jkim@niksun.com> <200507291647.49230.jkim@niksun.com> In-Reply-To: <200507291647.49230.jkim@niksun.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_Ohs6CUOOEU94CAJ" Message-Id: <200507292022.38135.jkim@FreeBSD.org> Subject: [Qemu-devel] Re: ata devices on emulated amd64 on qemu Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: freebsd-emulation@FreeBSD.org Cc: qemu-devel@nongnu.org, Juergen Lock , "Mars G. Miro" --Boundary-00=_Ohs6CUOOEU94CAJ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Okay. I finally found a fix. It was actually quite simple. Newer FreeBSD and Linux ATA drivers check whether the PCI ATA controller is in legacy ATA mode (aka PATA mode). The test failed and it was treated like a SATA controller. Of course, IRQ failed to map. ;-) Try the attached patch. Tested with FreeBSD/amd64 6.0-BETA1 guest on FreeBSD/amd64 host. Cheers, Jung-uk Kim --Boundary-00=_Ohs6CUOOEU94CAJ Content-Type: text/plain; charset="iso-8859-1"; name="ide.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ide.diff" --- qemu-0.7.1/hw/ide.c.orig Sun Jul 24 14:52:08 2005 +++ qemu-0.7.1/hw/ide.c Fri Jul 29 20:03:51 2005 @@ -2330,6 +2330,7 @@ pci_conf[0x01] = 0x80; pci_conf[0x02] = 0x10; pci_conf[0x03] = 0x70; + pci_conf[0x09] = 0x80; // legacy ATA mode pci_conf[0x0a] = 0x01; // class_sub = PCI_IDE pci_conf[0x0b] = 0x01; // class_base = PCI_mass_storage pci_conf[0x0e] = 0x00; // header_type --Boundary-00=_Ohs6CUOOEU94CAJ--