Skip to contentSkip to conversation

ast2600: spl: Include RAM loader in BL2 ifdef

PATCH In review Joel Stanley 3 participants 3 messages Jan 28, 2021

Subsystems (3)
lore
Share & tools
lore

Joel Stanley

author maintainer
#0 lore raw

PATCH 1/1 ast2600: spl: Include RAM loader in BL2 ifdef

With this patch all of the BL2 verification call sites are behind the Kconfig symbol. When it is disabled, 1903 bytes is saved.

---
 arch/arm/mach-aspeed/ast2600/spl_boot.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-aspeed/ast2600/spl_boot.c +2 -0
index 98cf72bf440d..06800940109e 100644
@@ -23,6 +23,7 @@ static int aspeed_spl_ram_load_image(struct spl_image_info *spl_image,
 }
 SPL_LOAD_IMAGE_METHOD("RAM", 0, ASPEED_BOOT_DEVICE_RAM, aspeed_spl_ram_load_image);
 
+#if IS_ENABLED(ASPEED_SECBOOT_BL2)
 static int aspeed_secboot_spl_ram_load_image(struct spl_image_info *spl_image,
 				      struct spl_boot_device *bootdev)
 {
@@ -41,6 +42,7 @@ static int aspeed_secboot_spl_ram_load_image(struct spl_image_info *spl_image,
 	return 0;
 }
 SPL_LOAD_IMAGE_METHOD("RAM with Aspeed Secure Boot", 0, ASPEED_SECBOOT_DEVICE_RAM, aspeed_secboot_spl_ram_load_image);
+#endif /* ASPEED_SECBOOT_BL2 */
 
 #if IS_ENABLED(CONFIG_SPL_MMC_SUPPORT)
 static int aspeed_spl_mmc_load_image(struct spl_image_info *spl_image,
Signature · 1 line
2.29.2
Reviewed-by on v1 1/1
#2 lore raw
In reply to Joel Stanley
Quoted 7 lines · Joel Stanley

With this patch all of the BL2 verification call sites are behind the Kconfig symbol. When it is disabled, 1903 bytes is saved.

SPL_LOAD_IMAGE_METHOD("RAM with Aspeed Secure Boot", 0, ASPEED_SECBOOT_DEVICE_RAM, aspeed_secboot_spl_ram_load_image);
+#endif /* ASPEED_SECBOOT_BL2 */

Thanks,

Signature · 1 line
Klaus Heinrich Kiwi <[email protected]>