File site/docs/install/nvmutil.md changed (mode: 100644) (index 2c22e03..92fffc7) |
... |
... |
fact work nicely, but software such as Linux will check |
112 |
112 |
that this is correct. If the checksum is invalid, your |
that this is correct. If the checksum is invalid, your |
113 |
113 |
kernel will refuse to make use of the NIC. |
kernel will refuse to make use of the NIC. |
114 |
114 |
|
|
115 |
|
This NVM section is the first 128 bytes of a 4KB region in flash. |
|
116 |
|
This 4KB region is then repeated, to make an 8KB region in |
|
|
115 |
|
This NVM section is the first 128 bytes of a *block size* KB region in flash. |
|
116 |
|
This *block size* KB region is then repeated, to make an *block size multipled |
|
117 |
|
by two* KB region in |
117 |
118 |
flash, known as the *GbE region*. In `nvmutil`, the first part |
flash, known as the *GbE region*. In `nvmutil`, the first part |
118 |
119 |
is referred to as *part 0* and the second part as *part 1*. |
is referred to as *part 0* and the second part as *part 1*. |
119 |
120 |
|
|
|
121 |
|
The block size can be 4KB, 8KB or 64KB, meaning that GbE files can |
|
122 |
|
be 8KB, 16KB or 128KB; the first half is part 0 and the second half is part 1. |
|
123 |
|
The first 4KB of each part is what we are concerned with; and in each 4KB part |
|
124 |
|
is the 128-byte NVM area at the very start, containing our configuration. |
|
125 |
|
|
|
126 |
|
**NOTE: Support for 16KB and 128KB files was only added *after* the |
|
127 |
|
Libreboot 20241206 release. It will be available in all releases after that, |
|
128 |
|
or you can simply compile nvmutil from the Libreboot Git repository lbmk, |
|
129 |
|
from directory `util/nvmutil/` - on the older releases, and older versions of |
|
130 |
|
nvmutil, only 8KB GbE files are supported, but we mostly only use 8KB files |
|
131 |
|
anyway (you're very unlikely to encounter 16KB or 128KB files).** |
|
132 |
|
|
120 |
133 |
### Known compatible PHYs |
### Known compatible PHYs |
121 |
134 |
|
|
122 |
135 |
TODO: write a full list her ofe what actual PHYs are known to work. |
TODO: write a full list her ofe what actual PHYs are known to work. |
|
... |
... |
command only requires read access on files. Where sufficient permission |
378 |
391 |
is not given (read and/or write), nvmutil will exit with non-zero status. |
is not given (read and/or write), nvmutil will exit with non-zero status. |
379 |
392 |
|
|
380 |
393 |
Non-zero status will also be returned, if the target file is *not* |
Non-zero status will also be returned, if the target file is *not* |
381 |
|
of size *8KB*. |
|
|
394 |
|
of size *8KB*, *16KB* or *128KB*. |
382 |
395 |
|
|
383 |
396 |
Additional rules regarding exit status shall apply, depending on |
Additional rules regarding exit status shall apply, depending on |
384 |
397 |
what command you use. Commands are documented in the following sections: |
what command you use. Commands are documented in the following sections: |
|
... |
... |
will exit with non-zero status. |
469 |
482 |
This command requires read *and* write access on files. |
This command requires read *and* write access on files. |
470 |
483 |
|
|
471 |
484 |
The `nvm` program can copy one NVM part to another. It copies |
The `nvm` program can copy one NVM part to another. It copies |
472 |
|
the *entire* 4KB part, within the 8KB file. |
|
|
485 |
|
the *entire* *block size* KB part, within the *two blocks* KB file. |
473 |
486 |
|
|
474 |
487 |
Overwrite part 0 with the contents of part 1: |
Overwrite part 0 with the contents of part 1: |
475 |
488 |
|
|
|
... |
... |
zero status. |
488 |
501 |
|
|
489 |
502 |
This command requires read *and* write access on files. |
This command requires read *and* write access on files. |
490 |
503 |
|
|
491 |
|
The `nvm` program can swap both 4KB parts in the GbE |
|
|
504 |
|
The `nvm` program can swap both *block size* KB parts in the GbE |
492 |
505 |
file. It does this, via simple XOR swaps. |
file. It does this, via simple XOR swaps. |
493 |
506 |
|
|
494 |
507 |
How to use: |
How to use: |
|
... |
... |
provided only for reference; it may be useful for future auditing. |
587 |
600 |
TODO |
TODO |
588 |
601 |
---- |
---- |
589 |
602 |
|
|
590 |
|
* Support higher block sizes e.g. 8KB blocks for GbE part sections |
|
591 |
603 |
* Adapt this into a manpage (useful for Linux package repositories / BSD ports) |
* Adapt this into a manpage (useful for Linux package repositories / BSD ports) |
592 |
604 |
* Send nvmutil upstream to coreboot, for inclusion under `util/` |
* Send nvmutil upstream to coreboot, for inclusion under `util/` |
593 |
605 |
* In addition to the manpage, when sending to coreboot, also adapt this page |
* In addition to the manpage, when sending to coreboot, also adapt this page |