freebsd-dev/sys/boot/common
Ian Lepore 45f8d9f9a8 An ARM kernel can be loaded at any 2MB boundary, make ubldr aware of that.
Previously, ubldr would use the virtual addresses in the elf headers by
masking off the high bits and assuming the result was a physical address
where the kernel should be loaded.  That would sometimes discard
significant bits of the physical address, but the effects of that were
undone by archsw copy code that would find a large block of memory and
apply an offset to the source/dest copy addresses.  The result was that
things were loaded at a different physical address than requested by the
higher code layers, but that worked because other adjustments were applied
later (such as when jumping to the entry point).  Very confusing, and
somewhat fragile.

Now the archsw copy routines are just simple copies, and instead
archsw.arch_loadaddr is implemented to choose a load address.  The new
routine uses some of the code from the old offset-translation routine to
find the largest block of ram, but it excludes ubldr itself from that
range, and also excludes   If ubldr splits the largest block of ram in
two, the kernel is loaded into the bottom of whichever resulting block is
larger.

As part of eliminating ubldr itself from the ram ranges, export the heap
start/end addresses in a pair of new global variables.

This change means that the virtual addresses in the arm kernel elf headers
now have no meaning at all, except for the entry point address.  There is
an implicit assumption that the entry point is in the first text page, and
that the address in the the header can be turned into an offset by masking
it with PAGE_MASK.  In the future we can link all arm kernels at a virtual
address of 0xC0000000 with no need to use any low-order part of the
address to influence where in ram the kernel gets loaded.
2015-05-17 19:59:05 +00:00
..
bcache.c
boot.c zfs boot: try to set vfs.root.mountfrom from currdev as a fallback 2012-05-12 09:07:41 +00:00
bootstrap.h loader: implement multiboot support for Xen Dom0 2015-01-15 16:27:20 +00:00
commands.c
console.c Add a new loader(8) variable, twiddle_divisor, allowing control over the 2014-12-22 22:07:22 +00:00
crc32.c Remove second consts in r233288 in order to appease C++ compilers. 2012-03-26 18:22:04 +00:00
crc32.h
dev_net.c
dev_net.h
devopen.c
disk.c Rework bootparttest to use more code from sys/boot. 2014-10-05 06:04:47 +00:00
disk.h Fix comment. 2014-10-08 12:33:31 +00:00
gpt.c Read backup GPT header from the last LBA only when primary GPT header and 2012-04-12 12:37:53 +00:00
gpt.h
help.common
install.c Change the order of the arguments to file_loadraw(). They were swapped 2014-11-01 18:51:48 +00:00
interp_backslash.c
interp_forth.c Give loaders more control over the Forth initialization process. In 2014-07-27 16:12:51 +00:00
interp_parse.c
interp.c Give loaders more control over the Forth initialization process. In 2014-07-27 16:12:51 +00:00
isapnp.c
isapnp.h
load_elf32_obj.c Add support for FreeBSD/i386 guests under bhyve. 2014-02-05 04:39:03 +00:00
load_elf32.c Add support for FreeBSD/i386 guests under bhyve. 2014-02-05 04:39:03 +00:00
load_elf64_obj.c
load_elf64.c
load_elf_obj.c loader: implement multiboot support for Xen Dom0 2015-01-15 16:27:20 +00:00
load_elf.c An ARM kernel can be loaded at any 2MB boundary, make ubldr aware of that. 2015-05-17 19:59:05 +00:00
loader.8 mdoc: remove EOL whitespace. 2014-12-29 13:50:59 +00:00
ls.c
Makefile.inc Add support for arm64 to loader.efi and boot1.efi 2015-04-14 13:55:01 +00:00
md.c Small change in header order to allow this to compile. 2015-04-27 07:38:46 +00:00
merge_help.awk
misc.c In alloc_pread() and kern_pread(), print errors only when DEBUG is 2014-11-05 04:18:41 +00:00
module.c loader: implement multiboot support for Xen Dom0 2015-01-15 16:27:20 +00:00
newvers.sh
panic.c
part.c Add a bit more debug messages. 2014-10-05 06:00:22 +00:00
part.h Create the interface to work with various partition tables from the 2012-08-05 11:29:44 +00:00
pnp.c
reloc_elf32.c
reloc_elf64.c
reloc_elf.c Implement elfN(reloc) for powerpc. With this change the kernel is now able to 2012-09-21 18:21:31 +00:00
self_reloc.c The self-relocation code is not efi-specific, move it to boot/common. 2015-05-10 13:24:26 +00:00
ufsread.c Apparently some of the i386 boot blocks are so close to full that adding 2014-04-13 14:50:52 +00:00
util.c strncmp for boot code: fix an off by one error 2013-04-05 09:14:30 +00:00
util.h
zfsloader.8 Misc mdoc fixes: 2014-11-23 21:00:00 +00:00