[PATCH v1 1/2] efi_loader: improve device path matching for partition lookup

Balaji Selvanathan balaji.selvanathan at oss.qualcomm.com
Tue Jul 29 06:30:17 CEST 2025


Hi Heinrich,

Please find the answers to your queries below:

How to reproduce:
                 1.Take the upstream code
                 2.Place the capsule in /EFI/UpdateCapsule in the ESP 
partition (in kernel)
                 3.Reboot
                 4.U-Boot fails to find the ESP partition and continues 
with normal boot

Which caller fails:
/find_boot_device /function in /efi_capsule_scan_dir/ fails; 
particularly /device_is_present_and_system_part/ in /find_boot_device/ 
(line 990) fails for all boot options
                 In /device_is_present_and_system_part/, 
"/efi_dp_find_obj(dp, &efi_system_partition_guid, &rem);/" fails
                 In /efi_dp_find_obj/ function, in /find_handle/ 
function, this condition is triggered (in line 142): "/if (len_current > 
len)/", because of which it skips the ESP partition handle. From the 
below paths, we can see that the length of the ESP's path (len_current) 
is greater than the length of the boot0000's path (len).

boot0000's device path:
/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,0000000000000000)/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,6e00000000000000)/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,7e00000000000000)/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,6c00000000000000)/Scsi(0,0)

ESP handle's device path:
/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,0000000000000000)/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,6e00000000000000)/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,7e00000000000000)/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,6c00000000000000)/Scsi(0,0)/HD(1,GPT,2f2a74a5-4b82-da72-3110-7287ec562fb1,0x6,0x20000)

On 7/25/2025 7:31 PM, Heinrich Schuchardt wrote:
> Could you, please, describe how to reproduce the issue you are seeing.
>
> Which caller fails for you?
> What are the values of the UEFI Boot####, BootNext variables that you 
> use to find the capsule?
> What is the device-path of the ESP?


More information about the U-Boot mailing list