[PATCH 11/14] board: synquacer: developerbox: Don't set gd->env_addr to default_environment

Masami Hiramatsu masami.hiramatsu at linaro.org
Wed Nov 17 05:58:49 CET 2021


Hi Marek,

I found this cause a synchronous abort on boot on the developerbox
when the env_vars on SPI flash is corrupted. See below log.
Can we revert it? I confirmed that reverting this patch fixes the problem.

Thank you,

[2021-11-17 13:49:19] U-Boot 2021.10-01018-g535870f3b0 (Nov 17 2021 -
13:45:48 +0900)
[2021-11-17 13:49:19]
[2021-11-17 13:49:19] CPU:   SC2A11:Cortex-A53 MPCore 24cores
[2021-11-17 13:49:19] Model: Socionext Developer Box
[2021-11-17 13:49:19] DRAM:  3.9 GiB
[2021-11-17 13:49:20] MMC:   sdhci at 52300000: 0
[2021-11-17 13:49:20] Loading Environment from SPIFlash... SF:
Detected mx66u51235f with page size 2
56 Bytes, erase size 4 KiB, total 64 MiB
[2021-11-17 13:49:20] *** Warning - bad CRC, using default environment
[2021-11-17 13:49:20]
[2021-11-17 13:49:20] "Synchronous Abort" handler, esr 0x96000210
[2021-11-17 13:49:20] elr: 0000000008245cbc lr : 0000000008245ca4 (reloc)
[2021-11-17 13:49:20] elr: 00000000fbf5acbc lr : 00000000fbf5aca4
[2021-11-17 13:49:20] x0 : 000000000000000a x1 : 0000000000000001
[2021-11-17 13:49:20] x2 : 0000000000000000 x3 : 0000000000010301
[2021-11-17 13:49:20] x4 : 0000000000000000 x5 : 0000000000000000
[2021-11-17 13:49:20] x6 : 0000000000000000 x7 : 0000000000000000
[2021-11-17 13:49:20] x8 : 0000000000000004 x9 : 0000000000000008
[2021-11-17 13:49:20] x10: 00000000000186a0 x11: 00000000ffffffd0
[2021-11-17 13:49:20] x12: 0000000000000006 x13: 000000000001869f
[2021-11-17 13:49:20] x14: 00000000faee0b00 x15: 0000000000000000
[2021-11-17 13:49:20] x16: 00000000fbf52b24 x17: 0000000000000000
[2021-11-17 13:49:20] x18: 00000000faee4d80 x19: 00000000faf1aad8
[2021-11-17 13:49:20] x20: 000000000828eadf x21: 000000000000000a
[2021-11-17 13:49:20] x22: 0000000000000020 x23: 00000000fbfaa016
[2021-11-17 13:49:20] x24: 00000000faee4e70 x25: 000000000828eadf
[2021-11-17 13:49:20] x26: 0000000000000400 x27: 000000000002ffff
[2021-11-17 13:49:20] x28: 0000000000000000 x29: 00000000faee06b0
[2021-11-17 13:49:20]

2021年10月22日(金) 22:47 Marek Behún <kabel at kernel.org>:
>
> From: Marek Behún <marek.behun at nic.cz>
>
> This board sets gd->env_addr to default_environment in board_init(), but
> the board has environment in SPI flash according to defconfig. Let the
> env API handle environment automatically.
>
> Signed-off-by: Marek Behún <marek.behun at nic.cz>
> Cc: Masami Hiramatsu <masami.hiramatsu at linaro.org>
> ---
>  board/socionext/developerbox/developerbox.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/board/socionext/developerbox/developerbox.c b/board/socionext/developerbox/developerbox.c
> index 9552bfcdc3..31b1349514 100644
> --- a/board/socionext/developerbox/developerbox.c
> +++ b/board/socionext/developerbox/developerbox.c
> @@ -82,8 +82,6 @@ int board_init(void)
>  {
>         gd->bd->bi_boot_params = CONFIG_SYS_LOAD_ADDR + LOAD_OFFSET;
>
> -       gd->env_addr = (ulong)&default_environment[0];
> -
>         synquacer_setup_scbm_smmu();
>
>         return 0;
> --
> 2.32.0
>


-- 
Masami Hiramatsu


More information about the U-Boot-Board-Maintainers mailing list