diff options
author | Leo Yu-Chi Liang <ycliang@andestech.com> | 2024-03-13 14:53:15 +0800 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-03-20 17:12:38 -0400 |
commit | aeda4ccf3c60ab1ed43cc994d01fb93e39993ca1 (patch) | |
tree | 502fd40c80689ad6997a4680cfc39542d58ac8fc | |
parent | e50cb36cb5e772d5bbd30d070faedf7323406364 (diff) |
spl: Improve error message for SPL memory allocation
There could be two memory allocation scheme in SPL phase.
Explicitly print the corresponding error message.
Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
-rw-r--r-- | common/spl/spl_fit.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 872df0c0fe8..e5195d460c4 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -550,7 +550,12 @@ static void *spl_get_fit_load_buffer(size_t size) buf = malloc_cache_aligned(size); if (!buf) { pr_err("Could not get FIT buffer of %lu bytes\n", (ulong)size); - pr_err("\tcheck CONFIG_SPL_SYS_MALLOC_SIZE\n"); + + if (IS_ENABLED(CONFIG_SPL_SYS_MALLOC)) + pr_err("\tcheck CONFIG_SPL_SYS_MALLOC_SIZE\n"); + else + pr_err("\tcheck CONFIG_SPL_SYS_MALLOC_F_LEN\n"); + buf = spl_get_load_buffer(0, size); } return buf; |