CFT EFI Boot Refactoring

From: Eric McCorkle <eric_at_metricspace.net>
Date: Fri, 2 Dec 2016 12:02:57 -0500
Hello everyone,

My work to refactor the EFI boot loader has been in review for some time
now.  This work is a behavior-neutral refactoring which eliminates
duplicated code in boot1, provides better integration of boot1 and
loader with the EFI API, and moves towards better compliance with the
recommendations of the UEFI driver writer's guide.  This work also
serves as a precursor to more work, such as GELI, hot-plugging, and
other things.

One of the reviewers was able to trigger a hang on his setup; however,
it's not clear whether this is a problem in the refactoring, or whether
it's due to a related bug:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214423

Therefore, I would like to issue a CFT for this changeset.  We need
people using the boot1/loader EFI boot setup to test their setup using
boot1 and loader as built with this patch applied.

You can also get the source tree directly from my github
(https://github.com/emc2/freebsd.git).  Use the efize_new branch to get
this changeset.  Note that I am maintaining the state of this branch in
a single change at this point using rebase -i, so there *will* be forced
pushes to this branch.


Here are some notes on testing the changeset:

* To test it, just do a buildworld, then copy loader.efi in place and
copy boot1.efi to /efi/BOOT/BOOTX64.EFI on your ESP.  If your system
boots, then the test was successful (there are no new features in this
changeset).

* The output of boot1 is slightly different, so you'll be able to tell
if you installed it correctly.

* I recommend keeping a copy of the basic boot1 around on your ESP, just
in case something goes wrong.  On my setup, I have a backup at
/efi/BOOT/BOOTX64.BAK (with the main program at /efi/BOOT/BOOTX64.EFI,
of course)

* I have been using this on a machine with two disks, a ZFS pool
spanning both disks, and a dummy UFS filesystem for months now, so it
can be considered relatively safe.

* This has also been tested on basic setups without incident, so
priority is on complex or odd setups.

* If something goes wrong, you will most likely get a boot-hang.  If
this happens, please contact me directly with the details, and I'll
coordinate on diagnosis.

Received on Fri Dec 02 2016 - 16:03:09 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:09 UTC