util/nvmutil: made a comment a bit clearer

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-06 19:21:02 +00:00
parent 72caa5f892
commit 1131240d02
+8 -5
View File
@@ -449,11 +449,14 @@ set_mac_nib(int mac_pos, int nib)
h = (h & 0xE) | 2; /* local, unicast */ h = (h & 0xE) | 2; /* local, unicast */
/* /*
* The word is stored big-endian in the file. * Words other than the MAC address are stored little
* Logically in C, it is stored little-endian, * endian in the file, and we handle that when reading.
* because of how we load in read_gbe(), so * However, MAC address words are stored big-endian
* we store the MAC address in reverse order * in that file, so we write each 2-byte word logically
* per 2-byte word (there are 3 of these). * in little-endian order, which on little-endian would
* be stored big-endian in memory, and vice versa.
*
* Later code using the MAC string will handle this.
*/ */
shift = (byte & 1) << 3; /* left or right byte? */ shift = (byte & 1) << 3; /* left or right byte? */
shift |= (nib ^ 1) << 2; /* left or right nib? */ shift |= (nib ^ 1) << 2; /* left or right nib? */