Re: Playing with SATA NCQ

Jeff Garzik
2005-05-29T17:30:15Z

On Sun, May 29, 2005 at 07:23:52PM +0200, Erik Slagter wrote:
> On Sun, 2005-05-29 at 12:59 -0400, Jeff Garzik wrote:
> > > My question was if there is a fundamental reason why the AHCI mode of
> > > the ICH6/7 must be enabled by the BIOS, is there a reason why the kernel
> > > doesn't do it, or can't do it?
> >
> > The BIOS sets up PCI resources necessary to use AHCI mode.
>
> Ok. So there's absolutely no way to do that afterwards? It'd really be a
> pity :-(

It is technically possible. BIOS is just software, just like the OS.

It's just a huge pain in the butt, because the kernel might accidentally
stomp on some resources the BIOS secretly set up, or somesuch.

> On the same subject: is there a reason why ICH6 gets "BAR0-3 ignored"
> and always gets the legacy i/o ports and IRQ's assigned? I'd say there
> is absolutely no need to be compatible in this way, the PCI code can
> assign the IRQ and I/O ports as with any other PCI device?

IDE is special.

This is due to how the BIOS sets up an IDE PCI device in legacy mode.
BAR0-3 are set to zero, which is a signal to the OS that the IDE PCI
device is in legacy mode (io 0x1f0+0x170, irq 14+15). Since the IDE I/O
ports are in ISA space not PCI space, the PCI BARs reflect nothing.

Jeff