public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@sigma-star.at>
To: Tom Rini <trini@konsulko.com>,
	Richard Weinberger <richard@nod.at>,
	upstream@sigma-star.at
Cc: u-boot@lists.denx.de, ddrokosov@salutedevices.com,
	sjg@chromium.org, tharvey@gateworks.com,
	ilias.apalodimas@linaro.org, kojima.masahisa@socionext.com,
	upstream+uboot@sigma-star.at,
	Sam Protsenko <semen.protsenko@linaro.org>
Subject: Re: [RFC, PATCH] fdt: Make sure there is no stale initrd left
Date: Wed, 09 Jul 2025 08:24:20 +0200	[thread overview]
Message-ID: <1752760284.mgMEAqHVhB@nailgun> (raw)
In-Reply-To: <CAPLW+4kSGfyhd_Bxr+cn=PJV1Zvi2Du5+jLSZSxhqBPZ=PvFow@mail.gmail.com>

On Mittwoch, 9. Juli 2025 00:58 Sam Protsenko wrote:
> fdt_initrd() function (where initrd dts properties are removed) is
> called two times:
> 
> 1. First it's called by EFI boot manager (e.g. as a part of U-Boot
> Standard Boot mechanism) when it's installing FDT:
> 
>     fdt_initrd
>     image_setup_libfdt
>     efi_install_fdt
>     efi_bootmgr_run
>     efi_mgr_boot
> 
> It's already enough for EFI app to malfunction. But then it's also
> called second time:
> 
> 2. From the EFI app, via EFI DT fixup protocol:
> 
>     fdt_initrd
>     image_setup_libfdt
>     efi_dt_fixup
>     struct efi_dt_fixup_protocol efi_dt_fixup_prot = {
>         .fixup = efi_dt_fixup
>     };
> 
> See [2] for specific GBL code which sets those fdt properties and then
> runs DT fixup protocol callback.
> 
> I don't see any way for U-Boot to know if those initrd properties are
> going to be set later by other EFI apps or not. So arguably this patch
> should be reverted. But I might be missing something and maybe there
> are better options to fix that?

I think we need to distinguish two cases:
1. The caller explicitly does not want to have an initramfs. e.g. you run  "bootm addr1 - addr3".
2. The caller does not care. Your case.

Thanks,
//richard

-- 
​​​​​sigma star gmbh | Eduard-Bodem-Gasse 6, 6020 Innsbruck, AUT UID/VAT Nr:
ATU 66964118 | FN: 374287y



  reply	other threads:[~2025-07-09  6:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-29 15:02 [RFC, PATCH] fdt: Make sure there is no stale initrd left Richard Weinberger
2025-06-12 22:15 ` Tom Rini
2025-07-08 22:58   ` Sam Protsenko
2025-07-09  6:24     ` Richard Weinberger [this message]
2025-07-09 17:05       ` Sam Protsenko
2025-07-10 14:40         ` Richard Weinberger
2025-07-10 17:20           ` Sam Protsenko
2025-09-20 23:01             ` Sam Protsenko
2025-10-03 19:09               ` Richard Weinberger
2025-10-03 21:01                 ` Tom Rini
2025-10-04  8:05                   ` Richard Weinberger
2025-10-17 22:08                     ` Tom Rini

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=1752760284.mgMEAqHVhB@nailgun \
    --to=richard@sigma-star.at \
    --cc=ddrokosov@salutedevices.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=kojima.masahisa@socionext.com \
    --cc=richard@nod.at \
    --cc=semen.protsenko@linaro.org \
    --cc=sjg@chromium.org \
    --cc=tharvey@gateworks.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=upstream+uboot@sigma-star.at \
    --cc=upstream@sigma-star.at \
    /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