Commit Graph

6 Commits

Author SHA1 Message Date
Kyle Evans
24888292cd stand/fdt: Make fdt_overlay_apply signature-compatible with libfdt
libfdt will assume a writable fdt overlay blob has been passed in, so make
ours compatible to allow easier review when we try to drop libfdt into
place. overlay from the calling context is writable, making it safe to
simply rip out everything related to copying the overlay blob in
fdt_overlay_apply.

I note here that we still have problems: fdt_overlay_apply, both our version
and libfdt's, may fail and have already clobbered the base fdt to some
extent. Future work will make sure we don't apply a potentially bogus fdt,
instead discarding the base fdt if we had an error.

Reviewed by:	gonzo
Differential Revision:	https://reviews.freebsd.org/D13695
2017-12-31 05:22:26 +00:00
Kyle Evans
d2084bf608 stand/fdt: Swap libfdt include order
libfdt.h should be included before fdt.h, as hinted at by all of libfdt/;
standard include order being libfdt.h, libfdt_env.h, fdt.h.

The current include order also causes problems when libfdt gets updated, as
fdt.h requires some definitions from libfdt.h.

Differential Revision:	https://reviews.freebsd.org/D13688
2017-12-30 06:53:27 +00:00
Kyle Evans
5c0700f692 stand/fdt: Avoid bailout when dtbo has no fixups
In the case of a simple dtbo where fragment uses target-path and the overlay
contains no references, /__fixups__ will not be included by either our dtc
or dtc from ports, but the file still has valid fragments to be applied.

Additional testing found that /__symbols__ might also be omitted if it's
empty, which is not necessarily an error.

Reviewed by:	gonzo, imp
Differential Revision:	https://reviews.freebsd.org/D13663
2017-12-28 21:12:27 +00:00
Kyle Evans
a609d03b04 stand/fdt: Fix loading of multiple fdt_overlays
fdt_load_dtb_overlays was written to unload previous overlay when a new
valid one is come across. fdt_apply_overlays further down is written to
iterate over all .dtbo's currently loaded and apply them one-by-one. Correct
fdt_load_dtb_overlays to stop dropping valid overlays that were previously
loaded and match expectations.

Reviewed by:	gonzo, imp
Differential Revision:	https://reviews.freebsd.org/D13659
2017-12-28 21:09:36 +00:00
Warner Losh
8a4217aacf Move some more common stuff up to Makefile.inc. In particular, the no
simd / no float stuff is centeralized here. Also centralise
-ffreestanding since it is specified everywhere.

This, along with a change to share/mk/bsd.cpu.mk to include -mno-avx2
in CFLAGS_NO_SIMD should fix building for newer machines (eg with
CPUTYPE=haswell) where clang was generating avx2 instructions.

Sponsored by: Netflix
2017-11-20 22:42:17 +00:00
Warner Losh
ca987d4641 Move sys/boot to stand. Fix all references to new location
Sponsored by:	Netflix
2017-11-14 23:02:19 +00:00