summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-06 13:30:14 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-06 13:30:14 +0000
commita31236b1f8ad8d77a750af80285241f235d005cb (patch)
treee7e5412075eba392ec32ebc94d65a18fd4b07340
parentc7409cce03a9a29dc8ff41691d7cb47a5f59abf2 (diff)
util/nvmutil: comment regarding endianness
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--util/nvmutil/nvmutil.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index b735b351..203e4862 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -609,6 +609,11 @@ good_checksum(int partnum)
return 0;
}
+/*
+ * GbE NVM files store 16-bit (2-byte) little-endian words.
+ * We must therefore swap the order when reading or writing.
+ */
+
static uint16_t
word(size_t pos16, int p)
{