#
332154 |
|
06-Apr-2018 |
kevans |
MFC r330806-r330815, r330837, r330864, r330883
pc98 changes associated with the named commits are also included in this commit, despite not having been made with the original commits due to its removal in head.
r330806: Minor cosmetic changes.
Make sure { on the same line as struct for all struct *devdesc. Move some type definitions to next to the dv_type define, since that's what sets the d_type.
r330807: We can't use d_opendata for blkio storage.
open_disk uses d_opendata for it's own purpse. We can't store blkio there. Fortunately, blkio is stored elsewhere and we never actually retrieve blkio from d_opendata. Eliminate it as a source of confusion. Eliminate all stores of d_opendata in efi since this layer doesn't own that field.
r330808: Make struct libi386_devdesc match the struct devdesc better
Move data to top and call it d_opendata.
r330809: Use the actual struct devdesc at the start of all *_devdesc structs
The current system is fragile and requires very careful layout of all *_devdesc structures. It also makes it hard to change the base devdesc. Take a page from CAM and put the 'header' in all the derived classes and adjust the code to match.
For OFW, move the iHandle h_handle out of a slot conflicting with d_opendata. Due to quirks in the alignment rules, this worked. However changing the code to use d_opendata storage now that it's a pointer is hard, so just have a separate field for it.
All other cleanups were to make the *_devdesc structures match where they'd taken some liberties that were none-the-less compatible enough to work.
r330810: Remove d_type from devdesc. It's not needed as we can fetch it from d_dev->dv_type when we need it.
r330811: GC unused routines.
Sponsored by: Netflix
r330812: Use the one-line-per-file pattern here, and sort the file names.
Sponsored by: Netflix
r330813: Move the env convenience routines out of boot1.c.
These routines are more generally useful. Even though boot1 is on its way out, it's better to make these common during the transition than copy them.
r330814: Star BootCurrent entry when booting.
Sponsored by: Netflix
r330815: Print the load and device path as well as BootCurrent and BootOrder
Sponsored by: Netflix
r330837: biosdisk.c should not set d_opendata.
Same as 330807, d_opendata is owned by open_disk and we should not set it.
M stand/i386/libi386/biosdisk.c
r330864: Prefer uintXX_t to u_intXX_t
A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines. With consistency a great soul has simply nothing to do. -- Ralph Waldo Emerson
r330883: Fix typo that misteriously passes compilation.
|
#
329145 |
|
12-Feb-2018 |
kevans |
MFC r325834,r325997,326502: Move sys/boot to stand/
This is effectively a direct commit to stable/11, due to differences between stable/11 and head. Changes to DTS in sys/boot/fdt/dts were often accompanied by kernel changes. Many of these were also risc-v updates that likely had many more dependencies to MFC.
Because of this, sys/boot/fdt/dts remains as-is while everything else in sys/boot relocates to stand/.
r325834: Move sys/boot to stand. Fix all references to new location
r325997: Remove empty directories.
r326502: Document the sys/boot -> stand move in hier.7 and the top-level README. |
#
302408 |
|
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
277215 |
|
15-Jan-2015 |
royger |
loader: implement multiboot support for Xen Dom0
Implement a subset of the multiboot specification in order to boot Xen and a FreeBSD Dom0 from the FreeBSD bootloader. This multiboot implementation is tailored to boot Xen and FreeBSD Dom0, and it will most surely fail to boot any other multiboot compilant kernel.
In order to detect and boot the Xen microkernel, two new file formats are added to the bootloader, multiboot and multiboot_obj. Multiboot support must be tested before regular ELF support, since Xen is a multiboot kernel that also uses ELF. After a multiboot kernel is detected, all the other loaded kernels/modules are parsed by the multiboot_obj format.
The layout of the loaded objects in memory is the following; first the Xen kernel is loaded as a 32bit ELF into memory (Xen will switch to long mode by itself), after that the FreeBSD kernel is loaded as a RAW file (Xen will parse and load it using it's internal ELF loader), and finally the metadata and the modules are loaded using the native FreeBSD way. After everything is loaded we jump into Xen's entry point using a small trampoline. The order of the multiboot modules passed to Xen is the following, the first module is the RAW FreeBSD kernel, and the second module is the metadata and the FreeBSD modules.
Since Xen will relocate the memory position of the second multiboot module (the one that contains the metadata and native FreeBSD modules), we need to stash the original modulep address inside of the metadata itself in order to recalculate its position once booted. This also means the metadata must come before the loaded modules, so after loading the FreeBSD kernel a portion of memory is reserved in order to place the metadata before booting.
In order to tell the loader to boot Xen and then the FreeBSD kernel the following has to be added to the /boot/loader.conf file:
xen_cmdline="dom0_mem=1024M dom0_max_vcpus=2 dom0pvh=1 console=com1,vga" xen_kernel="/boot/xen"
The first argument contains the command line that will be passed to the Xen kernel, while the second argument is the path to the Xen kernel itself. This can also be done manually from the loader command line, by for example typing the following set of commands:
OK unload OK load /boot/xen dom0_mem=1024M dom0_max_vcpus=2 dom0pvh=1 console=com1,vga OK load kernel OK load zfs OK load if_tap OK load ... OK boot
Sponsored by: Citrix Systems R&D Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D517
For the Forth bits: Submitted by: Julien Grall <julien.grall AT citrix.com>
|
#
199806 |
|
25-Nov-2009 |
trasz |
Be nice, don't use the f-word.
|
#
163708 |
|
26-Oct-2006 |
ru |
Adopt comments borrowed from aout_freebsd.c.
|
#
162814 |
|
29-Sep-2006 |
ru |
Fix most of the WARNS=2 warnings.
|
#
134459 |
|
29-Aug-2004 |
iedowse |
Add the loader side of support for preloading ELF relocatable object format modules, which are currently only used on the amd64 platform. This initial implementation just parses enough of the module to allow it to extract dependencies and load all the bits into the right place in memory, so the kernel must still do the full relocation and linking. The details of the loaded sections are passed to the kernel by supplying a copy of the ELF section header table as module metadata with the MODINFOMD_SHDR tag.
|
#
119482 |
|
25-Aug-2003 |
obrien |
Use __FBSDID(). Also some minor copyright style cleanups.
|
#
114920 |
|
11-May-2003 |
peter |
For amd64 kernels, repeat the 1GB mapping over the entire address space instead of just at 0GB and 1GB marks. This gives more flexibility for the choice of KERNBASE.
Approved by: re (amd64 stuff)
|
#
114379 |
|
01-May-2003 |
peter |
Enable the i386 loader to load and run an amd64 kernel. If this puts things over floppy size limits, I can exclude it for release builds or something like that. Most of the changes are to get the load_elf.c file into a seperate elf32_ or elf64_ namespace so that you can have two ELF loaders present at once. Note that for 64 bit kernels, it actually starts up the kernel already in 64 bit mode with paging enabled. This is really easy because we have a known minimum feature set.
Of note is that for amd64, we have to pass in the bios int 15 0xe821 memory map because once in long mode, you absolutely cannot make VM86 calls. amd64 does not use 'struct bootinfo' at all. It is a pure loader metadata startup, just like sparc64 and powerpc. Much of the infrastructure to support this was adapted from sparc64.
|
#
113083 |
|
04-Apr-2003 |
phk |
Libdisk does not need to include <sys/diskslice.h> any more.
Move the remaining bits of <sys/diskslice.h> to <i386/include/bootinfo.h>
Move i386/pc98 specific bits from <sys/reboot.h> to <i386/include/bootinfo.h> as well.
Adjust includes in sys/boot accordingly.
|
#
64187 |
|
03-Aug-2000 |
jhb |
Cleanup warnings. Most of these are signed/unsigned warnings, as well as some added const's.
|
#
61659 |
|
14-Jun-2000 |
ps |
Delay calling the device cleanup routines until the absolute last moment. We were cleaning up after PXE too early and the module dependancy code would not be able to load any files if it needed too.
|
#
59854 |
|
01-May-2000 |
bp |
Update loader logic to distinguish modules vs. files. Add support for module metadata. The old way of dependancy handling will be supported for a while.
Reviewed by: peter
|
#
50477 |
|
28-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
40145 |
|
09-Oct-1998 |
peter |
Turn symbol table info passing back on, although it's probably not particularly useful in this form. KLD can deal with it much better. setenv kernelname moved earlier.
|
#
39960 |
|
04-Oct-1998 |
msmith |
Don't include ELF symbol information yet - it causes the ELF DDB to explode.
|
#
39943 |
|
04-Oct-1998 |
msmith |
biosdisk.c Allocate space for, and copy, NDOSPART slice entries from the MBR, not just one. Add some extra debugging while we're at it.
elf_freebsd.c Initialise the symbol table start/end pointers in case we don't have them.
|
#
39902 |
|
02-Oct-1998 |
msmith |
Consolidate the bootinfo-loading code, greatly simplifying the _exec functions.
|
#
39887 |
|
02-Oct-1998 |
peter |
First shot at loading elf symbols. Things are a bit strange because of the ..umm.. "wierd" way binutils lays out the file. The section headers are nearly at the end of the file and this is a problem when loading from a .gz file which can't seek backwards (or has a limited reverse seek, ~2K from memory).
This is intended to be compatable with the ddb/db_elf.c code and the alpha/libalpha/elf_freebsd.c layout. I've studied these (which are NetBSD derived) but did it a bit differently. Naturally the process is similar since it's supposed to end up with the same result.
|
#
39833 |
|
30-Sep-1998 |
peter |
i386 ELF loader startup backend. On an ELF kernel booted with the 3-stage bootblocks, the kernel shows up as the primary module:
[3:24am]~-100# kldstat Id Refs Address Size Name 1 1 0xf0100000 ff00000 /kernel ^^^^ oops.. :-)
Based heavily on aout_freebsd.c. Hmm.. There's so much in common that these could probably be combined and just check the metadata to see which format it is.
|