Dear Members,
I wrote a Device driver for PCI card.
The device driver is fully based on the src\general\PLX9x5x sample except:
In “PLxEvtDevicePrepareHardware ” I did not call to “PLxPrepareHardware”.
In “PLxInitializeDeviceExtension” I did not call to “PLxInterruptCreate” and to “PLxInitializeDMA”
So there is no access to hardware.
There are no memory allocations in the driver.
In “PLxInitializeDeviceExtension” I added initialization for DeviceIoControl queue based on the src\general\ioctl sample:
// Configure a default queue so that requests that are not
// configure-fowarded using WdfDeviceConfigureRequestDispatching to goto
// other queues get dispatched here.
//
WDF_IO_QUEUE_CONFIG_INIT_DEFAULT_QUEUE(&ioQueueConfig,
WdfIoQueueDispatchSequential);
ioQueueConfig.EvtIoDeviceControl = FileEvtIoDeviceControl;
WDF_OBJECT_ATTRIBUTES_INIT(&attributes);
//
// Since we are using Zw function set execution level to passive so that
// framework ensures that our Io callbacks called at only passive-level
// even if the request came in at DISPATCH_LEVEL from another driver.
//
//attributes.ExecutionLevel = WdfExecutionLevelPassive;
status = WdfIoQueueCreate(controlDevice,
&ioQueueConfig,
&attributes,
&queue // pointer to default queue
);
But upon IOCTL request from the user level driver the IRQL is 2.
I checked it with KeGetCurrentIrql()
Should I enable the line:
“attributes.ExecutionLevel = WdfExecutionLevelPassive;” ?
I compiled the driver with “build -cefgz /wAll”. There are no warnings.
I configured the verifier to monitor IRQL changes. But the counter stays 0 upon IOCTL requests.
Upon start+end of every routine in the driver I printed IRQL. It is always 0.
What is the reason IRQL changes to 0 upon IOCTL request ?
Thanks,
Zvika