Re: loader warnings with LOADER_FDT_SUPPORT

Colin Percival <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]>
On 1/4/26 17:25, Warner Losh wrote:
> On Sun, Jan 4, 2026 at 6:16 PM Colin Percival <[email protected] 
> <mailto:[email protected]>> wrote:
>      > No valid device tree blob found!
>      > WARNING! Trying to fire up the kernel, but no device tree blob found!
> 
>     Since many systems legitimately don't have DTBs, can we remove this warning
>     and/or make it conditional on some check as to whether we think a DTB might
>     be needed?
> 
> diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c
> index 67b36313c26f..e43eebb4bd5c 100644
> --- a/stand/efi/loader/bootinfo.c
> +++ b/stand/efi/loader/bootinfo.c
> @@ -432,9 +432,12 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t 
> *kernendp, bool exit_bs)
>   #if defined(LOADER_FDT_SUPPORT)
>          if (dtb_size)
>                  file_addmetadata(kfp, MODINFOMD_DTBP, sizeof(dtbp), &dtbp);
> -       else
> -               printf("WARNING! Trying to fire up the kernel, but no "
> -                   "device tree blob found!\n");
> +       else {
> +               if (getenv("acpi.revision") == NULL) {
> +                       printf("WARNING! Trying to fire up the kernel, but no "
> +                           "device tree blob found!\n");
> +               }
> +       }
>   #endif
>          file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof(kernend), &kernend);
>   #ifdef MODINFOMD_MODULEP
> 
> ???

Yeah, I was wondering if it was as simple as "if we have ACPI we don't
need FDT".  (There's two printfs to change though.  If people agree with
the concept I'll put together a patch, test, and post it for review.)

-- 
Colin Percival
FreeBSD Release Engineering Lead & EC2 platform maintainer
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.