summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-06 16:49:08 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-06 16:49:41 +0000
commit7ae2288c1025ac8369bb10a1f77f9540eec06a8f (patch)
treea12b0ea73e5490b6d1e66bd17cce1e3795d6142c /util
parent2f0c189da9ee803466bdd7707f0a8cc207259ee8 (diff)
util/nvmutil: more readable NVM defines
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/nvmutil/nvmutil.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 04d691d2..faeee807 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -61,8 +61,9 @@ static void set_err(int);
#endif
#define NVM_CHECKSUM 0xBABA
-#define NVM_CHECKSUM_WORD 0x3F
#define NVM_SIZE 128
+#define NVM_WORDS (NVM_SIZE / 2)
+#define NVM_CHECKSUM_WORD (NVM_WORDS - 1)
#define SIZE_1KB 1024
#define SIZE_4KB (4 * SIZE_1KB)