[ros-kernel] BusInterruptLevel/BusInterruptVector

Vizzini vizzini at plasmic.com
Sat Nov 8 01:07:32 CET 2003


On Wed, 2003-11-05 at 02:49, Ge van Geldorp wrote:
> What's the difference between the BusInterruptLevel and
> BusInterruptVector parameters passed to HalGetInterruptVector? The NT4
> DDK says:
> 
> BusInterruptLevel
> Specifies the bus-specific interrupt level. 
> BusInterruptVector
> Specifies the bus-specific interrupt vector.

Vector and level, according to the docs I can find on it (Oney and
Dekker), are bus-relative, i.e. they have meaning only in the context of
the bus the card is on.  According to the latter source, the Right Thing
to do is to call HalAssignSlotResources() and grab these numbers from
the returned CM_RESOURCE_TYPE_INTERRUPT.  There's no way to figure out
these numbers for ISA, but they should both be the IRQ# that the card is
configured for, as learned from the registry.  (Dekker/Newcommer pp. 333
& 410ff.)  [this doesn't address isapnp, which i know next to nothing
about]

I still don't actually know what they *are* though. :-)  I suspect that
it is either the case that vector is a the IRQ#, INT#, etc. (i.e
physical interrupt line on a bus) and level is a "hint" to the OS as to
which IRQL to assign a device, 

 -OR-

vector and level, taken together, are sufficient to describe the
bus-relative interrupt line on any bus NT supports (which is virtually
all of them), and I'm not familiar enough with other buses to say what
the hardware dudes at MS were thinking about when they used two numbers
instead of one to describe the concept of interrupt line.

Both just guesses, mind you :)

> However, looking at drivers/scsiport/scsiport.c, I only see a value
> being assigned to PortConfig->BusInterruptLevel, no assignment to
> PortConfig->BusInterruptVector before it is passed as parameter to
> HalGetInterruptVector.
> If I have an InterruptLine value from PCI configuration space
> (PciConfig->u.type0.InterruptLine), should I just pass that
> InterruptLine for both BusInterruptLevel and BusInterruptVector in the
> HalGetInterruptVector call?

According to the Dekker, "these two numbers are usually the same for
virtually any kind of device."  If you don't want to rewrite the code to
get this info from HalAssignSlotResrouces, I'd pass the same number in
both parameters.

 -Vizzini




More information about the Ros-kernel mailing list