History log of /freebsd-10.2-release/sys/boot/amd64/boot1.efi/boot1.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 285830 23-Jul-2015 gjb

- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
builds.
- Update newvers.sh to reflect RC1.
- Update __FreeBSD_version to reflect 10.2.
- Update default pkg(8) configuration to use the quarterly branch.[1]

Discussed with: re, portmgr [1]
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 279254 24-Feb-2015 emaste

MFC part of r273865: fix boot1.efi for block size != 512

r273865 is part of the work for supporting 4Kn drives, but it turns out
the underlying bug can actually cause corruption of the UEFI system
table in any case where block size is not 512.

Relevant portion of the original commit message:

convert boot1.efi to corrrectly calculate the lba for what the
media reports and convert the size based on what FreeBSD uses.
existing code would use the 512 byte lba and convert the
using 4K byte size.

PR: 197881
Reviewed by: Chris Ruffin


# 271996 22-Sep-2014 emaste

MFC r271762: Switch to text mode in UEFI boot

The loader previously failed to display on MacBooks and other
systems where the UEFI firmware remained in graphics mode.

Submitted by: Rafael Espindola

Approved by: re


# 271136 04-Sep-2014 emaste

MFC boot1.efi stub loader

r264391 (nwhitehorn):

Add a simple EFI stub loader. This is a quick and dirty of boot1.chrp
from the PowerPC port with all the Open Firmware bits removed and
replaced by their EFI counterparts. On the whole, I think I prefer
Open Firmware.

This code is supposed to be an immutable shim that sits on the EFI
system partition, loads /boot/loader.efi from UFS and tells the real
loader what disk/partition to look at. It finds the UFS root partition
by the somewhat braindead approach of picking the first UFS partition
it can find. Better approaches are called for, but this works for now.
This shim loader will also be useful for secure boot in the future,
which will require some rearchitecture.

r264403 (nwhitehorn):

Fix buildworld. I had some local bits in my build tree that caused
this to work by accident.

r264404 (nwhitehorn):

Add my copyright here. Most of this is unmodified from the original
sparc64 version, but at least some indication of changes that postdate
the actual invention of EFI is probably a good idea.

r264414 (nwhitehorn):

Apparently some of the i386 boot blocks are so close to full that
adding single lines to ufsread.c spills them over. Duplicate a whole
bunch of code to get file sizes into boot1.efi/boot1.c rather than
modifying ufsread.c.

r264975 (nwhitehorn):

Add generation of an EFI filesystem to hold boot1.efi. This is a near-
exact copy of the code from boot1.chrp again.

The resulting image is installed to /boot/boot1.efifat. If dd'ed to an
800K "efi" partition, it should result in a bootable system.

r268975 (sbruno): Remove boot1.efi during clean target.

Relnotes: Yes
Sponsored by: The FreeBSD Foundation


# 264391 13-Apr-2014 nwhitehorn

Add a simple EFI stub loader. This is a quick and dirty of boot1.chrp from
the PowerPC port with all the Open Firmware bits removed and replaced by
their EFI counterparts. On the whole, I think I prefer Open Firmware.

This code is supposed to be an immutable shim that sits on the EFI system
partition, loads /boot/loader.efi from UFS and tells the real loader what
disk/partition to look at. It finds the UFS root partition by the somewhat
braindead approach of picking the first UFS partition it can find. Better
approaches are called for, but this works for now. This shim loader will
also be useful for secure boot in the future, which will require some
rearchitecture.