Skip to content

Commit 2dcc51b

Browse files
flavio-suligoiJonathan Corbet
authored andcommitted
docs: filesystems: add info about efivars content
When an EFI variable is reading from: /sys/firmware/efi/efivars (for example using "hexdump"), the first 4 bytes of the output are not the real EFI variable data, but the variable attributes (in little-endian format). Signed-off-by: Flavio Suligoi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Corbet <[email protected]>
1 parent e2d467d commit 2dcc51b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Documentation/filesystems/efivarfs.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,20 @@ files that are not well-known standardized variables are created
2424
as immutable files. This doesn't prevent removal - "chattr -i" will work -
2525
but it does prevent this kind of failure from being accomplished
2626
accidentally.
27+
28+
.. warning ::
29+
When a content of an UEFI variable in /sys/firmware/efi/efivars is
30+
displayed, for example using "hexdump", pay attention that the first
31+
4 bytes of the output represent the UEFI variable attributes,
32+
in little-endian format.
33+
34+
Practically the output of each efivar is composed of:
35+
36+
+-----------------------------------+
37+
|4_bytes_of_attributes + efivar_data|
38+
+-----------------------------------+
39+
40+
*See also:*
41+
42+
- Documentation/admin-guide/acpi/ssdt-overlays.rst
43+
- Documentation/ABI/stable/sysfs-firmware-efi-vars

0 commit comments

Comments
 (0)