i think we need a new thread for the ``intel dual netwokcard problem on epia-m'' topic.
facts (correct me if i am wrong!): * intel dual eth nic is not working with linuxbios (2003-10-24). * it can be plugged into the pci slot (00:14.0) of the epia-m. * the dual nic has a pci-to-pci bridge on the card. * that bridge assignes pci bus 2 (0=internal, 1=vga/agp?) * the 2 nics on the card assign: 02:04.0 and 02:05.0 * linuxbios detects the bus/bridge and also sees the 2 nic. !!* linuxbios does not assign irqs to the nics. * default (2003-10-24) linuxbios src/mainboard/via/epia-m/irq_tables.c: === /* This file was generated by getpir.c, do not modify! (but if you do, please run checkpir on it to verify) Contains the IRQ Routing Table dumped directly from your memory , wich BIOS sets up
Documentation at : http://www.microsoft.com/hwdev/busbios/PCIIRQ.HTM */
#include <arch/pirq_routing.h>
const struct irq_routing_table intel_irq_routing_table = { PIRQ_SIGNATURE, /* u32 signature */ PIRQ_VERSION, /* u16 version */ 32+16*5, /* there can be total 5 devices on the bus */ 0, /* Where the interrupt router lies (bus) */ 0, /* Where the interrupt router lies (dev) */ 0x1c20, /* IRQs devoted exclusively to PCI usage */ 0, /* Vendor */ 0, /* Device */ 0, /* Crap (miniport) */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* u8 rfu[11] */ #if 0 0x58, /* u8 checksum , this hase to set to some value that would give 0 after the sum of all bytes for this st ructu re (including checksum) */ { {0,0xa0, {{0x2, 0xdeb8}, {0x3, 0xdeb8}, {0x4, 0xdeb8}, {0x1, 0xdeb8}}, 0x1, 0}, {0,0x98, {{0x1, 0xdeb8}, {0x2, 0xdeb8}, {0x3, 0xdeb8}, {0x4, 0xdeb8}}, 0x2, 0}, {0,0x50, {{0x4, 0xdeb8}, {0x1, 0xdeb8}, {0x2, 0xdeb8}, {0x3, 0xdeb8}}, 0x3, 0}, {0,0x68, {{0x2, 0xdeb8}, {0x3, 0xdeb8}, {0x4, 0xdeb8}, {0x1, 0xdeb8}}, 0x4, 0}, {0,0x8, {{0x1, 0xdeb8}, {0x2, 0xdeb8}, {0x3, 0xdeb8}, {0x4, 0xdeb8}}, 0, 0}, {0x50,0, {{0, 0}, {0, 0}, {0, 0}, {0, 0}}, 0, 0} } #else 0xac, /* u8 checksum , this hase to set to some value that would give 0 after the sum of all bytes for this st ructu re (including checksum) */ { /* ethernet */ {0,0x90, {{0x3, 0xdeb8}, {0x4, 0xdeb8}, {0x2, 0xdeb8}, {0x1, 0xdeb8}}, 0x1, 0}, /* usb */ {0,0x80, {{0x2, 0xdeb8}, {0x3, 0xdeb8}, {0x4, 0xdeb8}, {0x1, 0xdeb8}}, 0x2, 0}, /* pci */ {0,0xa0, {{0x1, 0xdeb8}, {0x4, 0xdeb8}, {0x3, 0xdeb8}, {0x2, 0xdeb8}}, 0x3, 0}, /* audio */ {0,0x8d, {{0x4, 0xdeb8}, {0x3, 0xdeb8}, {0x2, 0xdeb8}, {0x1, 0xdeb8}}, 0x0, 0}, /* 1394 */ {0,0x68, {{0x4, 0xdeb8}, {0x3, 0xdeb8}, {0x2, 0xdeb8}, {0x1, 0xdeb8}}, 0x3, 0} } #endif }; ===
* if i run util/getpir/getpir (with the dual eth nic board) i get: === /* This file was generated by getpir.c, do not modify! (but if you do, please run checkpir on it to verify) Contains the IRQ Routing Table dumped directly from your memory , wich BIOS sets up
Documentation at : http://www.microsoft.com/hwdev/busbios/PCIIRQ.HTM */
#include <arch/pirq_routing.h>
const struct irq_routing_table intel_irq_routing_table = { PIRQ_SIGNATURE, /* u32 signature */ PIRQ_VERSION, /* u16 version */ 32+16*5, /* there can be total 5 devices on the bus */ 0, /* Where the interrupt router lies (bus) */ 0, /* Where the interrupt router lies (dev) */ 0x1c00, /* IRQs devoted exclusively to PCI usage */ 0, /* Vendor */ 0, /* Device */ 0, /* Crap (miniport) */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* u8 rfu[11] */ 0x78, /* u8 checksum , this hase to set to some value that would give 0 after the sum of all bytes for this st ructu re (including checksum) */ { {0,0xa0, {{0x2, 0xdeb8}, {0x3, 0xdeb8}, {0x4, 0xdeb8}, {0x1, 0xdeb8}}, 0x1, 0}, {0,0x98, {{0x1, 0xdeb8}, {0x2, 0xdeb8}, {0x3, 0xdeb8}, {0x4, 0xdeb8}}, 0x2, 0}, {0,0x50, {{0x4, 0xdeb8}, {0x1, 0xdeb8}, {0x2, 0xdeb8}, {0x3, 0xdeb8}}, 0x3, 0}, {0,0x68, {{0x2, 0xdeb8}, {0x3, 0xdeb8}, {0x4, 0xdeb8}, {0x1, 0xdeb8}}, 0x4, 0}, {0,0x8, {{0x1, 0xdeb8}, {0x2, 0xdeb8}, {0x3, 0xdeb8}, {0x4, 0xdeb8}}, 0, 0}, } }; ===
* it does not help using the new irq_tables.c. * i had to modify src/mainboard/via/epia-m/mainboard.c in addition to get it running. --> basically add: ``pci_assign_irqs(2, 0x4, dualenetaIrq); pci_assign_irqs(2, 0x5, dualenetbIrq);'' in addition i had to play with the irq lists.
questions: * what do the strange numbers in my new irq_table.c mean? * if everything is hardcoded in mainboard.c -- what is irq_table.c for? * is it possible that all this is hardcoded in mainboard.c for epia/epia-m only, but not for other boards? other boards use irq_table.c to assign interrupts? * if you plug a card to the pci slot linuxbios seems to detect everything (devices/bridges/devices behind bridges). why cannot we say: ok there is irq 5, 10, 11 and 12. assign that 4 irqs to all devices which were detected in the previous stage. this must be the way the regular bios does it... * when booting the epia-m with the std (award) bios and using the getpir prg -> the resulting irq_table.c does not work either. is it just ignored by the epia-m setup, or what is it actually for? niki
Niki Waibel wrote:
=== /* This file was generated by getpir.c, do not modify! (but if you do, please run checkpir on it to verify) Contains the IRQ Routing Table dumped directly from your memory , wich BIOS sets up
Documentation at : http://www.microsoft.com/hwdev/busbios/PCIIRQ.HTM
Just FYI this link is going stale... MS currently redirects you to its new location but who knows how long that will last. Perhaps someone should save the whitepaper and put it at a location more under our control. It is useful info.
Unless the ms copywrite forbids this, of course. :)
On Mon, 1 Dec 2003, Niki Waibel wrote:
i think we need a new thread for the ``intel dual netwokcard problem on epia-m'' topic.
OK, I'm now looking at this for real :)
facts (correct me if i am wrong!): * intel dual eth nic is not working with linuxbios (2003-10-24). * it can be plugged into the pci slot (00:14.0) of the epia-m. * the dual nic has a pci-to-pci bridge on the card. * that bridge assignes pci bus 2 (0=internal, 1=vga/agp?) * the 2 nics on the card assign: 02:04.0 and 02:05.0 * linuxbios detects the bus/bridge and also sees the 2 nic. !!* linuxbios does not assign irqs to the nics. * default (2003-10-24) linuxbios src/mainboard/via/epia-m/irq_tables.c:
ok so far.
{0,0xa0, {{0x2, 0xdeb8}, {0x3, 0xdeb8}, {0x4, 0xdeb8}, {0x1, 0xdeb8}}, 0x1, 0},
That's 0:14.0, or Bus 0, devfn 0xa0.
{0,0xa0, {{0x2, 0xdeb8}, {0x3, 0xdeb8}, {0x4, 0xdeb8}, {0x1, 0xdeb8}}, 0x1, 0},
Note that linuxbios and the standard bios agree.
* it does not help using the new irq_tables.c.
which makes sense as the one in there is already correct. My mistake. The issue is that the card you're using has a bridge on it. I've never dealt with this before.
* i had to modify src/mainboard/via/epia-m/mainboard.c in addition to get it running.
--> basically add: ``pci_assign_irqs(2, 0x4, dualenetaIrq);
pci_assign_irqs(2, 0x5, dualenetbIrq);'' in addition i had to play with the irq lists.
eek. You know that this is exactly the wrong way to do this and why, I assume. But it works, so keep it for now. But this will never go into the CVS.
questions: * what do the strange numbers in my new irq_table.c mean?
doesn't matter, the old one was probably ok.
* if everything is hardcoded in mainboard.c -- what is irq_table.c for?
irq_table.c is for linux, it tells linux how the irqs are wired up. In an ideal world, linuxbios would hand the irq table to linux or plan9 or *bsd and those OSes would do everything correctly. In our world, each of these OSes get it wrong often enough that we have to now assign it directly. I had hoped to avoid IRQ assignment in linuxbios but it seems that we have no choice -- too many busted hardware/OS bits out there.
* is it possible that all this is hardcoded in mainboard.c for
epia/epia-m only, but not for other boards?
yes.
other boards use irq_table.c to assign interrupts?
yes. And, *most of the time*, it works fine.
* if you plug a card to the pci slot linuxbios seems to detect everything
(devices/bridges/devices behind bridges). why cannot we say: ok there is irq 5, 10, 11 and 12. assign that 4 irqs to all devices which were detected in the previous stage. this must be the way the regular bios does it...
Yes. We need more complex irq management in linuxbios. Obviously linux doesn't know what to do here either.
* when booting the epia-m with the std (award) bios and using the getpir prg -> the resulting irq_table.c does not work either. is it
just ignored by the epia-m setup, or what is it actually for?
I don't know what the award bios is doing. It's clear that linux is not able to handle the interrupt assignmnet in this case, so linuxbios will have to do more. Oh well. Another thing to add.
ron