From 50445725295a8e1720ded49b16e1420f306cbb2d Mon Sep 17 00:00:00 2001 From: Aswin Murugan Date: Tue, 25 Aug 2026 15:42:29 +0530 Subject: [PATCH 1/4] mach-snapdragon: skip redundant SCSI rescan for capsule updates qcom_configure_capsule_updates() unconditionally calls scsi_scan(), re-scanning all SCSI children even when an earlier boot stage has already bound them. Skip the rescan when UCLASS_SCSI already has devices, keeping it as a fallback if none are bound yet. ~34ms saved on Qcom SoC bootup time. Signed-off-by: Aswin Murugan --- arch/arm/mach-snapdragon/capsule_update.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-snapdragon/capsule_update.c b/arch/arm/mach-snapdragon/capsule_update.c index 39838a2a8bca..e8c39a6e9fc3 100644 --- a/arch/arm/mach-snapdragon/capsule_update.c +++ b/arch/arm/mach-snapdragon/capsule_update.c @@ -624,7 +624,8 @@ void qcom_configure_capsule_updates(void) } memset(partitions, 0, sizeof(qcom_partitions)); - if (IS_ENABLED(CONFIG_SCSI)) { + if (IS_ENABLED(CONFIG_SCSI) && !uclass_id_count(UCLASS_SCSI)) { + /* Scan for SCSI devices, unless already scanned earlier in boot */ ret = scsi_scan(false); if (ret) { debug("Failed to scan SCSI devices: %d\n", ret); From 244f14a56638bc38cebab81a8abb9b49fe42bd7b Mon Sep 17 00:00:00 2001 From: Aswin Murugan Date: Tue, 25 Aug 2026 15:44:43 +0530 Subject: [PATCH 2/4] efi_loader: skip fs probe for non-ESP GPT partitions 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, so skip it for other GPT partitions. ~170ms saved on Qcom SoC bootup time. Signed-off-by: Aswin Murugan --- 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 4a3ace3a3045..4fd53fb598a4 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); From ae85b8908c2b498ad46c7e3e12cf4a8f9de49583 Mon Sep 17 00:00:00 2001 From: Aswin Murugan Date: Tue, 25 Aug 2026 16:46:21 +0530 Subject: [PATCH 3/4] configs: qcom: disable malloc pool zero-init on boot CONFIG_SYS_MALLOC_CLEAR_ON_INIT zeroes the entire malloc pool at init, costing measurable boot time on the 256MB pool used by Qcom boards. Disabling it saves ~74ms on Qcom SoC bootup time. Signed-off-by: Aswin Murugan --- configs/qcom_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/qcom_defconfig b/configs/qcom_defconfig index 17f09c25c70d..997d230bd2a4 100644 --- a/configs/qcom_defconfig +++ b/configs/qcom_defconfig @@ -18,6 +18,7 @@ CONFIG_BUTTON_CMD=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_QCOM_FIT_MULTIDTB=y +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_BOOTSTD_FULL=y # CONFIG_BOOTMETH_VBE is not set CONFIG_BOOTDELAY=1 From c8827d9d9446443b8326ce87a3e5b1e5af154299 Mon Sep 17 00:00:00 2001 From: Aswin Murugan Date: Tue, 25 Aug 2026 15:38:02 +0530 Subject: [PATCH 4/4] arm: mach-snapdragon: use cache-aligned buffer for FIT FAT read qcom_load_fit_image() allocates the FAT-read buffer with malloc(), which is not guaranteed to be cache-line aligned and is unsafe to use with cache-line DMA. Use malloc_cache_aligned() instead. Signed-off-by: Aswin Murugan --- arch/arm/mach-snapdragon/qcom_fit_multidtb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-snapdragon/qcom_fit_multidtb.c b/arch/arm/mach-snapdragon/qcom_fit_multidtb.c index edab8c241098..456712300ab7 100644 --- a/arch/arm/mach-snapdragon/qcom_fit_multidtb.c +++ b/arch/arm/mach-snapdragon/qcom_fit_multidtb.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -642,7 +643,7 @@ static int qcom_load_fit_image(const char *filename, const char *partname, if (!ret) { fat_size(filename, &file_size); - fit_buf = malloc(file_size); + fit_buf = malloc_cache_aligned(file_size); if (!fit_buf) return -ENOMEM;