---
name: "efi"
section: "4"
platform: "openbsd"
package: "man"
version: "8.0-current-20261101"
release: "OpenBSD 8.0-current (2026-11-01)"
platforms: ["openbsd"]
url: "https://new.carta.tech/efi/4"
---

# efi(4)

Unified Extensible Firmware Interface

## 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)](/ioctl/2.md) access to the System Resource Table and to read and write variables.

## IOCTLS

**efi** supports the following [ioctl(2)](/ioctl/2.md) 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)](/ioctl/2.md), [intro(4)](/intro/4.md)

## 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

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*⟩.
