U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Carlo Caione <ccaione@baylibre.com>
To: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: u-boot@lists.u-boot-project.org,
	Ahmad Fatoum <a.fatoum@barebox.org>,
	 David Lechner <dlechner@baylibre.com>,
	Julien Masson <jmasson@baylibre.com>,
	 Vitor Sato Eschholz <vsatoes@baylibre.com>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	 Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
	 Quentin Schulz <quentin.schulz@cherry.de>,
	Marek Vasut <marek.vasut+renesas@mailbox.org>,
	 Johan Jonker <jbx6244@gmail.com>,
	Jonas Karlman <jonas@kwiboo.se>, Randolph Sapp <rs@ti.com>,
	Daniel Golle <daniel@makrotopia.org>,
	James Hilliard <james.hilliard1@gmail.com>,
	 Aristo Chen <aristo.chen@canonical.com>,
	Peng Fan <peng.fan@nxp.com>, Vincent Jardin <vjardin@free.fr>,
	Peter Robinson <pbrobinson@gmail.com>
Subject: Re: [PATCH v3 4/5] efi_loader: bootmgr: install the firmware-owned devicetree
Date: Tue, 8 Sep 2026 11:09:21 +0200	[thread overview]
Message-ID: <ap_PgbRzwImsNwO4@macbook> (raw)
In-Reply-To: <CAC_iWjKrYxidFNW9MWuKT2DKynD4OSirA-jprGQ=NJYUxPGFkQ@mail.gmail.com>

On Tue, Sep 08, 2026 at 11:37:43 +0100, Ilias Apalodimas wrote:
> Hi Carlo,

Hello Ilias,
 
> On Thu, 3 Sept 2026 at 16:10, Carlo Caione <ccaione@baylibre.com> wrote:
> 
> > SystemReady DeviceTree can boot through the UEFI boot manager without
> > going through the per-device EFI bootmeth. Use firmware_fdt_stage() here
> > as well so both EFI launch paths install the same firmware-owned
> > devicetree.

[...]
> >         if (!IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE)) {
> > +               if (!fdt) {
> > +                       ulong fdt_addr = env_get_hex("fdt_addr_r", 0);
> > +                       int err;
> >
> +
> >
> 
> Any reason we are doing the _hex variant instead of env_get? Don't we want
> to bail out if the env variable isnt defined instead of picking 0x0 ?

We do, but we do that in firmware_fdt_stage() that is returning -EINVAL
before loading or copying the FIT (so we return EFI_DEVICE_ERROR from
this function in the end).

So basically zero is an invalid-address sentinel, never a staging
destination.

> +                       err = firmware_fdt_stage(fdt_addr, &fw_fdt_size,
> > +                                                &fw_fdt_fname);
> > +                       if (!err) {
> > +                               fdt = map_sysmem(fdt_addr, fw_fdt_size);
> > +                       } else if (err != -ENOENT) {
> > +                               log_err("Failed to load firmware
> > devicetree '%s' (err %d)\n",
> > +                                       fw_fdt_fname ? fw_fdt_fname :
> > "fdt.itb", err);
> > +                               ret = EFI_DEVICE_ERROR;
> > +                               goto out;
> > +                       }
> > +               }
> > +
[...]

Ciao,

--
Carlo Caione

  reply	other threads:[~2026-09-08  9:09 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 13:09 [PATCH v3 0/5] firmware-owned devicetree for EBBR / SystemReady DeviceTree Carlo Caione
2026-09-03 13:09 ` [PATCH v3 1/5] efi_loader: bootmgr: preserve a passed devicetree Carlo Caione
2026-09-28 18:45   ` Heinrich Schuchardt
2026-09-28 20:33     ` Carlo Caione
2026-09-28 22:00       ` E Shattow
2026-10-07  9:30         ` Carlo Caione
2026-09-28 22:10       ` Heinrich Schuchardt
2026-09-03 13:09 ` [PATCH v3 2/5] boot: add a firmware-owned devicetree source Carlo Caione
2026-09-28 17:12   ` Simon Glass
2026-09-03 13:09 ` [PATCH v3 3/5] bootmeth: efi: use the firmware-owned devicetree Carlo Caione
2026-09-28 17:12   ` Simon Glass
2026-09-03 13:09 ` [PATCH v3 4/5] efi_loader: bootmgr: install " Carlo Caione
2026-09-08  8:37   ` Ilias Apalodimas
2026-09-08  9:09     ` Carlo Caione [this message]
2026-09-08  9:50       ` Ilias Apalodimas
2026-09-08 10:05         ` Carlo Caione
2026-09-28 17:12   ` Simon Glass
2026-09-03 13:09 ` [PATCH v3 5/5] test: boot: add firmware-FDT source tests Carlo Caione
2026-09-28 17:12   ` Simon Glass
2026-09-22  8:05 ` [PATCH v3 0/5] firmware-owned devicetree for EBBR / SystemReady DeviceTree Carlo Caione
2026-09-28 17:14   ` Simon Glass
2026-09-28 17:12 ` [v3, " Simon Glass
2026-09-28 22:10 ` [PATCH v3 " Heinrich Schuchardt
2026-09-28 22:20   ` Heinrich Schuchardt
2026-10-07 12:07     ` Carlo Caione
2026-10-07 12:02   ` Carlo Caione

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ap_PgbRzwImsNwO4@macbook \
    --to=ccaione@baylibre.com \
    --cc=a.fatoum@barebox.org \
    --cc=aristo.chen@canonical.com \
    --cc=daniel@makrotopia.org \
    --cc=dlechner@baylibre.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=james.hilliard1@gmail.com \
    --cc=jbx6244@gmail.com \
    --cc=jmasson@baylibre.com \
    --cc=jonas@kwiboo.se \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=pbrobinson@gmail.com \
    --cc=peng.fan@nxp.com \
    --cc=quentin.schulz@cherry.de \
    --cc=rs@ti.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.u-boot-project.org \
    --cc=vjardin@free.fr \
    --cc=vsatoes@baylibre.com \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox