EFI(4)

NAME
efi - Unified Extensible Firmware Interface

SYNOPSIS
# amd64
efi* at bios?

# arm64
efi* at fdt?

DESCRIPTION
The efi driver provides support for EFI runtime services offered by UEFI firmware implementations. It can read and write the Real Time Clock and provides userland applications ioctl(2) access to the System Resource Table and to read and write variables.

IOCTLS
efi supports the following ioctl(2) commands, available through <dev/efi/efi.h> <dev/efi/efiio.h>:

EFIIOC_GET_TABLE struct efi_get_table_ioc *

        struct efi_get_table_ioc {
        	void *buf;          /* Pointer to userspace buffer */
        	struct uuid uuid;   /* UUID to look up */
        	size_t table_len;   /* Table size */
        	size_t buf_len;     /* Size of the buffer */
        };

    Read a table.

EFIIOC_VAR_GET struct efi_var_ioc *

        struct efi_var_ioc {
        	uint16_t *name;     /* User pointer to name, in UCS2 chars */
        	size_t namesize;    /* Number of *bytes* in the name
        	                       including terminator */
        	struct uuid vendor; /* Vendor's UUID for variable */
        	uint32_t attrib;    /* Attributes */
        	void *data;         /* User pointer to value */
        	size_t datasize;    /* Number of *bytes* in the value */
        };

    Read a variable.

EFIIOC_VAR_NEXT struct efi_var_ioc *
    Enumerate all variables. The first command must use the empty name. Further ones must denote the previous variable's name and UUID.

EFIIOC_VAR_SET struct efi_var_ioc *
    Write a variable. Delete it if datasize is zero.

FILES
/dev/efi

SEE ALSO
ioctl(2), intro(4)

HISTORY
The efi device driver first appeared for arm64 in OpenBSD 6.3. Support for amd64, the ESRT and EFI variables appeared in OpenBSD 7.3.

AUTHORS
-nosplit The efi driver was written by Mark Kettenis <kettenis@openbsd.org>. Support for the ESRT and EFI variables is heavily based on work done by Sergii Dmytruk <sergii.dmytruk@3meb.com>.