Project 'nic3-14159/e6400-flash-unlock' was moved to 'nic3-14159/dell-flash-unlock'. Please update any links and bookmarks that may still have the old path.
- May 12, 2024
-
-
Nicholas Chin authored
Add the E5420 and E5520 as they have been confirmed to be internally flashable using the utility. Also fix sorting and M4800 typo. Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
-
Nicholas Chin authored
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>
-
Nicholas Chin authored
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>
-
Nicholas Chin authored
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
-
Nicholas Chin authored
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
-
Nicholas Chin authored
Set argument list as void. Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
-
Nicholas Chin authored
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>
-
Nicholas Chin authored
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>
-
-
- Jan 05, 2024
-
-
Nicholas Chin authored
-
Nicholas Chin authored
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.
-
Nicholas Chin authored
-
- Dec 18, 2023
-
-
Nicholas Chin authored
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.
-
Nicholas Chin authored
-
Nicholas Chin authored
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.
-
- Nov 13, 2023
-
-
Nicholas Chin authored
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.
-
- Oct 12, 2023
-
-
Nicholas Chin authored
This is no longer limited to the E6400 so change it to a more general name. While it currrently only seems to support Dell's business laptops with MEC5035 derived ECs, it is possible other lineups will also work with this, or this utility could be extended to support those if they provide a similar FDO feature.
-
- Oct 10, 2023
-
-
Nicholas Chin authored
This utility is no longer specific to the E6400, so update the README with info about support for other devices and any differences in behavior between them.
-
Nicholas Chin authored
Remove the commented out read_ec_reg as it is not currently planned to be utilized. Simply the function to send the EC FDO command, as the other arguments to query and unset the FDO as well as the return value are never used. The enums for the different arguments were removed, though the values were moved to a comment for reference.
-
Nicholas Chin authored
-
Nicholas Chin authored
-
Nicholas Chin authored
The license boilerplate just inflates the length of the files, and is often the majority of the lines in some of the files. coreboot also prefers SPDX headers only for any new files added to the project, and I may add this to coreboot's utils in the future.
-
Nicholas Chin authored
This adds an operating system agnostic calling interface to accessors.c for requesting permissions to the x86 io ports. Previously Linux's ioperm was used. OpenBSD seems to have removed the ioperm system call, which allows access to specific IO ports. The previous implementation also did not support the full range of ports, which means it wouldn't have worked for e6400-flash-unlock anyway. Only iopl remains, which grants access to all ports. Linux implements both, though iopl is marked as deprecated. It still remains as some old X servers rely on it. Just use iopl to simplify the code across systems, even though only allowing access to specific ports is theoretically safer.
-
Nicholas Chin authored
The functions to do these are OS dependent, so abstract this out with a common calling interface. This also uses the much better (address, data) format for the out instructions instead of the (data, address) order that the Linux functions use. This currently supports Linux and OpenBSD.
-
- Sep 05, 2023
-
-
Nicholas Chin authored
-
Nicholas Chin authored
This file will be used to abstract hardware access functions that may differ based on the operating system.
-
Nicholas Chin authored
It seems like the Exx10 systems and newer don't set up SMI write protections when the FDO is set by the EC, so disabling SMIs to bypass them is unnecessary. The new logic should be able to differentiate whether or not the SMM bypass is necessary and direct the user appropriately.
-
- Sep 04, 2023
-
-
Nicholas Chin authored
On the E6430, it seems like the firmware sets up the LPC Generic Decode Range registers such that ports 0x910 and 0x911 aren't forwarded over LPC. I suspect it enables these for itself during boot and SMM, but then disables them once the OS is running. To get around this, the program can just set its own decode range at a free decode register. Note that kernel modules like dell_smm_hwmon seems to cause these registers to be reset periodically, as these communicate with SMM which seems to set up these register for itself as previously noted. Setting up these registers and communicating with the EC shortly afterwards in the same program seems to be fast enough to work around this, though theoretically an SMI at the right moment could disrupt this.
-
Nicholas Chin authored
Since the EC command seems to work on systems other than the E6400, the values of these base address registers should not be hardcoded, since the firmware of other systems may set them differently. Read them from the PCI config registers from the LPC device where they are located.
-
- Aug 24, 2023
-
-
Nicholas Chin authored
This prevents the unlock utility from hanging forever if the host can't communicate to the EC, such as the IO ports not being forwarded over LPC. Also add a message before sending EC commands so that the user isn't left with no output when waiting for the EC.
-
- Apr 19, 2023
-
-
Nicholas Chin authored
- Sort includes - The EC command enum exists for a reason, so use it in calls to ec_fdo_command()
-
- Apr 15, 2023
-
-
Leah Rowe authored
printf messages say the same things
-
Leah Rowe authored
i overlooked this, nicholas pointed it out on irc sort both groups of defines by path
-
Leah Rowe authored
i forgot to put a line break for curly brackets in functions. fixed now. also use consistent style for comments squash comments, and code lines
-
Leah Rowe authored
-
Leah Rowe authored
nicholas says will use later, so comment it
-
Leah Rowe authored
prototypes moved closed to the top, and those are also ordered the same way as the functions with this change, you can read the entire program from the top of the file to the bottom of the file, to understand the entire program this is one of the key aspects to the puffy coding style: https://man.openbsd.org/style.9 it makes code much easier to read
-
Leah Rowe authored
-
Leah Rowe authored
easier to read, know what type something is and see the name, on separate lines.
-
Leah Rowe authored
-