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.