freebsd-dev/stand
Kyle Evans e9ca5fa5d7 stand/fdt: don't send clobbered FDT to the kernel
If fdt_overlay_apply fails at some stage to apply the overlay to the base,
both the base and overlay may be in an inconsistent state (some fixups
applied, some phandles adjusted, some symbols merged). These can be bad for
a number of reasons, to include user frustration if some fixups applied and
not others. Fail a little safer by making a clean copy of the base FDT for
every overlay that we can simply discard if things go awry.

This also allows us the luxury of simply discarding overlays if we hit some
kind of memory limit or if they're malformed and extremely large for some
reason. We'll now leave a nice error message indicating that some overlays
could not be applied due to size restrictions and we apply what we can.

I note that our overlay implementation has some flaws that might still leave
your system in an unbootable state even if an overlay applies correctly;
please exercise caution in using overlays until we can swap it out for
libfdt's implementation.

Tested on:	BananaPi-M3 (armv7)
Tested on:	Pine64 (aarch64)
Differential Revision:	https://reviews.freebsd.org/D13709
2018-01-15 05:00:26 +00:00
..
arm Move loader help file definitions to being 100% inside of loader.mk. 2017-12-18 04:51:34 +00:00
arm64
common Skip IRELATIVE relocations when loader processes ELF files. 2018-01-11 13:57:30 +00:00
efi Allow this file to be included 2018-01-12 17:21:48 +00:00
fdt stand/fdt: don't send clobbered FDT to the kernel 2018-01-15 05:00:26 +00:00
ficl Revert r326855: Cargo cut a fix for the regressions r326585 caused. 2017-12-14 18:57:17 +00:00
ficl32
forth
geli No need to include the userland md5.h, the kernel one is just fine. 2017-12-05 21:37:45 +00:00
i386 Invent new #defines for the biospci_{read,write}_config function to 2018-01-06 06:00:45 +00:00
kshim
libsa Move getsecs() prototype to stand.h from net.h so it can be used 2018-01-12 16:28:51 +00:00
libsa32
man
mips Use <stand.h> instead of <inttypes.h> and <stdio.h> in boot code. 2018-01-08 18:47:35 +00:00
ofw Interact is always called with NULL. Simplify code a little by 2017-12-19 04:05:55 +00:00
powerpc Garbage-collect loader.ps3. It is currently disconnected from the build and 2017-12-30 20:27:13 +00:00
sparc64 Interact is always called with NULL. Simplify code a little by 2017-12-19 04:05:55 +00:00
uboot stand/fdt: Consistently apply fdt_overlays 2017-12-29 18:08:30 +00:00
usb
userboot Interact is always called with NULL. Simplify code a little by 2017-12-19 04:05:55 +00:00
zfs Mark two things as unused (since they are only sometimes used) and 2017-12-03 04:55:33 +00:00
zfs32
defs.mk Fix ubldr. uboot/lib uses defines for the loader. It's part of the 2017-12-29 18:08:35 +00:00
fdt.mk
ficl.mk This path belongs in ficl/Makefile, not the common defines for users 2017-12-08 22:19:41 +00:00
loader.mk Fix ubldr. uboot/lib uses defines for the loader. It's part of the 2017-12-29 18:08:35 +00:00
Makefile
Makefile.amd64 Switch to proper MK_LOADER_GELI tests. 2017-12-04 01:14:12 +00:00
Makefile.arm
Makefile.arm64
Makefile.i386 Switch to proper MK_LOADER_GELI tests. 2017-12-04 01:14:12 +00:00
Makefile.inc Minor flags cleanup 2017-12-02 00:06:58 +00:00
Makefile.mips
Makefile.powerpc
Makefile.sparc64
uboot.mk