[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: interruption sequence
|<><><><><> Original message from SRD Ren Hantao <><><><><>
|Hi, All
| I have asked this question before, but it seemed no one
|response to it. Does any one who is familiar with WindowsNT
|PCI device driver can give an explanation?
|
|The original letter is as bellows:
|
| I have also another question. How does the Operation
|System process the PCI interrupt?
The PCI interrupt lines for the PCI devices are routed in
a system dependent way to some set of interrupt input on
either the processor or an interrupt controler that
then signals an interrupt to the processor when required.
It is possible (but not required) that more than PCI device
is connected to one of the interrupt inputs.
When the processor has determined that a particular interrupt
has been asserted, it then calls all of the interrupt handlers
that have been register for that interrupt input. The interrupt
handler for a specific device then needs check the device to what, if
any, interrupt conditions it is asserting and then handle those
conditions. It is generally advisable for the driver to loop handling
any asserted conditions until the device is no longer asserting an
interrupt. It is also possible for a device drivers interrupt handler
to be called when the device is not asserting an interrupt and the
driver must be ready to handle that case as well.
| For example, in WindowsNT,
|if you use DDK to develop a PCI device driver, it seemed
|that windowsNT knows which PCI device has generated the
|interrupt.
It only knows what set of devices are interrupting and must call
the interrupt handlers for all of the devices in the set.
| so when you write the interrupt handler of a
|PCI device. All the things you should do is just filling
|some codes in the function. I am not quite sure about this,
|but if it's true, then different PCI device drivers are
|all independent.
This is the case. The driver for any given device generally
operates independently from all other devices.
| It is unnecessary to check the interrupt
|source in the device driver since OS has find it out, but
|how?
It is still necessary to check your specific device for the interrupt
source in your device driver since the OS can only narrow things
down to a set of devices that share the same interrupt line.
You must handle the case when you are called when you are not
asserting and interrupt.
| could someone give me more detailed information?
Hopefully the above comments will answer your questions.
Thomas J. Merritt
CodeGen, Inc.
tjm@codegen.com
1-415-834-9111