summaryrefslogtreecommitdiff
path: root/arch/riscv/lib/asm-offsets.c
diff options
context:
space:
mode:
authorRick Chen <rick@andestech.com>2019-04-30 13:49:33 +0800
committerAndes <uboot@andestech.com>2019-05-09 16:46:46 +0800
commitbdce38965e79143ed58bf1c6d39c650ff3dfefd1 (patch)
treedfb6c4288f22c176838ace87fed0949dd747a7dc /arch/riscv/lib/asm-offsets.c
parent8aa278df0a338dfc05c731589051ab80373925c5 (diff)
riscv: Introduce CONFIG_XIP to support booting from flash
When U-Boot boots from flash, during the boot process, hart_lottery and available_harts_lock variable addresses point to flash which is not writable. This causes boot failures on AE350. Introduce a config option CONFIG_XIP to support such configuration. Signed-off-by: Rick Chen <rick@andestech.com> Cc: Greentime Hu <greentime@andestech.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/riscv/lib/asm-offsets.c')
-rw-r--r--arch/riscv/lib/asm-offsets.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/lib/asm-offsets.c b/arch/riscv/lib/asm-offsets.c
index f998402bd1..4fa4fd3714 100644
--- a/arch/riscv/lib/asm-offsets.c
+++ b/arch/riscv/lib/asm-offsets.c
@@ -14,7 +14,9 @@
int main(void)
{
DEFINE(GD_BOOT_HART, offsetof(gd_t, arch.boot_hart));
+#ifndef CONFIG_XIP
DEFINE(GD_AVAILABLE_HARTS, offsetof(gd_t, arch.available_harts));
+#endif
return 0;
}