Age | Commit message (Collapse) | Author |
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Set up the DESTDIR variable properly. Otherwise,
this is just style changes.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Don't assume "install" is the correct command.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
The user might wish to uninstall, but not remove the
build that they just did.
The user can still do make clean if they wish.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
DESTDIR is the root directory where it goes, which
is normally an empty string; PREFIX is where the
bin directory is located, relative to DESTDIR
Default to /usr/local for PREFIX, not /usr, because
/usr/bin is for system utilities.
nvmutil is a local utility.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
We don't want to clobber anything that the user set themselves.
Instead, we should respect the user's choice.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
This makes the code easier to understand.
All 2-byte words, stored in little endian order within
the 128-byte GbE NVM area, must add up to 0xBABA.
If it doesn't, then software is supposed to reject that
GbE config. The nvmutil software works on that basis.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
make it look like hexdump -C, where individual bytes are
spaced, and there is an additional space after 8 bytes,
per row.
i won't bother with a character display, since that is
meaningless on gbe nvm words.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Must not exceed 79 lines. Some variables and functions have
been renamed, and there has been some minor re-factoring.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
I don't like using SPDX for actual copyright declarations.
I only want it to be used for the license identifier.
Also:
I made a *single* change to nvmutil.c in 2024, which means
that I have copyright in all years since and including 2022;
the file said 2022, 2023, 2025, but it's actually 2022-2025.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
I don't like using strings this way, it looks unclean.
Once again, use good old fashioned if/else.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
I wasn't too happy using shorthand for strings like that.
Tidy it up and use good old fashioned if/else.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
upstream has merged all of the changes that it contained,
so we don't need this anymore. we'll have the newer upstream
changes on the next general revision updates for coreboot,
within config/coreboot/
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Use shell scripting in the recipe instead of GNU make's
conditional syntax. This allows the Makefile to work with
the default implementations of make on the BSDs.
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
|
|
Add FreeBSD to the README as it is now supported. Make a note about
using gmake instead of make as the makefile currently uses GNU
extensions to determine build flags based on the OS.
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
|
|
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
|
|
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
|
|
Set argument list as void.
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
|
|
The pio.h header, although present on NetBSD, is not necessary, as it
only declares x86 port IO inx()/outx() functions which are not actually
implemented.
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
|
|
The x86 port IO instructions do not access memory so it is not
needed in the clobber list.
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
|
|
linear/lbmk:master into master
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/194
|
|
This is a copy of coreboot's autoport utility, with a patch applied to
support Haswell/Lynx Point platforms. That patch is currently in review
on coreboot's Gerrit.
https://review.coreboot.org/c/coreboot/+/30890
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
|
|
|
|
we use flashprog now!
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
|
|
In order for the EC to maintain the state of whether or not to set the
flash descriptor override across a power cycle, the AC adapter must be
connected, as the system leaves the voltage rail that the EC uses
powered under this condition. Without this, the utility may fail,
continually asking the user to power off and on.
On Linux, CONFIG_X86_IOPL_IOPERM must be set for the kernel, or else the
iopl call will error with "Function not implemented". Make a note of
this in case a user runs into this issue.
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
|
|
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
|
|
These systems have a report that the unlock utility does not work.
Until there are multiple reports of failed unlocks and a technical
determination of why it doesn't work, they will not be listed as
explicitly unsupported.
|
|
|
|
As this utility requires access to /dev/mem, the default protections of
Linux and OpenBSD must be relaxed to allow this. Make a note of this in
the instructions.
|
|
The old Open Security Training site had a course called Advanced x86:
BIOS and SMM Internals, which had a set of slides outlining the method
to supress SMIs by changing the GBL_SMI_EN bit. Add a reference to it as
this is where I originally learned of this method.
|
|
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
|
|
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
|
|
make install is nice to have. now respects$(PREFIX) as well.
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
This more accurately describes the scope of the utility.
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
under the current logic, errno would be ECANCELED
if neither checksum is valid, or I/O related if
pwrite fails; alternatively, the for loop exits
and the file has been written, where it is quite
correctly reset already.
ergo, the errno reset at the start of
writeGbeFile is superfluous. remove this bloat.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
previously, a bad checksum would have caused a non-zero
exit, even if the other checksum was correct (observed
when using the swap command)
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
This updates lbmk's copy of e6400-flash-unlock to commit c5567fece479
(README.md: Update with info about broader device support) in my
upstream repo.
Changes:
- Theoretical support for any Dell system that implements that flash
descriptor override command. This is done by reading base address
registers at runtime instead of hard coding them for specific devices.
Tested on the Latitude E6400 and Latitude E6430.
- Support for OpenBSD. It compiles, runs, and behaves as expected,
though I have not actually tested internally flashing with flashrom
yet. It should work though, as the program checks if the descriptor
override is set and the BIOS Write Enable is able to be set to 1, which
is all that is needed to internal flash.
- Integrated changes made in the lbmk copy
- Moved operating system accessor implementations to their own file
It should be fully functional, though minor formatting and cleanup
changes are still planned.
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
also, some of them were out of date; years now updated.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
it's only used once, so just do it once.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
253 sloccount on nvmutil.c now, versus 258
Signed-off-by: Leah Rowe <leah@libreboot.org>
|