aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass2023-09-07 09:58:17 -0600
committerBin Meng2023-09-22 06:03:46 +0800
commit623b3e8f9718a1fbd612b3e42451859e9f98a947 (patch)
tree2c983c0fe6f360f1db5a82c9824c3df2b1546c26
parent9d69324e7f356958dc8c2b286de771b9f5ac43c3 (diff)
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 <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
-rw-r--r--arch/x86/lib/spl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index 58fa572b71a..335dacf47fd 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());