Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JJYlD-0002UG-8p for mharc-grub-devel@gnu.org; Mon, 28 Jan 2008 13:31:11 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JJYlA-0002TJ-Qw for grub-devel@gnu.org; Mon, 28 Jan 2008 13:31:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JJYl6-0002SY-D5 for grub-devel@gnu.org; Mon, 28 Jan 2008 13:31:07 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JJYl6-0002SV-Ad for grub-devel@gnu.org; Mon, 28 Jan 2008 13:31:04 -0500 Received: from smtp-vbr14.xs4all.nl ([194.109.24.34]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JJYl5-0008NY-U8 for grub-devel@gnu.org; Mon, 28 Jan 2008 13:31:04 -0500 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr14.xs4all.nl (8.13.8/8.13.8) with ESMTP id m0SIV2om054800 for ; Mon, 28 Jan 2008 19:31:02 +0100 (CET) (envelope-from mgerards@xs4all.nl) From: Marco Gerards To: The development of GRUB 2 References: <87prvmm4i2.fsf@xs4all.nl> <20080128172546.GA17624@thorin> Mail-Copies-To: mgerards@xs4all.nl Date: Mon, 28 Jan 2008 19:32:33 +0100 In-Reply-To: <20080128172546.GA17624@thorin> (Robert Millan's message of "Mon, 28 Jan 2008 18:25:46 +0100") Message-ID: <87hcgxn6m6.fsf@xs4all.nl> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 Subject: Re: PCI support X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jan 2008 18:31:09 -0000 Robert Millan writes: > On Mon, Jan 28, 2008 at 03:03:33PM +0100, Marco Gerards wrote: >> >> I wanted to wait with this patch until the ATA driver is adapted. But >> I won't have time for that this week. So I can better get this >> committed and people working on this ;-). There is some code for ATA, >> but it was not tested yet. The main problem here is qemu. >> >> Does someone know if it is possible, at all, to have ATA devices >> showing up as non-legacy PCI devices in Qemu? IDE interfaces are >> placed (and locked) in Legacy mode, meaning default IRQs and IO ports >> are used. This means just our old ISA code will be used. To support >> non-legacy modes, it would be nice if I could do some testing. Does >> someone have suggestions? > > Try: > > --- qemu-0.9.0+20070816/hw/pc.c~ 2007-06-06 18:26:13.000000000 +0200 > +++ qemu-0.9.0+20070816/hw/pc.c 2008-01-28 18:25:00.000000000 +0100 > @@ -676,6 +676,8 @@ > qemu_irq *cpu_irq; > qemu_irq *i8259; > > + pci_enabled = 1; > + > linux_boot = (kernel_filename != NULL); > > /* init CPUs */ The problem isn't that PCI isn't enabled. The problem is that IDE devices are in legacy mode... So you do see the IDE interface using lspci. One bit can be used to check if the device is in legacy mode or not. If it indicates legacy mode, you have to use some fixed ports that are already present in ata.c. Otherwise, you can query the port ranges from the PCI device. Qemu only supports the latter mode, as it seems. -- Marco