1. Windows Kernel all Entrieside
DriverEntry ui
Dispatch entry pointsspa
ISR and DpcForISRorm
Cancel ci
Complete routine rem
Reinitializerequests
startIOit
unloadio
iotimerast
fast I/O
adaptercontrol for MDA
synchronize function
2. IRQL and Context
DriverEntry : system thread context
Dispatch entry: arbitrary thread context as calling context from user or queued by high level driver changed to system context.
DriverEntry IRQL PASSIVE_LEVEL
3. Works in DriverEntry
1. Determining Device Configuration
CM_PARTIAL_RESOURCE_LIST
CM_PARTIAL_RESOURCE_DESCRIPTOR
2. Create device objects.
3. Claiming the hardware resources
4. Translating Bus Address
5. Exporting entry points
6. Connecting to interrupts and registering DpcForIsr
7. Getting an adapt object for DMA
8. Performing device initialization
9. Other DriverEntry operations
10. Dynamic driver Unload.
4. Works in Dispatch entry
1. Validating requests
User buffer check <= MM_USER_PROBE_ADDRESS
2. Completing requests
a. call complete routine.
b. whether it is associate IRP, if it is check whether it is the last associate IRP
c. if the IRP has MDL, unlock the pages in MDL.
d. Before kernel APC process, boost the thread priority.
3. Pending and queuing requests
System queuing : IoStartPacket() in DriverEntry. Then in startio() dispatch entry make the request active. Through ISR and in DpcForIsr(), complete request and call IostartNextPacket()
Driver queuing: use a queue and process in DpcForIsr()
4. Request processing
5. Shutdown notification
Call a driver to process register for shutdown processing for each device object.
6. Cancel processing
Call cancel routine, if cancelable, remove from list and release spin lock. KeRemoveentryDeviceQueue()
Else, just release spin lock.