> From: Aswin Murugan <[email protected]>
> Date: Sun,  6 Sep 2026 17:47:48 +0530
> 
> efi_disk_add_dev() runs efi_fs_exists() on every GPT partition as
> soon as its block device probes, even for raw partitions that are
> never opened as a filesystem before boot. Only the ESP needs this
> probe for boot, so skip it for other GPT partitions.
> 
> ~170ms saved on Qcom SoC bootup time.

Sorry, but I don't think this is right.  UEFI implementations support
loading UEFI OS boot loaders from normal DOS partitions and folks
depend on this.  OpenBSD's install media use a DOS partition instead
of an ESP because (some) Raspberry Pi firmware doesn't recognize ESP
partitions.  All arm64 UEFI implementations I've seen (including
commercial ones like those found on various servers with Ampere CPUs)
support this.

> Signed-off-by: Aswin Murugan <[email protected]>
> ---
>  lib/efi_loader/efi_disk.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c
> index 4a3ace3a304..4fd53fb598a 100644
> --- a/lib/efi_loader/efi_disk.c
> +++ b/lib/efi_loader/efi_disk.c
> @@ -529,8 +529,12 @@ static efi_status_t efi_disk_add_dev(
>       /*
>        * On partitions or whole disks without partitions install the
>        * simple file system protocol if a file system is available.
> +      *
> +      * Skip the filesystem probe for non-ESP GPT partitions: only the ESP
> +      * is ever opened as a filesystem before boot.
>        */
>       if ((part || desc->part_type == PART_TYPE_UNKNOWN) &&
> +         (!part_info || (part_info->bootable & PART_EFI_SYSTEM_PARTITION)) &&
>           efi_fs_exists(desc, part)) {
>               ret = efi_create_simple_file_system(desc, part, diskobj->dp,
>                                                   &diskobj->volume);
> -- 
> 2.34.1
> 
> 

Reply via email to