[PATCH v1 0/2] Improve EFI partition matching for capsule update
Balaji Selvanathan
balaji.selvanathan at oss.qualcomm.com
Thu Jul 24 11:00:07 CEST 2025
This patch series improves the reliability of EFI capsule updates by
fixing issues in device path matching and partition name filtering.
The first patch updates the logic in find_handle() to correctly match
device paths when the EFI System Partition (ESP) is a sub-partition
within a larger boot device. Previously, the function only compared
paths when the candidate path was shorter or equal in length to the
input path.
This caused failures when the ESP path was longer, as is
common when the ESP resides inside a UFS LUN. The new logic allows
matching when the input path is a prefix of the candidate path,
ensuring the correct EFI handle is returned for accessing the ESP
during capsule updates.
The second patch fixes a bug in 'capsule_update.c' where the logic
was incorrectly matching partitions like 'uefisecapps_a' when it
intended to match only 'uefi_a' or 'uefi_b'. This prevents flashing
to unintended partitions.
Together, these changes improve the correctness and safety of the
capsule update process on Snapdragon platforms.
Balaji Selvanathan (2):
efi_loader: improve device path matching for partition lookup
capsule_update: fix partition match to exclude uefisecapps
arch/arm/mach-snapdragon/capsule_update.c | 2 +-
lib/efi_loader/efi_device_path.c | 62 ++++++++++++++++-------
lib/efi_loader/efi_disk.c | 2 +-
3 files changed, 46 insertions(+), 20 deletions(-)
--
2.34.1
More information about the U-Boot
mailing list