Re: loader warnings with LOADER_FDT_SUPPORT
Warner Losh <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.arm |
|---|---|
| Message-ID | <CANCZdfopszyJwTih=12+ZAb1spnemm5hJF93YD-9DtX4nJDdgA@mail.gmail.com> |
On Sun, Jan 4, 2026 at 6:31 PM Colin Percival <[email protected]> wrote: > 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.) > It's complicated by the fact that sometimes you need both (the LinuxBoot interface requires both). So we have to be careful. We want to warn when we have NEITHER and I think the above does that. But BOTH is OK, even though the kernel side of both is still buggy. Warner