All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: PCI support
Date: Mon, 28 Jan 2008 20:08:50 +0100	[thread overview]
Message-ID: <20080128190850.GA22021@thorin> (raw)
In-Reply-To: <87hcgxn6m6.fsf@xs4all.nl>

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?

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)



  reply	other threads:[~2008-01-28 19:10 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-28 14:03 PCI support Marco Gerards
2008-01-28 17:25 ` Robert Millan
2008-01-28 18:32   ` Marco Gerards
2008-01-28 19:08     ` Robert Millan [this message]
2008-01-29  8:40       ` Marco Gerards
2008-01-30 17:57 ` Marco Gerards
2008-01-30 18:44   ` Robert Millan
2008-01-30 20:08     ` Marco Gerards
2008-01-30 22:01       ` Robert Millan
2008-01-30 22:17         ` Marco Gerards
2008-01-30 22:25           ` Robert Millan
2008-01-31  8:51             ` Marco Gerards
2008-01-31 11:05               ` Robert Millan
2008-02-02 15:39                 ` Marco Gerards
2008-01-30 19:40   ` Yoshinori K. Okuji
2008-01-30 20:07     ` Marco Gerards
  -- strict thread matches above, loose matches on Subject: below --
2006-05-06 13:36 pci support vincent guffens
2006-05-06 14:08 ` Vesa Jääskeläinen
2006-05-06 14:46 ` Marco Gerards
2006-05-06 15:12   ` vincent guffens
2006-05-06 16:12     ` Marco Gerards
2006-05-06 16:25       ` vincent guffens
2006-05-06 17:07         ` Marco Gerards
2001-10-12 18:38 PCI support Kevin Fry
2001-10-12 19:09 ` Dan Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080128190850.GA22021@thorin \
    --to=rmh@aybabtu.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.