path: root/stand/efi/fdt/efi_fdt.c
diff options
authorKyle Evans <kevans@FreeBSD.org>2018-01-28 01:22:15 +0000
committerKyle Evans <kevans@FreeBSD.org>2018-01-28 01:22:15 +0000
commit8a613444b55c080be2128ea63e9102137ee740a7 (patch)
tree256a0ea3d3f1ababca0ac03bc2a939c5722c3875 /stand/efi/fdt/efi_fdt.c
parentc1d2583d9db6a89f348c9093ed596103208475c8 (diff)
stand/fdt: Consolidate overlay handling a little further
This should have been done as part of r327350, but due to lack of foresight it came later. In the different places we apply overlays, we duplicate the bits that check for fdt_overlays in the environment and supplement that with any other places we need to check for overlays to load. These "other places" will be loader specific and are not candidates for consolidation. Provide an fdt_load_dtb_overlays to capture the common logic, allow passing in an additional list of overlays to be loaded. This additional list of overlays is used in practice for ubldr to pull in any fdt_overlays passed to it from U-Boot environment, but it can be used for any other source of overlays. These additional overlays supplement loader.conf(5) fdt_overlays, rather than replace, so that we're not restricted to specifying overlays in only one place. This is a change from previous behavior where loader.conf(5) supplied fdt_overlays would cause us to ignore U-Boot environment, and this seems nonsensical- user should have sufficient control over both of these aspects, or lack of control for good reasons. A knob could be considered in the future to ignore U-Boot supplied overlays, but the supplemental treatment seems like a good start. Reviewed by: imp (earlier version), gonzo (earlier version) Differential Revision: https://reviews.freebsd.org/D13993
Notes: svn path=/head/; revision=328504
Diffstat (limited to 'stand/efi/fdt/efi_fdt.c')
1 files changed, 1 insertions, 6 deletions
diff --git a/stand/efi/fdt/efi_fdt.c b/stand/efi/fdt/efi_fdt.c
index 5fcb6ad1588b..42d70a2c330b 100644
--- a/stand/efi/fdt/efi_fdt.c
+++ b/stand/efi/fdt/efi_fdt.c
@@ -53,12 +53,7 @@ fdt_platform_load_dtb(void)
return (1);
printf("Using DTB provided by EFI at %p.\n", hdr);
- s = getenv("fdt_overlays");
- if (s != NULL && *s != '\0') {
- printf("Loading DTB overlays: '%s'\n", s);
- fdt_load_dtb_overlays(s);
- }
+ fdt_load_dtb_overlays(NULL);
return (0);