grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PCI support


From: Marco Gerards
Subject: Re: PCI support
Date: Tue, 29 Jan 2008 09:40:12 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Robert Millan <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]