aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-09-07 09:58:17 -0600
committerBin Meng <bmeng@tinylab.org>2023-09-22 06:03:46 +0800
commit623b3e8f9718a1fbd612b3e42451859e9f98a947 (patch)
tree2c983c0fe6f360f1db5a82c9824c3df2b1546c26
parent9d69324e7f356958dc8c2b286de771b9f5ac43c3 (diff)
downloadu-boot-623b3e8f9718a1fbd612b3e42451859e9f98a947.zip
u-boot-623b3e8f9718a1fbd612b3e42451859e9f98a947.tar.gz
u-boot-623b3e8f9718a1fbd612b3e42451859e9f98a947.tar.bz2
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 58fa572..335dacf 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());