mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00
lib: utils/sys: Allow custom HTIF base address for RV32
commit6dde43584f
("lib: utils/sys: Extend HTIF library to allow custom base address") forgot to update do_tohost_fromhost() codes for RV32, which still accesses the HTIF registers using the ELF symbol address directly. Fixes:6dde43584f
("lib: utils/sys: Extend HTIF library to allow custom base address") Signed-off-by: Bin Meng <bmeng@tinylab.org> Tested-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -135,11 +135,11 @@ static void do_tohost_fromhost(uint64_t dev, uint64_t cmd, uint64_t data)
|
||||
__set_tohost(HTIF_DEV_SYSTEM, cmd, data);
|
||||
|
||||
while (1) {
|
||||
uint64_t fh = fromhost;
|
||||
uint64_t fh = __read_fromhost();
|
||||
if (fh) {
|
||||
if (FROMHOST_DEV(fh) == HTIF_DEV_SYSTEM &&
|
||||
FROMHOST_CMD(fh) == cmd) {
|
||||
fromhost = 0;
|
||||
__write_fromhost(0);
|
||||
break;
|
||||
}
|
||||
__check_fromhost();
|
||||
|
Reference in New Issue
Block a user