From: Sumit Garg <sumit.garg@kernel.org>
To: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
Cc: trini@konsulko.com, casey.connolly@linaro.org,
neil.armstrong@linaro.org, xypron.glpk@gmx.de,
ilias.apalodimas@linaro.org,
varadarajan.narayanan@oss.qualcomm.com, adrianox@gmail.com,
paul.liu@linaro.org, sjg@chromium.org,
wolfgang.wallner@at.abb.com, javier.tia@linaro.org,
u-boot-qcom@groups.io, u-boot@lists.denx.de
Subject: Re: [RFC PATCH v1 0/3] efi_loader: Introduce platform hook for FDT selection
Date: Thu, 8 Jan 2026 17:40:34 +0530 [thread overview]
Message-ID: <aV-eumhHFeCxceZg@sumit-xelite> (raw)
In-Reply-To: <20260106122134.2047864-1-aswin.murugan@oss.qualcomm.com>
Hi Ashwin,
On Tue, Jan 06, 2026 at 05:51:31PM +0530, Aswin Murugan wrote:
> This RFC patch series introduces a weak function hook to allow platforms to
> provide custom device tree selection logic while keeping common EFI
> loader code generic.
>
> Background:
> Currently, EFI loader supports loading a single DTB file.
As pointed to by folks in the other thread, U-Boot allows to select a
DTB from all the DTBs bundled by the OS in EFI system partition. You can
see the Debian example here for DTBs packaging [1].
> Qualcomm platforms require special multi-DTB selection logic that:
> - Reads hardware information from SMEM (Shared Memory)
> - Selects the appropriate device tree from a combined DTB file based on:
> * Platform ID (SoC variant)
> * Board variant and subtype
> * PMIC configuration
> * SoC revision.
I think here you are presenting an incomplete picture to the U-Boot
community. You need to show firstly how the multi-DTB FIT image is
prepared first which is described here [2].
From U-Boot point of view, I think this DTB selection logic is useful
which can be used to configure: $fdtfile, see API: configure_env() in
arch/arm/mach-snapdragon/board.c.
However, does this solution also cover OEMs based boards alongside Qcom
reference boards?
>
> Solution:
> Introduce `efi_load_platform_fdt()` as a weak function:
> - Weak implementation in lib/efi_loader/efi_fdt.c (defaults to no-op)
> - Called from efi_bootmgr_run() after efi_load_distro_fdt()
> - Qualcomm override in arch/arm/mach-snapdragon/efi_fdt_qcom.c
>
[1] https://packages.debian.org/sid/u-boot-efi-dtb
[2] https://github.com/qualcomm-linux/qcom-dtb-metadata/blob/main/Documentation.md
-Sumit
> Aswin Murugan (3):
> efi_loader: Add platform hook for FDT loading
> soc: qcom: smem: Added socinfo header file
> mach-snapdragon: Implement Qualcomm multi-DTB selection
>
> arch/arm/mach-snapdragon/Makefile | 1 +
> arch/arm/mach-snapdragon/efi_fdt_qcom.c | 339 ++++++++++++++++++++++++
> include/soc/qcom/socinfo.h | 114 ++++++++
> lib/efi_loader/efi_fdt.c | 34 +++
> 4 files changed, 488 insertions(+)
> create mode 100644 arch/arm/mach-snapdragon/efi_fdt_qcom.c
> create mode 100644 include/soc/qcom/socinfo.h
>
> --
> 2.34.1
>
next prev parent reply other threads:[~2026-01-08 12:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-06 12:21 [RFC PATCH v1 0/3] efi_loader: Introduce platform hook for FDT selection Aswin Murugan
2026-01-06 12:21 ` [PATCH v1 1/3] efi_loader: Add platform hook for FDT loading Aswin Murugan
2026-01-06 16:22 ` Simon Glass
2026-01-07 15:00 ` Ilias Apalodimas
2026-01-07 18:44 ` Heinrich Schuchardt
2026-01-06 12:21 ` [PATCH v1 2/3] soc: qcom: smem: Added socinfo header file Aswin Murugan
2026-01-06 12:21 ` [PATCH v1 3/3] mach-snapdragon: Implement Qualcomm multi-DTB selection Aswin Murugan
2026-01-08 12:10 ` Sumit Garg [this message]
2026-01-10 8:30 ` [RFC PATCH v1 0/3] efi_loader: Introduce platform hook for FDT selection Aswin Murugan
2026-01-12 8:10 ` Heinrich Schuchardt
2026-01-12 13:48 ` Casey Connolly
2026-01-15 6:51 ` Sumit Garg
2026-01-15 6:50 ` Sumit Garg
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=aV-eumhHFeCxceZg@sumit-xelite \
--to=sumit.garg@kernel.org \
--cc=adrianox@gmail.com \
--cc=aswin.murugan@oss.qualcomm.com \
--cc=casey.connolly@linaro.org \
--cc=ilias.apalodimas@linaro.org \
--cc=javier.tia@linaro.org \
--cc=neil.armstrong@linaro.org \
--cc=paul.liu@linaro.org \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot-qcom@groups.io \
--cc=u-boot@lists.denx.de \
--cc=varadarajan.narayanan@oss.qualcomm.com \
--cc=wolfgang.wallner@at.abb.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