]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: spl: Clear BSS unconditionally
authorSimon Glass <sjg@chromium.org>
Sun, 24 Jan 2021 17:06:10 +0000 (10:06 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 1 Feb 2021 07:33:25 +0000 (15:33 +0800)
This should be done even if not using TPL, since BSS may be in use or
boards that only use SPL. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/lib/spl.c

index cf22fa2d7b5f73801aa2401cdea185a6f9a74dc7..6699de49c63699f2f706bcb36ed38ea6b7fcfe3e 100644 (file)
@@ -115,8 +115,8 @@ static int x86_spl_init(void)
        }
 
 #ifndef CONFIG_SYS_COREBOOT
-# ifndef CONFIG_TPL
        memset(&__bss_start, 0, (ulong)&__bss_end - (ulong)&__bss_start);
+# ifndef CONFIG_TPL
 
        /* TODO(sjg@chromium.org): Consider calling cpu_init_r() here */
        ret = interrupt_init();