1
0
Fork 0
mirror of https://github.com/u-boot/u-boot.git synced 2025-04-23 22:14:54 +00:00

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>
This commit is contained in:
Leo Yu-Chi Liang 2024-03-13 14:53:15 +08:00 committed by Tom Rini
parent e50cb36cb5
commit aeda4ccf3c

View file

@ -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;