OpenBSD manual page server

Manual Page Search Parameters

EFI(4) Device Drivers Manual EFI(4)

efiUnified Extensible Firmware Interface

# amd64
efi* at bios?


# arm64
efi* at fdt?

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.

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

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.

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.

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.
struct efi_var_ioc *
Write a variable. Delete it if datasize is zero.

/dev/efi
 

ioctl(2), intro(4)

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.

The efi driver was written by Mark Kettenis <[email protected]>. Support for the ESRT and EFI variables is heavily based on work done by Sergii Dmytruk <[email protected]>.

May 5, 2024 OpenBSD-current