From 3e9875cd72672e5717df5ad1a73d9a2a44792306 Mon Sep 17 00:00:00 2001 From: Joseph Chen Date: Wed, 30 Dec 2020 16:58:11 +0800 Subject: [PATCH] spl: fit: assume the max size of U-Boot/tee/atf is 2MB RK3568 U-Boot is over 1MB size. Signed-off-by: Joseph Chen Change-Id: I743cf403ddfb63d9452a2d6781d99ebdd5313e9c --- common/spl/spl_fit.c | 4 ++-- include/image.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 1ad65006f4..bfcf34e797 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -196,9 +196,9 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector, load_addr = image_info->load_addr; if (image_comp != IH_COMP_NONE && image_comp != IH_COMP_ZIMAGE) { - /* Empirically, 1MB is enough for U-Boot, tee and atf */ + /* Empirically, 2MB is enough for U-Boot, tee and atf */ if (fit_image_get_comp_addr(fit, node, &comp_addr)) - comp_addr = load_addr + SZ_1M; + comp_addr = load_addr + FIT_MAX_SPL_IMAGE_SZ; } else { comp_addr = load_addr; } diff --git a/include/image.h b/include/image.h index 93a3344e7c..de1b5cbf04 100644 --- a/include/image.h +++ b/include/image.h @@ -948,6 +948,7 @@ int bootz_setup(ulong image, ulong *start, ulong *end); #define FIT_STANDALONE_PROP "standalone" #define FIT_MAX_HASH_LEN HASH_MAX_DIGEST_SIZE +#define FIT_MAX_SPL_IMAGE_SZ SZ_2M #if IMAGE_ENABLE_FIT