summaryrefslogtreecommitdiff
path: root/board/emulation
diff options
context:
space:
mode:
authorAnup Patel <Anup.Patel@wdc.com>2019-04-11 06:52:12 +0000
committerAndes <uboot@andestech.com>2019-05-09 16:46:24 +0800
commit8aa278df0a338dfc05c731589051ab80373925c5 (patch)
tree265a45c2d055f13a2f9337042f6fd5c1f2b9f648 /board/emulation
parent081c660201f7567c4fc000e4d758b5ab9f0e8db4 (diff)
riscv: qemu: Use correct SYS_TEXT_BASE for S-mode on 32bit system
For 32bit system, the OpenSBI (or BBL) will jump to 0x80400000 address in S-mode whereas for 64bit system it will jump to 0x80200000 address in S-mode. Currently, the S-mode U-Boot sets SYS_TEXT_BASE to 0x80200000 for both 32bit and 64bit system. This breaks S-mode U-Boot for 32bit system. This patch sets different SYS_TEXT_BASE for 32bit and 64bit system so that S-mode U-Boot works fine for both. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Tested-by: Karsten Merker <merker@debian.org>
Diffstat (limited to 'board/emulation')
-rw-r--r--board/emulation/qemu-riscv/Kconfig3
1 files changed, 2 insertions, 1 deletions
diff --git a/board/emulation/qemu-riscv/Kconfig b/board/emulation/qemu-riscv/Kconfig
index cf057e7de6..20ea6dc59b 100644
--- a/board/emulation/qemu-riscv/Kconfig
+++ b/board/emulation/qemu-riscv/Kconfig
@@ -14,7 +14,8 @@ config SYS_CONFIG_NAME
config SYS_TEXT_BASE
default 0x80000000 if !RISCV_SMODE
- default 0x80200000 if RISCV_SMODE
+ default 0x80200000 if RISCV_SMODE && ARCH_RV64I
+ default 0x80400000 if RISCV_SMODE && ARCH_RV32I
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y