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. 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. 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 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

