]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
spl: Improve error message for SPL memory allocation
authorLeo Yu-Chi Liang <ycliang@andestech.com>
Wed, 13 Mar 2024 06:53:15 +0000 (14:53 +0800)
committerTom Rini <trini@konsulko.com>
Wed, 20 Mar 2024 21:12:38 +0000 (17:12 -0400)
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>
common/spl/spl_fit.c

index 872df0c0fe8792ef541ced72a29c7b2c24eff779..e5195d460c490960ab35428dda64e112b0048a0e 100644 (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;