From: Simon Glass Date: Thu, 7 Sep 2023 15:58:17 +0000 (-0600) Subject: x86: spl: Change the condition for copying U-Boot to RAM X-Git-Url: http://git.dujemihanovic.xyz/login.html?a=commitdiff_plain;h=623b3e8f9718a1fbd612b3e42451859e9f98a947;p=u-boot.git x86: spl: Change the condition for copying U-Boot to RAM Make this depend on whether the address matches the offset, rather than a particular board build. For samus_tpl we don't need to copy, for example. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index 58fa572b71..335dacf47f 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -258,7 +258,7 @@ static int spl_board_load_image(struct spl_image_info *spl_image, spl_image->os = IH_OS_U_BOOT; spl_image->name = "U-Boot"; - if (!IS_ENABLED(CONFIG_SYS_COREBOOT)) { + if (spl_image->load_addr != spl_get_image_pos()) { /* Copy U-Boot from ROM */ memcpy((void *)spl_image->load_addr, (void *)spl_get_image_pos(), spl_get_image_size());