Search code examples
cwindowsuefi

How i can set firmware environment variable in UEFI driver


In a Windows application, I have a GetFirmwareEnvironmentVariableA function to read a firmware environment variable. Is there any way to write something in this variable in uefi driver and read from it later in Windows?


Solution

  • The function to set an NVRAM variable is called SetVariable() and is available to UEFI drivers via EFI_RUNTIME_SERVICES table.

    To know more about it's interface and usage, read chapter 7.2 Variable Services of the UEFI 2.6 specification.