The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.
Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/
Just to give you some feedback on something I don't find elsewhere : using RtlZeroBytes() on mapped registers of a PCIe card will stall the computer in a way that even the Kernel Debug see nothing.
This post is mainly a reminder.
On Windows 10 (10.0.19043).
The code was like :
area = MmMapIoSpace(basePhyAddr, size, MmNonCached)
This perfectly ran in Debug builds, but crashed in Release ones.
According to the code in wdm.h , the
RtlZeroBytes() is defined as
#define RtlZeroMemory(Destination,Length) memset((Destination),0,(Length))
I've found no remark or else in any Microsoft documentation about the use of
RtlZeroBytes() on mapped registers.
At first, I used a simple
for() loop. But once I've validated the write operations, I've searched for a better solution and this was with
This is either a straight amd64 CPU intrinsic or a bunch of assembly code otherwise.
Did you ever already seen this ?
|Upcoming OSR Seminars|
|OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!|
|Writing WDF Drivers||12 September 2022||Live, Online|
|Internals & Software Drivers||23 October 2022||Live, Online|
|Kernel Debugging||14 November 2022||Live, Online|
|Developing Minifilters||5 December 2022||Live, Online|