spl: introduce SPL_XIP to config
authorNikita Shubin <n.shubin@yadro.com>
Fri, 2 Sep 2022 08:47:39 +0000 (11:47 +0300)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Mon, 26 Sep 2022 06:28:43 +0000 (14:28 +0800)
commitc2bdf02c9d40da7154fea46b7d10343fe9f14209
tree362d3715d67989f0d7208a674422dd9e79681eaf
parent435596d57f8beedf36b5dc858fe7ba9d6c03334b
spl: introduce SPL_XIP to config

U-Boot and SPL don't necessary share the same location, so we might end
with U-Boot SPL in read-only memory (XIP) and U-Boot in read-write memory.

In case of non XIP boot mode, we rely on such variables as "hart_lottery"
and "available_harts_lock" which we use as atomics.

The problem is that CONFIG_XIP also propagate to main U-Boot, not only SPL,
so we need CONFIG_SPL_XIP to distinguish SPL XIP from other XIP modes.

This adds an option special for SPL to behave it in XIP manner and we don't
use hart_lottery and available_harts_lock, during start proccess.

Signed-off-by: Nikita Shubin <n.shubin@yadro.com>
Reviewed-by: Rick Chen <rick@andestech.com>
arch/riscv/Kconfig
arch/riscv/cpu/cpu.c
arch/riscv/cpu/start.S
arch/riscv/include/asm/global_data.h
arch/riscv/lib/asm-offsets.c
arch/riscv/lib/smp.c
configs/ae350_rv32_spl_xip_defconfig
configs/ae350_rv64_spl_xip_defconfig