Windows PCI Device Driver Development Guide: Using SGL DMA

Windows PCI Device Driver Development Guide: Using SGL DMA

In the previous article (Implementing a PCIe Device in Qemu: Supporting SGL DMA), we added a Bit Flip functionality (bitwise negation) to the PCIe device simulated in Qemu. In this functionality, we implemented support for Scatter-Gather List DMA (SGL DMA), allowing the use of non-contiguous physical memory as a DMA buffer. This article will introduce … Read more

Semiconductor Investment Market Update for the Fourth Week of June

Semiconductor Investment Market Update for the Fourth Week of June

Semiconductor Investment Market Update for the Fourth Week of June 1. Yitang Co., Ltd.: Two core products rank second globally in market share, with technology reaching international leading levels. 2. Domestic chips receive timely capital support. 3. Ximi Technology secures Series B funding. 4. Another financing of 3.1 billion yuan is needed; previous fundraising projects … Read more

Windows PCI Device Driver Development Guide: Two Options for Interrupt Handling – DPC vs WorkItem

Windows PCI Device Driver Development Guide: Two Options for Interrupt Handling - DPC vs WorkItem

In this article (How to Trigger User-Mode Events from Interrupt Handling Functions), we mentioned notifying a user-mode event in the WDF driver’s interrupt handling function using the KeSetEvent function, waking up the user-mode program to read the Timer’s count value. However, since the kernel function KeSetEvent is required to run at an IRQL less than … Read more

Windows PCI Device Driver Development Guide: Bringing the Device to D0 State by Opening the Device File

Windows PCI Device Driver Development Guide: Bringing the Device to D0 State by Opening the Device File

In the previous article (Implementing a PCIe Device in Qemu: Adding a Periodic Timer to the Device), we introduced how to add a Timer to a PCIe device simulated by Qemu. This Timer has a counter that increments by 1 every second once enabled, and it also sends an interrupt to the virtual machine.To test … Read more

Guide to Windows PCI Device Driver Development: Interrupt Handling

Guide to Windows PCI Device Driver Development: Interrupt Handling

In this article, we add a periodic Timer to the PCIe device previously simulated in Qemu. Once this Timer is enabled, it will trigger an MSI interrupt to the Qemu virtual machine every second. To verify that this interrupt function works correctly, we need to add interrupt handling capabilities to the driver for this PCIe … Read more

X86 Kernel Notes_2_Driver Development

X86 Kernel Notes_2_Driver Development

This article is a highlight from the Kanxue ForumAuthor from Kanxue ForumID: SSH Landscape Painting 1 Creating a Driver Project Creating the Project Reference article for WDK and VS installation: X86 Kernel Notes 0 Configuring Dual Machine Debugging Environment Open VS2017, create a new project, select Visual C++ -> Windows Drivers -> Legacy -> Empty … Read more

Windows PCI Device Driver Development Guide: How to Bind Context to WDF Objects

Windows PCI Device Driver Development Guide: How to Bind Context to WDF Objects

When writing WDF drivers, we often need to bind some driver-defined data structures to WDF objects (such as device objects, queue objects, request objects). These data structures provide the driver with the capability to store and manage state information specific to the object, which we commonly refer to as context. These contexts are essentially data … Read more

Windows PCI Device Driver Development Guide: Accessing PCI Configuration Space and MMIO Registers

Windows PCI Device Driver Development Guide: Accessing PCI Configuration Space and MMIO Registers

In the previous article, we implemented some PnP callbacks in PCI drivers, allowing the driver to load onto the PCIe device and enabling the device to enter the D3 low power state. In essence, writing a driver involves using the APIs provided by the operating system’s driver framework to create device objects and implement various … Read more

Windows PCI Device Driver Development Guide: PnP Callback

Windows PCI Device Driver Development Guide: PnP Callback

In the previous article, we introduced the driver code generated by the VS KMDF template, providing a preliminary understanding of the driver code. It should be evident that this driver is quite simple, essentially lacking any real functionality. After installing the driver we wrote, this PCIe device remains in the D0 state (if you are … Read more

Windows PCI Device Driver Development Guide: Building Your First Device Driver from Scratch

Windows PCI Device Driver Development Guide: Building Your First Device Driver from Scratch

The Windows WDF (Windows Driver Framework) is a driver development architecture introduced by Microsoft, designed to simplify the kernel driver development process and enhance system stability. WDF drivers are divided into KMDF (Kernel-Mode Driver Framework) and UMDF (User-Mode Driver Framework). KMDF provides an object-oriented interface for kernel-mode drivers, such as Device Objects, Queue Objects, Request … Read more