efivarfs.rst 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. .. SPDX-License-Identifier: GPL-2.0
  2. =======================================
  3. efivarfs - a (U)EFI variable filesystem
  4. =======================================
  5. The efivarfs filesystem was created to address the shortcomings of
  6. using entries in sysfs to maintain EFI variables. The old sysfs EFI
  7. variables code only supported variables of up to 1024 bytes. This
  8. limitation existed in version 0.99 of the EFI specification, but was
  9. removed before any full releases. Since variables can now be larger
  10. than a single page, sysfs isn't the best interface for this.
  11. Variables can be created, deleted and modified with the efivarfs
  12. filesystem.
  13. efivarfs is typically mounted like this::
  14. mount -t efivarfs none /sys/firmware/efi/efivars
  15. Due to the presence of numerous firmware bugs where removing non-standard
  16. UEFI variables causes the system firmware to fail to POST, efivarfs
  17. files that are not well-known standardized variables are created
  18. as immutable files. This doesn't prevent removal - "chattr -i" will work -
  19. but it does prevent this kind of failure from being accomplished
  20. accidentally.
  21. .. warning ::
  22. When a content of an UEFI variable in /sys/firmware/efi/efivars is
  23. displayed, for example using "hexdump", pay attention that the first
  24. 4 bytes of the output represent the UEFI variable attributes,
  25. in little-endian format.
  26. Practically the output of each efivar is composed of:
  27. +-----------------------------------+
  28. |4_bytes_of_attributes + efivar_data|
  29. +-----------------------------------+
  30. *See also:*
  31. - Documentation/admin-guide/acpi/ssdt-overlays.rst
  32. - Documentation/ABI/stable/sysfs-firmware-efi-vars