Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results


Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging

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:

Find EFI_RUNTIME_SERVICES from Windows kernel mode driver

Louis_BernardLouis_Bernard Member Posts: 6

I'm trying to find the EFI_RUNTIME_SERVICES structure from inside the Windows OS using a kernel mode driver. The structure is guaranteed to be allocated somewhere in physical memory below 4GB and has a distinctive byte signature at its start address. My plan was to scan the entire physical memory below 4GB, but I'm not sure how to do this safely and efficiently. Using MmMapIoSpace works theoretically, but this API is not designed for such usage and it's very slow on top of that.

How can I safely and efficiently search for the EFI_RUNTIME_SERVICES structure in physical memory from a Windows kernel mode driver?

I might add that I'm not a professional developer yet (student), so there might be obvious things that I don't know about yet.


  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 9,025

    Can't do it. The OS has the pointer, and it's not exported to drivers... and I can't think of any legitimate reason a driver would need it.

    So, let me ask: What larger problem are you trying to solve.


    Peter Viscarola

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 14,373

    You can't just troll through physical memory. A big chunk of the physical space below 4GB is assigned to PCI devices, and you don't know what effect reading from them might have. Plus, when you map pages, you have to use the same caching scheme in use by any other mapping of the pages, which you don't know.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

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