linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] docs: filesystems: add info about efivars content
@ 2020-05-05 10:17 Flavio Suligoi
  2020-05-05 10:17 ` [PATCH 2/2] docs: acpi: fix old http link and improve document format Flavio Suligoi
  0 siblings, 1 reply; 6+ messages in thread
From: Flavio Suligoi @ 2020-05-05 10:17 UTC (permalink / raw)
  To: Jonathan Corbet, Mauro Carvalho Chehab
  Cc: linux-doc, linux-kernel, Flavio Suligoi

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 <f.suligoi@asem.it>
---
 Documentation/filesystems/efivarfs.rst | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/Documentation/filesystems/efivarfs.rst b/Documentation/filesystems/efivarfs.rst
index 90ac656..6380336 100644
--- a/Documentation/filesystems/efivarfs.rst
+++ b/Documentation/filesystems/efivarfs.rst
@@ -24,3 +24,20 @@ files that are not well-known standardized variables are created
 as immutable files.  This doesn't prevent removal - "chattr -i" will work -
 but it does prevent this kind of failure from being accomplished
 accidentally.
+
+.. warning ::
+      When a content of an UEFI variable in ``/sys/firmware/efi/efivars`` is
+      displayed, for example using ``hexdump``, pay attention that the first
+      4 bytes of the output represent the UEFI variable attributes,
+      in little-endian format.
+
+      Practically the output of each ``efivar`` is composed of:
+
+          +-----------------------------------+
+          |4_bytes_of_attributes + efivar_data|
+          +-----------------------------------+
+
+*See also:*
+
+- ``Documentation/admin-guide/acpi/ssdt-overlays.rst``
+- ``Documentation/ABI/stable/sysfs-firmware-efi-vars``
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-05-25 16:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 10:17 [PATCH 1/2] docs: filesystems: add info about efivars content Flavio Suligoi
2020-05-05 10:17 ` [PATCH 2/2] docs: acpi: fix old http link and improve document format Flavio Suligoi
2020-05-15 17:40   ` Jonathan Corbet
2020-05-19  8:41     ` [PATCH v1 1/2] docs: filesystems: add info about efivars content Flavio Suligoi
2020-05-19  8:41       ` [PATCH v1 2/2] docs: acpi: fix old http link and improve document format Flavio Suligoi
2020-05-25 16:45       ` [PATCH v1 1/2] docs: filesystems: add info about efivars content Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).