none Received: by mail-pj1-x102d.google.com with SMTP id 98e67ed59e1d1-34ab8e0df53so13042496a91.3 for ; Sun, 04 Jan 2026 17:25:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1767576352; x=1768181152; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=92RIjK8EhGxdAKqBNfaGtvV/rC3i+03vyggj9wXo3rQ=; b=b/BpTNeBT3YAyOoE9pU19X5Dm3bIrHmiFm1A4MnMgpVoq1YBhDyo1kF5gsYdM1/XoY k5sXGDCjWxH1f5fmeBYJW9c9t0AF8JXixR8RJBuVe1XC6PT+HopNez7tKmsRdhOp2Lv0 hnR4eynLGyZQcrJFBQ34WN+LtYB5iPToiqw1rc/lvUD7w94SGnRYHnXGgU2wMSARoN2J pJ5sJM7xuMtWoTK/nPV85dd3oZODM2VkJ3AmlG/cyVic42tuHtH8qfqIi70DFOsr4Oun yUBaVJnElO+NsUItKJMxpHzIFzeF3/S9oEW73/gKzUd6ZbLsBoUfxyUSSUQjoZ2LsCSJ hLcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767576352; x=1768181152; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=92RIjK8EhGxdAKqBNfaGtvV/rC3i+03vyggj9wXo3rQ=; b=ZR9lReKt/YTgAp6eVGYfbIPyDRO8ouDOtMH764BwwV01F10OL6tiqCY+JSyoXQ/9Ds JJW3YmzppTDNCnnz3sV8Am1cYAnRl3Qv9/Mt1KZPiC5s9kHuLcY4STC5kr/uscyn4dVh FozMFW3JNdZ2uSk8ur0LGBYjGl+1j2oAcQ5vIyQCY/lMM3PXzD54MwsDIZziO93sd2Nx UIbpA5BULfOiiUFMmjmokxLOJSNgTw1HDsAmm1d127Y4N+vRPEMyqMPRKSd5tzay/2z6 yXIFn4b6SKHxWqN7KoInKsfOnkEmxpWXhljvuHm9OZ9PLHFaZ+A6dS+rJjKTfhA/IXS1 VjFQ== X-Gm-Message-State: AOJu0YwBQ5TyUfKwPlYowgTAS9Sv1f2NfTPKafaCs7BBaFdXGKlEnWz2 G7+dBYeV7zo6dOwnuX+e4/MEzL2TCiIn9K0cCQ8ixuevfuysNu5k1+7WQvBANnE5GGNmBcZpRcn 5GhLS92HTRfXV6w7FlvSzPm4qd3gFQlfViKcvnNXJqJejAy9ghSOR5AtQlQ== X-Gm-Gg: AY/fxX7pXymHYSVYuyjxaoTUmk9luhz6LZaHNke/AgwGCKnYpSCpAKHWnja7Ucu6TAM uQBuOAMXBYJc6mAp5aeMwkEpKyssYHlh11ajsd0LuyhHoPMw3jYvSPEJiQAQSv7FZPqQkGTUZcH /8+7watDaapl6OCgb+0tQlMIqozqFAkIxOayEMnJQX3E1uH9JVereh5pR+Z0s3vh9RejqLWc4GJ Pv/zCUWv9t9MQ2IZerPXRjIk7jXo1F/WZ8SIcsJ72NApVIaEdqTVOty9X+cInYPUBvAPsc= X-Google-Smtp-Source: AGHT+IEnt0hZcxyh4a1D47wmpA8Y2xQh7nUp4dim5xqOOaghVHvuVI7MpnaPpPtwPr+XVpFETQze2IXF/bswHV0BRbk= X-Received: by 2002:a17:90b:1f82:b0:340:ff7d:c26 with SMTP id 98e67ed59e1d1-34e921557bamr47179592a91.16.1767576352238; Sun, 04 Jan 2026 17:25:52 -0800 (PST) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@FreeBSD.org MIME-Version: 1.0 References: <9b712dc2-af25-4766-be65-f63b9a347c64@freebsd.org> In-Reply-To: <9b712dc2-af25-4766-be65-f63b9a347c64@freebsd.org> From: Warner Losh Date: Sun, 4 Jan 2026 18:25:41 -0700 X-Gm-Features: AQt7F2pbY6qRO7eAgamFWxfnW1OM_c2TMwM07OIEqf21KahKxg1fIBULeKLcGqs Message-ID: Subject: Re: loader warnings with LOADER_FDT_SUPPORT To: Colin Percival Cc: freebsd-arm@freebsd.org Content-Type: multipart/alternative; boundary="00000000000096bd11064799f07b" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dkxT25hPjz3xhn --00000000000096bd11064799f07b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Jan 4, 2026 at 6:16=E2=80=AFPM Colin Percival wrote: > Hi all, > > The arm64 EFI loader is built with LOADER_FDT_SUPPORT, which is probably > the > correct default, but when the loader has LOADER_FDT_SUPPORT set it emits > some > unnecessarily scary warnings on many systems: > > > 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 warni= ng > and/or make it conditional on some check as to whether we think a DTB mig= ht > be needed? > > In particular since this is the last thing the loader prints, it has sent= a > few people down rabbit holes when the serial console in the loader works > but > the serial console in the kernel doesn't, since they assume this message = is > somehow related to the lack of further console output. > 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") =3D=3D 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 ??? Warner --00000000000096bd11064799f07b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sun, Jan 4, = 2026 at 6:16=E2=80=AFPM Colin Percival <cperciva@freebsd.org> wrote:
Hi all,

The arm64 EFI loader is built with LOADER_FDT_SUPPORT, which is probably th= e
correct default, but when the loader has LOADER_FDT_SUPPORT set it emits so= me
unnecessarily scary warnings on many systems:

> No valid device tree blob found!
> WARNING! Trying to fire up the kernel, but no device tree blob found!<= br>
Since many systems legitimately don't have DTBs, can we remove this war= ning
and/or make it conditional on some check as to whether we think a DTB might=
be needed?

In particular since this is the last thing the loader prints, it has sent a=
few people down rabbit holes when the serial console in the loader works bu= t
the serial console in the kernel doesn't, since they assume this messag= e is
somehow related to the lack of further console output.

diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/boot= info.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= )
=C2=A0#if defined(LOADER_FDT_SUPPORT)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 i= f (dtb_size)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 fil= e_addmetadata(kfp, MODINFOMD_DTBP, sizeof(dtbp), &dtbp);
- =C2=A0 = =C2=A0 =C2=A0 else
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pr= intf("WARNING! Trying to fire up the kernel, but no "
- =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "device tree = blob found!\n");
+ =C2=A0 =C2=A0 =C2=A0 else {
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (getenv("acpi.revision") = =3D=3D NULL) {
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 printf("WARNING! Trying to fire up the kernel, b= ut no "
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "device tree blob found!\n");<= br>+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
+ =C2=A0 =C2=A0 = =C2=A0 }
=C2=A0#endif
=C2=A0 =C2=A0 =C2=A0 =C2=A0 file_addmetadata(kf= p, MODINFOMD_KERNEND, sizeof(kernend), &kernend);
=C2=A0#ifdef MODIN= FOMD_MODULEP

???

Warner=C2= =A0
--00000000000096bd11064799f07b--