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 >

