[PATCH v2 10/18] x86: spl: Show debugging for BSS

Bin Meng bmeng.cn at gmail.com
Thu May 4 16:22:19 CEST 2023


Hi Simon,

On Tue, Apr 18, 2023 at 11:31 PM Simon Glass <sjg at chromium.org> wrote:
>
> Show the area of memory cleared for BSS, when debugging is enabled.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> (no changes since v1)
>
>  arch/x86/lib/spl.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
> index bdf57ef7b5bd..eb0af219ae29 100644
> --- a/arch/x86/lib/spl.c
> +++ b/arch/x86/lib/spl.c
> @@ -117,7 +117,9 @@ static int x86_spl_init(void)
>         }
>
>  #ifndef CONFIG_SYS_COREBOOT
> -       memset(&__bss_start, 0, (ulong)&__bss_end - (ulong)&__bss_start);
> +       debug("BSS clear from %lx to %lx len %lx\n", (ulong)&__bss_start,
> +             (ulong)&__bss_end, (ulong)&__bss_end - (ulong)&__bss_start);
> +       memset(&__bss_start, '\0', (ulong)&__bss_end - (ulong)&__bss_start);

There is no need to change this line.

>  # ifndef CONFIG_TPL
>
>         /* TODO(sjg at chromium.org): Consider calling cpu_init_r() here */

Regards,
Bin


More information about the U-Boot mailing list