The easiest way to write a Kernel PlugIn driver is to use DriverWizard to generate the Kernel PlugIn code for your hardware (see sections 11.6.3 and 11.6.4.2). Alternatively, you can use one of the WinDriver Kernel PlugIn samples as the basis for your Kernel PlugIn development. You can also develop your code "from scratch", if you wish.
![]() | |
|
As indicated in section 11.6.3, the
Kernel PlugIn documentation in this manual focuses on the generated
DriverWizard code, and the generic PCI Kernel PlugIn
sample – KP_PCI, located in the WinDriver/samples/pci_diag/kp_pci
directory. If you are using the Xilinx Virtex 5 PCI Express chip with Bus Mastering DMA Validation Design (BMD) firmware, you can also use the specific KP_VRTX5 Kernel PlugIn sample for this chip as the basis for your development. The WinDriver/xilinx/virtex5/bmd directory contains all relevant files for the Virtex 5 BMD sample (see note at the end of 11.6.4.1 regarding this directory's structure). |
The following is a step-by-step guide to creating your Kernel PlugIn driver.
The Kernel PlugIn should be used only after your driver code has been written and debugged in the user mode. This way, all of the logical problems of creating a device driver are solved in the user mode, where development and debugging are much easier.
Determine whether a Kernel PlugIn should be written by consulting Chapter 10, which explains how to improve the performance of your driver. In addition, the Kernel PlugIn affords greater flexibility, which is not always available when writing the driver in the user mode (specifically with regard to the interrupt handling.)