Search code examples
windowskerneluefiwindows-api-code-pack

Reading the EFI System Table in Windows


Is it possible to access the EFI System Table from the OS? I would like to know where the Runtime Services are mapped. The reason for this is that the Windows API only exposes the variable services to user mode (Get/SetFirmwareEnvironmentVariable), but I was wondering if it would be possible to use the rest of the services by accessing them directly in a custom driver. I know that the Windows loader is mapping the table containing the virtual addresses of the services into the kernel memory, but I have not found a way to locate and read it. Can somebody provide suggestions or directions on how to accomplish this goal?


Solution

  • A year old question but I will answer it and maybe it would help somebody else.

    Long story short. No it's not possible. It's entirely Windows internals and if Microsoft doesn't expose it there is no way to access UEFI Run-time Services. As for the UEFI variables they are stored in a non-volatile RAM and only the UEFI firmware (BIOS) knows where all the variables are stored and how. So there are 2 possibilities either BIOS provides a way for Windows to get a pointer to UEFI Run-time Services or Microsoft has an agreement with BIOS vendors, like: - ok guys, if you want your systems to be compatible with Windows here it is the memory location where you must store the pointer to your UEFI Run-time Services period.