From: Anup Patel <anup@brainfault.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 2/3] riscv: qemu: Use different SYS_TEXT_BASE for S-mode
Date: Wed, 21 Nov 2018 09:11:11 +0530 [thread overview]
Message-ID: <20181121034112.7136-3-anup@brainfault.org> (raw)
In-Reply-To: <20181121034112.7136-1-anup@brainfault.org>
When u-boot runs in S-mode, the M-mode runtime firmware
(BBL or equivalent) uses memory range in 0x80000000 to
0x80200000. Due to this, we cannot use 0x80000000 as
SYS_TEXT_BASE when running in S-mode. Instead for S-mode,
we use 0x80200000 as SYS_TEXT_BASE.
Even Linux RISC-V kernel ignores/reserves memory range
0x80000000 to 0x80200000 because it runs in S-mode.
Signed-off-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
---
board/emulation/qemu-riscv/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/board/emulation/qemu-riscv/Kconfig b/board/emulation/qemu-riscv/Kconfig
index 33ca253432..56bb5337d4 100644
--- a/board/emulation/qemu-riscv/Kconfig
+++ b/board/emulation/qemu-riscv/Kconfig
@@ -13,7 +13,8 @@ config SYS_CONFIG_NAME
default "qemu-riscv"
config SYS_TEXT_BASE
- default 0x80000000
+ default 0x80000000 if !RISCV_SMODE
+ default 0x80200000 if RISCV_SMODE
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
--
2.17.1
next prev parent reply other threads:[~2018-11-21 3:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-21 3:41 [U-Boot] [PATCH v3 0/3] RISC-V S-mode support Anup Patel
2018-11-21 3:41 ` [U-Boot] [PATCH v3 1/3] riscv: Add kconfig option to run u-boot in S-mode Anup Patel
2018-11-21 13:47 ` Auer, Lukas
2018-11-21 22:11 ` Auer, Lukas
2018-11-22 4:00 ` Anup Patel
2018-11-21 16:28 ` Palmer Dabbelt
2018-11-21 22:06 ` Auer, Lukas
2018-11-21 22:16 ` Palmer Dabbelt
2018-11-22 4:00 ` Anup Patel
2018-11-22 14:36 ` Bin Meng
2018-11-21 3:41 ` Anup Patel [this message]
2018-11-21 13:48 ` [U-Boot] [PATCH v3 2/3] riscv: qemu: Use different SYS_TEXT_BASE for S-mode Auer, Lukas
2018-11-21 3:41 ` [U-Boot] [PATCH v3 3/3] riscv: Add S-mode defconfigs for QEMU virt machine Anup Patel
2018-11-21 13:48 ` Auer, Lukas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181121034112.7136-3-anup@brainfault.org \
--to=anup@brainfault.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox