Skip to main content

Back to the roots

For the past couple of weeks, I have been working on something that I thought I had left behind a long time ago, a very long time ago -- a windows device driver!

I had launched my career writing drivers, first for OS/2 and then eventually for Windows. When I say Windows, I'm referring to Windows NT 3.51. That's correct, NT 3.51! And here's a surprise, the first Windows NT driver that I worked on ran on PowerPC platform! IBM was readying their new state-of-the-art PC platform and to play it safe wanted to give the user the choice of platforms to run -- OS/2 and Windows NT.

Being a new platform, the toolsets were not quite as well developed as they were for the more contemporary and stable x86. WinDBG (a far cry from the WinDBG of these days) had issues syncing the source line information in the PDB with the actual source files. Quite often I had to resort to using the disassembly to isolate the root cause and fix it. Another challenge that I faced then was that the x86 driver had plenty of inline assembly which had to be ported to either C or PowerPC's RISC instruction set.

But what sets apart the driver development experience then and now is the advances made with the virtualization technology. Gone are the days of NULL modem cable and the rather long wait with every WinDBG command. Instead you work with multiple VMs with a virtual serial port mapped to a named pipe and debugging different versions of the driver simultaneously! The fact that VM states can be saved and cloned at will really makes driver development a breeze.

One thing however, has not changed much. Much of NT driver is still written C with very little C++. It's a shame that MS has not managed to update their compiler such that it can generate a driver safe PE image. Let's hope that this will change in the near future.

Anyway, it's hard not to feel like I'm going back to my roots.