]> git.baikalelectronics.ru Git - uboot.git/commit
riscv: Add SPL_ZERO_MEM_BEFORE_USE implementation
authorShengyu Qu <wiagn233@outlook.com>
Wed, 9 Aug 2023 13:11:32 +0000 (21:11 +0800)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Thu, 10 Aug 2023 02:58:12 +0000 (10:58 +0800)
commitea64df64303d49933fe19d6f21ebeeed5855ccd3
tree5738ae924d5181bb1865c9ad13501138fe8f7316
parent86612f04116b6b1a97b9ceea6bd7bf9709f66275
riscv: Add SPL_ZERO_MEM_BEFORE_USE implementation

Add the actual support code for SPL_ZERO_MEM_BEFORE_USE and remove
existing Starfive JH7110's L2 LIM clean code, since existing code has
following issues:
 1. Each hart (in the middle of a function call) overwriting its own
    stack and other harts' stacks.
    (data-race and data-corruption)
 2. Lottery winner hart can be doing "board_init_f_init_reserve",
    while other harts are in the middle of zeroing L2 LIM.
    (data-race)

Signed-off-by: Bo Gan <ganboing@gmail.com>
Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
arch/riscv/cpu/jh7110/spl.c
arch/riscv/cpu/start.S
common/init/board_init.c