none
Locating RSDP Structure from Windows Kernel Driver in UEFI mode RRS feed

  • Question

  • Hi,

    We had a requirement to read a ACPI table in our windows kernel driver (there is a user mode Windows API but wanted to do it from kernel mode for some reasons). 
    This is a root enumerated software kernel driver(legacy), which is working fine on Windows XP, Windows 7, Windows 8. 
    And now we are facing an issue on Windows 8 if OS is installed in UEFI mode.

    Our driver scans for RSDP in E0000h-FFFFFh region as defined in ACPI specification.
    Some IBVs don't create/update RSDP in E0000-FFFFFh Memory region if UEFI boot mode is selected, as this structure can be obtained through EFI_SYSTEM_TABLE passed to OS loader. 

    After doing some exploration, I have below options

    1) Use 'AuxKlibGetSystemFirmwareTables' API for kernel driver to read ACPI table itself. 
    But behavior of this API is not clearly documented when FAST BOOT is enabled on Windows 8 (without using shift+shutdown) and during hibernate/resume.
    We observed some issues when we used equivalent User mode API 'GetSystemFirmwareTable'

    Example scenario:

      BIOS creates ACPI Table (in Reserved memory)->Driver Reads this Table, after this user hibernates machine/selects shutdown option

      On Resume BIOS updates ACPI Table -> When driver calls AuxKlibGetSystemFirmwareTables, will it return updated table or a cached one?

    2) Use 'IoWMIOpenBlock ' as suggested in some thread replies, but I couldn't figure on how to use it

    3) Create a EFI Runtime variable (volatile) from UEFI driver, which points to RSDP PTR and read that variable from Windows driver. I think this is not a good approach.

    4) If I can locate RSDP by some way then I need to enhance only single function in existing driver.

    I would really appreciate if some pointers/suggestions can be provided to solve this problem.

    Thanks in advance.

    - Vikranth


    Friday, March 22, 2013 2:36 PM

Answers

  • Hi Vikranth,

    You should be able to use AuxKlibGetSystemFirmwareTables to query for the specific ACPI table you want directly. This function will read the table from memory and cache it internally. The first time the function is called it should return the original ACPI table, subsequent calls will return a cached copy. If you call this function on boot, there should be no problem if RSDT changes across hibernate because the table contents themselves are cached and should not have been changed.

    -Youssef.

    Friday, July 19, 2013 9:51 PM

All replies

  • Hi Vikrant,

    Sorry I don't have answer for your question, but I know you have answer for my question, can you please go through my post "kernel api to access uefi nvram variables on windows 7" and update how can I use AuxKlibGetSystemFirmwareTables to get access to UEFI runtime services.

    Thanks in advance:)

    Friday, July 19, 2013 5:34 AM
  • Hi Vikranth,

    You should be able to use AuxKlibGetSystemFirmwareTables to query for the specific ACPI table you want directly. This function will read the table from memory and cache it internally. The first time the function is called it should return the original ACPI table, subsequent calls will return a cached copy. If you call this function on boot, there should be no problem if RSDT changes across hibernate because the table contents themselves are cached and should not have been changed.

    -Youssef.

    Friday, July 19, 2013 9:51 PM