Re: APIC, changing level/edge interrupt

Tim Hockin
2005-01-01T20:25:00Z

On Sat, Jan 01, 2005 at 04:56:15PM +0100, Pierre Ossman wrote:
> >BIOS should set this up. Maybe ACPI has a way to do this?

> Should doesn't always mean that it actually does ;)

Of course. My point was that if it does not, it's a bug in the BIOS.

> But since BIOS can configure the APIC then the kernel should be able to

Of course, but the kernel has no way to know whether a device should be
edge or level triggered unless you have a driver for that device. And
even if you do, I don't know that there is an API in kernel to say
set_irq_mode(IRQ_EDGE) (though there could be).

> What is the default mode and what does the XT-PIC expect? (it works fine
> with the apic disabled).

I think default is PIC-compatible which is edge by default. I think. I
don;t have the book here.

> ACPI might have some functions to configure the APIC correctly but right
> now the connection between ACPI and drivers is rather weak (non-existant
> for this driver) so that's not really a viable solution when testing.
> Might be a good long term solution though.

I know ACPI can get the information with the _PRS and _CRS methods. The
OSPM core should probably be re-programming the (A)PIC appropriately. Of
course, that depends on the BIOS vendor getting the ACPI correct, too.