[SOLVED] PCI : IRQ lines for PCI devices / BAR sizes
Posted: Tue Apr 01, 2014 1:42 pm
Hi,
Two questions about PCI devices:
1. Is it possible to change the IRQ numbers assigned to PCI devices by the BIOS? Is it as simple
as writing a proper value to the proper PCI config space register (just like with BARs), or is there more to it?
I am working in legacy PIC mode, so my question is about the interrupts as seen by the PIC.
I've found conflicting information about this, so maybe someone has relevant experience? Please
note I don't much care about obscure legacy 486/586 or Pentium II/III class systems anyway, since
my kernel targets newer "P4 class and up" CPUs anyway due to the use of SSE2 instructions and NX bit.
EDIT: before someone points it out, I have read the Wiki where it says that this field is writable, but
i did find contrary information elsewhere, hence my question about Your experience with this.
2. Since I am working in legacy PIC mode, why am I seeing IRQ numbers like 255 or other high values (67? 145?)?
Obviously that happens on real hardware only, and most devices have reasonable values, but a few (2-3) do not.
Just to point out, these are pci-ex devices, and my PCI driver is not pci-ex aware yet. But afaik theese should
behave like normal PCI devices.
EDIT: And now this one is a beauty, and I can't find anything about it anywhere.
3. Can a device with a 64bit memory BAR map more than 4GB? In other words,
can a memory range indicated by a 64bit BAR be LARGER than 4GB? It would
seem absurd that a device might want that much address space, but then
I can imagine a graphics card with 8GB dedicated ram, or a Tesla with
even more. Or would that have to be split into separate ranges?
Thanks for any insight.
Cheers,
Theesem
Two questions about PCI devices:
1. Is it possible to change the IRQ numbers assigned to PCI devices by the BIOS? Is it as simple
as writing a proper value to the proper PCI config space register (just like with BARs), or is there more to it?
I am working in legacy PIC mode, so my question is about the interrupts as seen by the PIC.
I've found conflicting information about this, so maybe someone has relevant experience? Please
note I don't much care about obscure legacy 486/586 or Pentium II/III class systems anyway, since
my kernel targets newer "P4 class and up" CPUs anyway due to the use of SSE2 instructions and NX bit.
EDIT: before someone points it out, I have read the Wiki where it says that this field is writable, but
i did find contrary information elsewhere, hence my question about Your experience with this.
2. Since I am working in legacy PIC mode, why am I seeing IRQ numbers like 255 or other high values (67? 145?)?
Obviously that happens on real hardware only, and most devices have reasonable values, but a few (2-3) do not.
Just to point out, these are pci-ex devices, and my PCI driver is not pci-ex aware yet. But afaik theese should
behave like normal PCI devices.
EDIT: And now this one is a beauty, and I can't find anything about it anywhere.
3. Can a device with a 64bit memory BAR map more than 4GB? In other words,
can a memory range indicated by a 64bit BAR be LARGER than 4GB? It would
seem absurd that a device might want that much address space, but then
I can imagine a graphics card with 8GB dedicated ram, or a Tesla with
even more. Or would that have to be split into separate ranges?
Thanks for any insight.
Cheers,
Theesem