Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jul 2005 20:22:28 -0400
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        freebsd-emulation@FreeBSD.org
Cc:        qemu-devel@nongnu.org, Juergen Lock <nox@jelal.kn-bremen.de>, "Mars G. Miro" <marsgmiro@gmail.com>
Subject:   Re: ata devices on emulated amd64 on qemu
Message-ID:  <200507292022.38135.jkim@FreeBSD.org>
In-Reply-To: <200507291647.49230.jkim@niksun.com>
References:  <28edec3c0507290000415a350d@mail.gmail.com> <200507291540.52889.jkim@niksun.com> <200507291647.49230.jkim@niksun.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507292022.38135.jkim>