From owner-freebsd-emulation@FreeBSD.ORG Sat Jul 30 00:22:59 2005 Return-Path: X-Original-To: freebsd-emulation@FreeBSD.org Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 84D2716A41F for ; Sat, 30 Jul 2005 00:22:59 +0000 (GMT) (envelope-from jkim@FreeBSD.org) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E88443D45 for ; Sat, 30 Jul 2005 00:22:55 +0000 (GMT) (envelope-from jkim@FreeBSD.org) Received: from niksun.com (anuket [10.70.0.5]) by anuket.mj.niksun.com (8.13.1/8.13.1) with ESMTP id j6U0PNsE061011; Fri, 29 Jul 2005 20:25:23 -0400 (EDT) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-emulation@FreeBSD.org Date: Fri, 29 Jul 2005 20:22:28 -0400 User-Agent: KMail/1.6.2 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> X-Virus-Scanned: ClamAV 0.85.1/997/Fri Jul 29 04:07:29 2005 on anuket.mj.niksun.com X-Virus-Status: Clean Cc: qemu-devel@nongnu.org, Juergen Lock , "Mars G. Miro" Subject: Re: ata devices on emulated amd64 on qemu X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2005 00:22:59 -0000 --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--