NAME

efidev, efirtcuser-mode access to UEFI runtime services

SYNOPSIS

To compile this driver into the kernel, place the following lines in your kernel configuration file:
options EFIRT
Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5):
efirt_load="YES"
The driver may be disabled by setting the loader(8) tunable efi.rt.disabled to “1”.

DESCRIPTION

The efidev device provides user-mode access to UEFI runtime services. efidev also includes a driver to provide a time-of-day clock using the UEFI real time clock (RTC). However, the RTC may not always be available, based on the UEFI firmware. If the RTC is not available, it will not be registered as a time-of-day clock and the time related ioctls below will not be functional.
efidev provides the following ioctls defined in <sys/efiio.h> with supplemental structures and constants defined in <sys/efi.h>:
EFIIOC_GET_TABLE (struct efi_get_table_ioc)
Get a table by uuid from the UEFI system table.
EFIIOC_GET_TIME (struct efi_tm)
Get the time from the RTC, if the RTC is available. The struct efi_tm passed is populated with the current time, unless an error occurs.
EFIIOC_SET_TIME (struct efi_tm)
Sets the time stored by the RTC, if the RTC is available.
EFIIOC_VAR_GET (struct efi_var_ioc)
Gets data from the variable described by the vendor and name fields of the struct efi_var_ioc into the data field. EFIIOC_VAR_GET (struct efi_var_ioc) will also populate the attrib field.
EFIIOC_VAR_NEXT (struct efi_var_ioc)
Used for enumerating all UEFI variables. The initial call should use an empty string for the name attribute. Subsequent calls should supply the vendor uuid and name of the last variable returned.
EFIIOC_VAR_SET (struct efi_var_ioc)
Sets data and attributes for the variable described by the name and vendor in the struct efi_var_ioc.

FILES

/dev/efi
 

SEE ALSO

efivar(3), efirt(9)

HISTORY

A efidev device first appeared in FreeBSD 11.1.

BUGS

efidev is currently only available on amd64 and arm64.

Recommended readings

Pages related to efirtc you should read also: