Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between a WDM driver, a KMDF driver and a UMDF driver?

When creating a Windows Driver project in Visual Studio 2012, you have many different options to choose from.

There's a page on MSDN that helps you with choosing the correct driver model for your device. It however doesn't clearly explain the exact differences between the WDM, KMDF and UMDF driver types, and when to choose which model.

I'm looking for an explanation on the differences between the WDM, KMDF and UMDF driver models, so it's easy for beginning Windows driver developers to choose the correct model.

like image 348
lesderid Avatar asked May 15 '13 15:05

lesderid


People also ask

What is difference between Umdf and Kmdf?

For example, KMDF includes objects unique to kernel mode, while UMDF includes some objects unique to user mode. Objects and functionality that can't be accessed through UMDF include direct handling of interrupts, DMA, nonpaged pool, and strict timing requirements.

What is a Umdf device?

User-Mode Driver Framework (UMDF) is a device-driver development platform first introduced with Microsoft's Windows Vista operating system, and is also available for Windows XP. It facilitates the creation of drivers for certain classes of devices.

What is WDM Integrated Driver?

In computing, the Windows Driver Model (WDM) – also known at one point as the Win32 Driver Model – is a framework for device drivers that was introduced with Windows 98 and Windows 2000 to replace VxD, which was used on older versions of Windows such as Windows 95 and Windows 3.1, as well as the Windows NT Driver Model ...

What is Windows user mode?

When you start a user-mode application, Windows creates a process for the application. The process provides the application with a private virtual address space and a private handle table. Because an application's virtual address space is private, one application cannot alter data that belongs to another application.


2 Answers

In a nutshell:

  • WDM stands for Windows Driver Model. Every Kernel driver is essentially a WDM driver.
  • KMDF stands for Kernel Mode Driver Framework. This is a framework that encapsulates and hides many of the OS programming aspects that driver developer must relate to even if it has nothing to do with the business logic of his driver. Some functionality doesn't exist in KMDF framework and will require native Kernel calls without using the framework (but in most situations it's not the case).
  • UMDF stands for User Mode Driver Framework. It's a complementary framework to KMDF and together they comprise WDF (Windows Driver Frameworks). UMDF allows to create a driver in user mode, having all the benefits of User mode programming vs Kernel mode. Naturally, UMDF driver have limitations compared to KMDF/WDM drivers and in most situations it will require a Kernel counterpart with at least some functionality.

The page you've referenced is pretty comprehensive. You should dwell into it for deeper understanding.

like image 58
SomeWittyUsername Avatar answered Sep 26 '22 21:09

SomeWittyUsername


I like articel from MSDN : Differences Between WDM and KMDF

  • WDM is the driver model since pnp device drivers (>=Win2k). In this model you have to handle functions not relevant to your functionality. Walter Oney (Programming the Microsoft Windows Driver Model) outsourced such functions to external device driver libraries for reusing.

  • WDF/kmdf tries to simplify the development of device drivers. Functions can be overwritten or default handler is used. The administration of memory and queues has been greatly simplified and secured.

  • UMDF tried to use similar function calls in user mode as function calls in kernel mode.

Hopefully not too late. Question date first seen when I had finished writing!

like image 27
tilli Avatar answered Sep 25 '22 21:09

tilli