]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mhi: host: Add support for loading dual ELF image format
authorQiang Yu <qiang.yu@oss.qualcomm.com>
Wed, 24 Dec 2025 03:05:26 +0000 (19:05 -0800)
committerManivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Wed, 24 Dec 2025 05:12:36 +0000 (10:42 +0530)
commit820c866c42de99e7d65c7bd1f591f067dbbe3cae
tree0357241496e8a00e322b66576c3335ef0ad4b6a5
parent8f0b4cce4481fb22653697cced8d0d04027cb1e8
mhi: host: Add support for loading dual ELF image format

Currently, the FBC image contains a single ELF header followed by segments
for both SBL and WLAN FW. However, TME-L (Trust Management Engine Lite)
supported devices (e.g., QCC2072) require separate ELF headers for SBL and
WLAN FW segments due to TME-L image authentication requirements.

Current image format contains two sections in a single binary:
- First 512KB: ELF header + SBL segments
- Remaining: WLAN FW segments (raw data)

The TME-L supported image format contains two complete ELF files in a
single binary:
- First 512KB: Complete SBL ELF file (ELF header + SBL segments)
- Remaining: Complete WLAN FW ELF file (ELF header + WLAN FW segments)

Download behavior:
- Legacy: 1. First 512KB via BHI (ELF header + SBL)
          2. Full image via BHIe

- TME-L: 1. First 512KB via BHI (SBL ELF file)
         2. Remaining via BHIe (WLAN FW ELF file only)

Add runtime detection to automatically identify the image format by
checking for the presence of a second ELF header at the 512KB boundary.
When detected, MHI skips the first 512KB during WLAN FW download over BHIe
as it is loaded in BHI phase.

Signed-off-by: Qiang Yu <qiang.yu@oss.qualcomm.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Link: https://patch.msgid.link/20251223-wlan_image_load_skip_512k-v5-1-8d4459d720b5@oss.qualcomm.com
drivers/bus/mhi/host/boot.c