Professional Documents
Culture Documents
Kernel
Event Interrupt
Handler Service
(EH) Handler (ISH)
6
Native Driver
4 Interrupt Service Thread
OAL
(IST)
1 2 3 7
5
Interrupt
Service Platform Dependent
Routine (ISR) Driver
HARDWARE
• EH in kernel is first invoked.
• EH disables all interrupts and invokes
appropriate ISR in OAL
• ISR performs some minimal processing and
returns interrupt id to kernel
• ISH re-enables all but this interrupt, uses
the interrupt id to signal an event on which
a IST of a native driver is waiting (Event
Object).
• IST may need to perform some hardware
specific actions to process interrupt
• IST then notifies kernel once it is done
• ISH then re-enables this interrupt by
calling some functions in OAL.
Stream Drivers
• Presents the device as being a special
file
• Standard API regardless of the
device
• Strict naming rules: 3 upper case
letters (identifies function prefix) +
single digit + colon
• They can be loaded/unloaded by the
Device Manager.
Loading Drivers
• At boot time, Device Manager loads all drivers
listed under
HKEY_LOCAL_MACHINE\Drivers\Builtin registry
key.
• When a device is connected, the Device Manager
calls the native socket driver to obtain a Plug and
Play id. This id is compared against registry
entries in
HKEY_LOCAL_MACHINE\Drivers\PCMCIA. If
found, that driver is loaded. Else, it calls
functions listed in ….\PCMCIA\Detect that are
Stream Driver functions. If one of them says it
can handle, then that driver is loaded.
• If an application attempts to open a device without
driver loaded, then the application can explicitly
load the driver.
Stream Interface Functions
• XXX_Close()
• XXX_Deinit()
• XXX_Init()
• XXX_IoControl()
• XXX_Open()
• XXX_PowerDown()
• XXX_PowerUp()
• XXX_Read()
• XXX_Seek()
• XXX_Write()