From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JJlzU-0006uJ-9E for mharc-grub-devel@gnu.org; Tue, 29 Jan 2008 03:38:48 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JJlzR-0006tH-7w for grub-devel@gnu.org; Tue, 29 Jan 2008 03:38:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JJlzP-0006sm-DI for grub-devel@gnu.org; Tue, 29 Jan 2008 03:38:44 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JJlzO-0006sP-2h for grub-devel@gnu.org; Tue, 29 Jan 2008 03:38:42 -0500 Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JJlzN-00049B-Ot for grub-devel@gnu.org; Tue, 29 Jan 2008 03:38:41 -0500 Received: from smtp-vbr8.xs4all.nl ([194.109.24.28]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JJlzN-0003SD-1w for grub-devel@gnu.org; Tue, 29 Jan 2008 03:38:41 -0500 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr8.xs4all.nl (8.13.8/8.13.8) with ESMTP id m0T8cdx5080717 for ; Tue, 29 Jan 2008 09:38:40 +0100 (CET) (envelope-from mgerards@xs4all.nl) From: Marco Gerards To: The development of GRUB 2 References: <87prvmm4i2.fsf@xs4all.nl> <20080128172546.GA17624@thorin> <87hcgxn6m6.fsf@xs4all.nl> <20080128190850.GA22021@thorin> Mail-Copies-To: mgerards@xs4all.nl Date: Tue, 29 Jan 2008 09:40:12 +0100 In-Reply-To: <20080128190850.GA22021@thorin> (Robert Millan's message of "Mon, 28 Jan 2008 20:08:50 +0100") Message-ID: <873ashc9eb.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 mx20.gnu.org: FreeBSD 4.6-4.9 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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: Tue, 29 Jan 2008 08:38:46 -0000 Robert Millan writes: > On Mon, Jan 28, 2008 at 07:32:33PM +0100, Marco Gerards wrote: >> > --- 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. > > You're right. Even when PCI is enabled, you still get the same, although it > doesn't look like it at first glance: > > if (pci_enabled) { > pci_piix3_ide_init(pci_bus, bs_table, piix3_devfn + 1, i8259); > } else { > for(i = 0; i < 2; i++) { > isa_ide_init(ide_iobase[i], ide_iobase2[i], i8259[ide_irq[i]], > bs_table[2 * i], bs_table[2 * i + 1]); > } > } > > I think what you want is to change the hardcoded port numbers in > hw/ide.c:pci_piix3_ide_init(): > > ide_init_ioport(&d->ide_if[0], 0x1f0, 0x3f6); > ide_init_ioport(&d->ide_if[2], 0x170, 0x376); > > could that be it? Perhaps... But it is still in legacy mode I guess... ;-) -- Marco