Network Card User Manual

Initializing
3-5
Initializing and Resetting
3.1.3 Finding Which Interrupt was Assigned
When the base register is established, the driver needs to find out what inter-
rupt was assigned to the card. The next code segment from GetPciConfig be-
low retrieves the PCI_INTLINE which in x86-based PCs refers to the interrupt
request (IRQ) numbers (015) of the standard dual 8259 configuration. Note
that this piece of information is retrieved via the key parameter of the evalua-
tion module network interface card’s (EVMNIC’s) PCI devIce ID.
(#define PCI_INTLINE 0x3C)
...
if (!(nic.Irq = PciRdByte(nic.DevId, PCI_INTLINE)))
error(”PCI Config failed: Unconfigured interrupt”);
Implemented hardware interrupts in a PC range from 0 to 15, but 0 is usually
unavailable to peripherals. It is suggested that a value of 0 or greater than 15
be rejected. This gives greater system protection over a check for 0 or 255,
which is the PCI-compliant answer for none available. (Refer to the
PCI Local
Bus Specification
, section 6.2.4.)