#
272461 |
|
02-Oct-2014 |
gjb |
Copy stable/10@r272459 to releng/10.1 as part of the 10.1-RELEASE process.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
271135 |
|
04-Sep-2014 |
emaste |
MFC UEFI loader
This MFC consists of the following SVN revisions: 258741 261568 261603 261668 263115 263117 263968 264078 264087 264088 264092 264095 264115 264132 264208 264261 264262 264263 264319 265028 265057 268974
Detailed commit messages:
r258741: Note that libstand is 32-bit on amd64 and powerpc64
r261568: Build libstand as a 64-bit library on amd64
The 32-bit bootloaders now link against libstand.a in sys/boot/libstand32, so there is no need to force /usr/lib/libstand.a to be 32-bit.
r261603: Don't force efi to a 32-bit build on amd64
r261668: Build libstand as a 64-bit library on ppc64
The 32-bit bootloaders now link against libstand.a in sys/boot/libstand32, so there is no need to force /usr/lib/libstand.a to be 32-bit.
This is equivalent to r261568 for amd64.
r263115: Add amd64 EFI headers
r263117: Connect 64-bit boot ficl to the build
It is not yet used, but this will ensure it doesn't get broken.
r263968: Use EFI types for EFI values (silences warnings).
EFI UINTN is actually a 64-bit type on 64-bit processors.
r264078: Put each source file on a separate line
This will simplify rebasing the amd64 UEFI patch set.
r264087: Build boot/ficl as 64-bit library on amd64
The 32-bit bootloaders on amd64 now use the 32-bit version in ficl32, as is done with libstand32. The native 64-bit ficl will be used by the upcoming UEFI loader.
r264088: Merge efilib changes from projects/uefi
r247216: Add the ability for a device to have an "alias" handle.
r247379: Fix network device registration.
r247380: Adjust our load device when we boot from CD under UEFI.
The process for booting from a CD under UEFI involves adding a FAT filesystem containing your loader code as an El Torito boot image. When UEFI detects this, it provides a block IO instance that points at the FAT filesystem as a child of the device that represents the CD itself. The problem being that the CD device is flagged as a "raw device" while the boot image is flagged as a "logical partition". The existing EFI partition code only looks for logical partitions and so the CD filesystem was rendered invisible.
To fix this, check the type of each block IO device. If it's found to be a CD, and thus an El Torito boot image, look up its parent device and add that instead so that the loader will then load the kernel from the CD filesystem. This is done by using the handle for the boot filesystem as an alias.
Something similar to this will be required for booting from other media as well as the loader will live in the EFI system partition, not on the partition containing the kernel.
r247381: Remove a scatalogical debug printf that crept in.
r264092: Add -fPIC for amd64
r264095: Support UEFI booting on amd64 via loader.efi
This is largely the work from the projects/uefi branch, with some additional refinements. This is derived from (and replaces) the original i386 efi implementation; i386 support will be restored later.
Specific revisions of note from projects/uefi:
r247380:
Adjust our load device when we boot from CD under UEFI.
The process for booting from a CD under UEFI involves adding a FAT filesystem containing your loader code as an El Torito boot image. When UEFI detects this, it provides a block IO instance that points at the FAT filesystem as a child of the device that represents the CD itself. The problem being that the CD device is flagged as a "raw device" while the boot image is flagged as a "logical partition". The existing EFI partition code only looks for logical partitions and so the CD filesystem was rendered invisible.
To fix this, check the type of each block IO device. If it's found to be a CD, and thus an El Torito boot image, look up its parent device and add that instead so that the loader will then load the kernel from the CD filesystem. This is done by using the handle for the boot filesystem as an alias.
Something similar to this will be required for booting from other media as well as the loader will live in the EFI system partition, not on the partition containing the kernel.
r246231:
Add necessary code to hand off from loader to an amd64 kernel.
r246335:
Grab the EFI memory map and store it as module metadata on the kernel.
This is the same approach used to provide the BIOS SMAP to the kernel.
r246336:
Pass the ACPI table metadata via hints so the kernel ACPI code can find them.
r246608:
Rework copy routines to ensure we always use memory allocated via EFI.
The previous code assumed it could copy wherever it liked. This is not the case. The approach taken by this code is pretty ham-fisted in that it simply allocates a large (32MB) buffer area and stages into that, then copies the whole area into place when it's time to execute. A more elegant solution could be used but this works for now.
r247214:
Fix a number of problems preventing proper handover to the kernel.
There were two issues at play here. Firstly, there was nothing preventing UEFI from placing the loader code above 1GB in RAM. This meant that when we switched in the page tables the kernel expects to be running on, we are suddenly unmapped and things no longer work. We solve this by making our trampoline code not dependent on being at any given position and simply copying it to a "safe" location before calling it.
Secondly, UEFI could allocate our stack wherever it wants. As it happened on my PC, that was right where I was copying the kernel to. This did not cause happiness. The solution to this was to also switch to a temporary stack in a safe location before performing the final copy of the loaded kernel.
r246231:
Add necessary code to hand off from loader to an amd64 kernel.
r246335:
Grab the EFI memory map and store it as module metadata on the kernel.
This is the same approach used to provide the BIOS SMAP to the kernel.
r246336:
Pass the ACPI table metadata via hints so the kernel ACPI code can find them.
r246608:
Rework copy routines to ensure we always use memory allocated via EFI.
The previous code assumed it could copy wherever it liked. This is not the case. The approach taken by this code is pretty ham-fisted in that it simply allocates a large (32MB) buffer area and stages into that, then copies the whole area into place when it's time to execute. A more elegant solution could be used but this works for now.
r247214:
Fix a number of problems preventing proper handover to the kernel.
There were two issues at play here. Firstly, there was nothing preventing UEFI from placing the loader code above 1GB in RAM. This meant that when we switched in the page tables the kernel expects to be running on, we are suddenly unmapped and things no longer work. We solve this by making our trampoline code not dependent on being at any given position and simply copying it to a "safe" location before calling it.
Secondly, UEFI could allocate our stack wherever it wants. As it happened on my PC, that was right where I was copying the kernel to. This did not cause happiness. The solution to this was to also switch to a temporary stack in a safe location before performing the final copy of the loaded kernel.
r247216:
Use the UEFI Graphics Output Protocol to get the parameters of the framebuffer.
r264115: Fix printf format mismatches
r264132: Connect sys/boot/amd64 to the build
r264208: Do not build the amd64 UEFI loader with GCC
The UEFI loader causes buildworld to fail when building with (in-tree) GCC, due to a typedef redefinition. As it happens the in-tree GCC cannot successfully build the UEFI loader anyhow, as it does not support __attribute__((ms_abi)). Thus, just avoid trying to build it with GCC, rather than disconnecting it from the build until the underlying issue is fixed.
r264261: Correct a variable's type for 64-bit Ficl
FICL_INT is long.
r264262: Fix printf args for 64-bit archs
r264263: Add explicit casts to quiet warnings in libefi
r264319: Fix EFI loader object tree creation on 9.x build hosts
Previously ${COMPILER_TYPE} was checked in sys/boot/amd64, and the efi subdirectory was skipped altogether for gcc (since GCC does not support a required attribute). However, during the early buildworld stages ${COMPILER_TYPE} is the existing system compiler (i.e., gcc on 9.x build hosts), not the compiler that will eventually be used. This caused "make obj" to skip the efi subdirectory. In later build stages ${COMPILER_TYPE} is "clang", and then the efi loader would attempt to build in the source directory.
r265028 (dteske): Disable the beastie menu for EFI console ...
which doesn't support ANSI codes (so things like `at-xy', `clear', and other commands don't work making it impossible to generate a living menu).
r265057 (nwhitehorn): Turn off various fancy instruction sets...
as well as deduplicate some options. This makes the EFI loader build work with CPUTYPE=native in make.conf on my Core i5.
r268974 (sbruno): Supress clang warning for FreeBSD printf %b and %D formats
Relnotes: Yes Sponsored by: The FreeBSD Foundation
|
#
256281 |
|
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
#
223539 |
|
25-Jun-2011 |
marius |
As with EFI, OFW and U-Boot etc only compile FDT support on those architectures that actually use it.
|
#
221869 |
|
14-May-2011 |
attilio |
Disconnect sun4v architecture from the three.
Some files keep the SUN4V tags as a code reference, for the future, if any rewamped sun4v support wants to be added again.
Reviewed by: marius Tested by: sbruno Approved by: re
|
#
211679 |
|
22-Aug-2010 |
imp |
MF tbemd: move to using specific architecture makefiles
|
#
209920 |
|
11-Jul-2010 |
nwhitehorn |
Provide support in loader for booting 64-bit PowerPC kernels. Like amd64, 64-bit PowerPC kernels are loaded by a 32-bit loader, since nearly all powerpc64 firmwares execute in 32-bit mode.
|
#
208539 |
|
25-May-2010 |
raj |
Bring a missing FDT piece (omitted in the previous commit).
|
#
199714 |
|
23-Nov-2009 |
rnoland |
Create a seperate ZFS enabled loader.
This adds zfsloader which will be called by zfsboot/gptzfsboot code rather than the tradional loader. This eliminates the need to set the LOADER_ZFS_SUPPORT variable in order to get a ZFS enabled loader.
Note however, that you must reinstall your bootcode (zfsboot/gptzfsboot) in order for the boot process to use the new loader.
New installations will no longer be required to build a ZFS enabled loader for a working ZFS boot system. Installing zfsboot/gptzfsboot is sufficient for acknowledging the use of CDDL code and therefore the ZFS enabled loader.
Based on a previous patch from jhb@
Reviewed by: jhb@ MFC after: 2 weeks
|
#
188825 |
|
19-Feb-2009 |
imp |
Enable building of ficl on MIPS. It compiles, but needs more testing.
|
#
186073 |
|
14-Dec-2008 |
nyan |
Disconnect the efi from pc98. It's not needed.
|
#
185029 |
|
17-Nov-2008 |
pjd |
Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.
This bring huge amount of changes, I'll enumerate only user-visible changes:
- Delegated Administration
Allows regular users to perform ZFS operations, like file system creation, snapshot creation, etc.
- L2ARC
Level 2 cache for ZFS - allows to use additional disks for cache. Huge performance improvements mostly for random read of mostly static content.
- slog
Allow to use additional disks for ZFS Intent Log to speed up operations like fsync(2).
- vfs.zfs.super_owner
Allows regular users to perform privileged operations on files stored on ZFS file systems owned by him. Very careful with this one.
- chflags(2)
Not all the flags are supported. This still needs work.
- ZFSBoot
Support to boot off of ZFS pool. Not finished, AFAIK.
Submitted by: dfr
- Snapshot properties
- New failure modes
Before if write requested failed, system paniced. Now one can select from one of three failure modes: - panic - panic on write error - wait - wait for disk to reappear - continue - serve read requests if possible, block write requests
- Refquota, refreservation properties
Just quota and reservation properties, but don't count space consumed by children file systems, clones and snapshots.
- Sparse volumes
ZVOLs that don't reserve space in the pool.
- External attributes
Compatible with extattr(2).
- NFSv4-ACLs
Not sure about the status, might not be complete yet.
Submitted by: trasz
- Creation-time properties
- Regression tests for zpool(8) command.
Obtained from: OpenSolaris
|
#
183878 |
|
14-Oct-2008 |
raj |
Initial support of loader(8) for ARM machines running U-Boot.
This uses the common U-Boot support lib (sys/boot/uboot, already used on FreeBSD/powerpc), and assumes the underlying firmware has the modern API for stand-alone apps enabled in the config (CONFIG_API).
Only netbooting is supported at the moment.
Obtained from: Marvell, Semihalf
|
#
183149 |
|
18-Sep-2008 |
obrien |
No FORTH for MIPS.
|
#
180733 |
|
23-Jul-2008 |
imp |
Only descend into the boot directory for the architecture if it actually exists and is a directory or symlink to a directory.
|
#
176371 |
|
17-Feb-2008 |
marcel |
Hook the U-Boot library up to the build.
|
#
164010 |
|
05-Nov-2006 |
marcel |
Major rework of the ia64 loaders. The two primary objectives are: 1. Make libefi portable by removing ia64 specific code and build it on i386 and amd64 by default to prevent regressions. These changes include fixes and improvements over previous code to establish or improve APIs where none existed or when the amount of kluging was unacceptably high. 2. Increase the amount of sharing between the efi and ski loaders to improve maintainability of the loaders and simplify making changes to the loader-kernel handshaking in the future.
The version of the efi and ski loaders are now both changed to 1.2 as user visible improvements and changes have been made.
|
#
163145 |
|
09-Oct-2006 |
kmacy |
add sun4v support to the sparc64 boot loader
Approved by: rwatson (mentor) Reviewed by: jmg Tested by: kris, dwhite, and jmg
|
#
161157 |
|
10-Aug-2006 |
imp |
Don't need to special case arm here anymore
|
#
159744 |
|
18-Jun-2006 |
imp |
Don't descend into ${MACHINE} on the arm platforms.
|
#
158467 |
|
12-May-2006 |
jhb |
Remove more Alpha bits from the boot code including fixing several stale comments.
|
#
156813 |
|
17-Mar-2006 |
ru |
Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html
The src.conf(5) manpage is to follow in a few days.
Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine)
|
#
139123 |
|
21-Dec-2004 |
ru |
NOFORTH -> NO_FORTH
|
#
138001 |
|
23-Nov-2004 |
marcel |
Visit the efi subdirectory before we visit the machine-specific subdirectory so that the library built there can be used by the machine specific boot code.
|
#
133862 |
|
16-Aug-2004 |
marius |
Instead of "OpenFirmware", "openfirmware", etc. use the official spelling "Open Firmware" from IEEE 1275 and OpenFirmware.org (no pun intended).
Ok'ed by: tmm
|
#
129269 |
|
15-May-2004 |
cognet |
Try harder not to compile anything in sys/boot for arm. I wonder how buildworld ever worked for me...
|
#
129218 |
|
14-May-2004 |
cognet |
Do not attempt to build anything in sys/boot for arm.
|
#
125556 |
|
07-Feb-2004 |
ru |
Untangle building of AMD64 boot code.
Tested on: amd64 (sledge)
|
#
125117 |
|
27-Jan-2004 |
schweikh |
Sync with Oxford Dictionary. Style (add missing full stops) while I'm here.
|
#
123377 |
|
10-Dec-2003 |
grehan |
Enable FICL build on powerpc
|
#
118982 |
|
16-Aug-2003 |
obrien |
FICL doesn't build on PowerPC yet, so disable.
|
#
116864 |
|
26-Jun-2003 |
peter |
Build on amd64. Yes, I know this isn't particularly nice.
|
#
114343 |
|
30-Apr-2003 |
peter |
We use i386 boot code on AMD64.
|
#
110783 |
|
13-Feb-2003 |
benno |
Don't bother to build ficl if NOFORTH is defined.
|
#
99539 |
|
07-Jul-2002 |
jake |
Build ficl on sparc64 fwiw. It doesn't work.
|
#
96269 |
|
09-May-2002 |
obrien |
Ficl doesn't build on sparc64.
|
#
93307 |
|
27-Mar-2002 |
obrien |
sparc64 is an ofw consumer.
|
#
85477 |
|
25-Oct-2001 |
ru |
Just use ${MACHINE}, it's already special-casing pc98.
|
#
83365 |
|
12-Sep-2001 |
dfr |
Build ficl on all architectures.
|
#
77943 |
|
09-Jun-2001 |
dfr |
First approximation of an ia64 EFI loader. Not functional.
|
#
74798 |
|
25-Mar-2001 |
obrien |
Turn off building the ARC loader. I don't know of anyone currently working on advancing this WIP.
|
#
68546 |
|
10-Nov-2000 |
benno |
OpenFirmware/PowerPC loader, part 2. This brings the loader up to the point where I can compile it under NetBSD/macppc and have it boot, interact and talk to NFS servers.
sys/boot/ofw/libofw/main.c has been deleted (it has no revision history) and replaced with sys/boot/ofw/common/main.c
Reviewed by: obrien
|
#
53181 |
|
15-Nov-1999 |
marcel |
PC-98 has MACHINE_ARCH=i386 and MACHINE=pc98. Make it a special case. This should fix the breakage reported by nyan.
|
#
53152 |
|
14-Nov-1999 |
marcel |
${MACHINE} -> ${MACHINE_ARCH}
All Makefiles now use MACHINE_ARCH for the target architecture. Unification is required for cross-building.
Tags added to: sys/boot/Makefile sys/boot/arc/loader/Makefile sys/kern/Makefile usr.bin/cpp/Makefile usr.bin/gcore/Makefile usr.bin/truss/Makefile
usr.bin/gcore/Makefile: fixed typo: MACHINDE -> MACHINE_ARCH
|
#
49192 |
|
28-Jul-1999 |
se |
Activate "arc" (ARC / AlphaBIOS loader) on Alpha.
|
#
43561 |
|
03-Feb-1999 |
kato |
PC98 version of new boot loader. Because boot2 has not yet ported, files in boot2 directory are copies from legacy biosboot.
Submitted by: IMAI Takeshi <take-i@ceres.dti.ne.jp>
|
#
40843 |
|
03-Nov-1998 |
msmith |
Add the Ficl (Forth Inspired Command Language) interpreter. If all goes well, this will allow us to manage bloat in the loader by using a bytecoded HLL rather than lots of C code. It also offers an opportunity for vendors or others with special applications to significantly customise the boot process without having to commit to a divergent code branch.
This early commit is to allow others to experiment with the most effective mechanisms for integrating FICL with the loader as it currently stands.
Ficl is distributed with the following license conditions:
"Ficl is freeware. Use it in any way that you like, with the understanding that the code is not supported."
All source files contain authorship attributions.
Obtained from: John Sadler (john_sadler@alum.mit.edu)
|
#
38466 |
|
21-Aug-1998 |
msmith |
This commit was generated by cvs2svn to compensate for changes in r38465, which included commits to RCS files with non-trunk default branches.
|
#
38465 |
|
21-Aug-1998 |
msmith |
This is the new unified bootstrap, sometimes known previously as the 'three-stage' bootstrap. There are a number of caveats with the code in its current state: - The i386 bootstrap only supports booting from a floppy. - The kernel and kld do not yet know how to deal with the extended information and module summary passed in. - PnP-based autodetection and demand loading of modules is not implemented. - i386 ELF kernel loading is not ready yet. - The i386 bootstrap is loaded via an ugly blockmap.
On the alpha, both net- and disk-booting (SRM console machines only) is supported. No blockmaps are used by this code.
Obtained from: Parts from the NetBSD/i386 standalone bootstrap.
|