Add a simple EFI stub loader. This is a quick and dirty of boot1.chrp from
authornwhitehorn <nwhitehorn@FreeBSD.org>
Sun, 13 Apr 2014 01:14:25 +0000 (01:14 +0000)
committernwhitehorn <nwhitehorn@FreeBSD.org>
Sun, 13 Apr 2014 01:14:25 +0000 (01:14 +0000)
commit642f0d53622b1b0d719555f72faf6ec030273986
treeaf9b63a01484f9d28b7f07fe75ceecae11603a0d
parent5a4e14103f13561028f7705044a4901b6ef01461
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.
sys/boot/amd64/Makefile
sys/boot/amd64/boot1.efi/Makefile [new file with mode: 0644]
sys/boot/amd64/boot1.efi/boot1.c [new file with mode: 0644]
sys/boot/common/ufsread.c