diff --git a/stand/efi/fdt/efi_fdt.c b/stand/efi/fdt/efi_fdt.c index 8703aedc228..cf3cbabee72 100644 --- a/stand/efi/fdt/efi_fdt.c +++ b/stand/efi/fdt/efi_fdt.c @@ -52,10 +52,16 @@ fdt_platform_load_dtb(void) return (1); printf("Using DTB provided by EFI at %p.\n", hdr); - fdt_load_dtb_overlays(NULL); return (0); } +void +fdt_platform_load_overlays(void) +{ + + fdt_load_dtb_overlays(NULL); +} + void fdt_platform_fixups(void) { diff --git a/stand/fdt/fdt_loader_cmd.c b/stand/fdt/fdt_loader_cmd.c index 38ac9876774..87b587275bc 100644 --- a/stand/fdt/fdt_loader_cmd.c +++ b/stand/fdt/fdt_loader_cmd.c @@ -522,6 +522,7 @@ fdt_setup_fdtp() if (fdt_load_dtb(bfp->f_addr) == 0) { printf("Using DTB from loaded file '%s'.\n", bfp->f_name); + fdt_platform_load_overlays(); return (0); } } @@ -531,12 +532,15 @@ fdt_setup_fdtp() if (fdt_load_dtb_addr(fdt_to_load) == 0) { printf("Using DTB from memory address %p.\n", fdt_to_load); + fdt_platform_load_overlays(); return (0); } } - if (fdt_platform_load_dtb() == 0) + if (fdt_platform_load_dtb() == 0) { + fdt_platform_load_overlays(); return (0); + } /* If there is a dtb compiled into the kernel, use it. */ if ((va = fdt_find_static_dtb()) != 0) { diff --git a/stand/fdt/fdt_platform.h b/stand/fdt/fdt_platform.h index 8930340053c..0528dd0f033 100644 --- a/stand/fdt/fdt_platform.h +++ b/stand/fdt/fdt_platform.h @@ -51,6 +51,7 @@ int fdt_setup_fdtp(void); /* The platform library needs to implement these functions */ int fdt_platform_load_dtb(void); +void fdt_platform_load_overlays(void); void fdt_platform_fixups(void); #endif /* FDT_PLATFORM_H */ diff --git a/stand/powerpc/kboot/kbootfdt.c b/stand/powerpc/kboot/kbootfdt.c index 67a2082eddd..14bc94326fe 100644 --- a/stand/powerpc/kboot/kbootfdt.c +++ b/stand/powerpc/kboot/kbootfdt.c @@ -176,6 +176,12 @@ fdt_platform_load_dtb(void) return (0); } +void +fdt_platform_load_overlays(void) +{ + +} + void fdt_platform_fixups(void) { diff --git a/stand/powerpc/ofw/ofwfdt.c b/stand/powerpc/ofw/ofwfdt.c index 493bae7576f..fa0ff4165f4 100644 --- a/stand/powerpc/ofw/ofwfdt.c +++ b/stand/powerpc/ofw/ofwfdt.c @@ -197,6 +197,12 @@ fdt_platform_load_dtb(void) return (0); } +void +fdt_platform_load_overlays(void) +{ + +} + void fdt_platform_fixups(void) { diff --git a/stand/uboot/fdt/uboot_fdt.c b/stand/uboot/fdt/uboot_fdt.c index 417ec4aeb6e..21e23931c71 100644 --- a/stand/uboot/fdt/uboot_fdt.c +++ b/stand/uboot/fdt/uboot_fdt.c @@ -103,11 +103,16 @@ fdt_platform_load_dtb(void) } exit: - if (rv == 0) - fdt_load_dtb_overlays(ub_env_get("fdt_overlays")); return (rv); } +void +fdt_platform_load_overlays(void) +{ + + fdt_load_dtb_overlays(ub_env_get("fdt_overlays")); +} + void fdt_platform_fixups(void) {