Skip to content

Commit 65638f8

Browse files
lbmengavpatel
authored andcommitted
lib: utils/sys: Allow custom HTIF base address for RV32
commit 6dde435 ("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: 6dde435 ("lib: utils/sys: Extend HTIF library to allow custom base address") Signed-off-by: Bin Meng <[email protected]> Tested-by: Daniel Henrique Barboza <[email protected]> Reviewed-by: Anup Patel <[email protected]>
1 parent 6509127 commit 65638f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/utils/sys/htif.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ static void do_tohost_fromhost(uint64_t dev, uint64_t cmd, uint64_t data)
135135
__set_tohost(HTIF_DEV_SYSTEM, cmd, data);
136136

137137
while (1) {
138-
uint64_t fh = fromhost;
138+
uint64_t fh = __read_fromhost();
139139
if (fh) {
140140
if (FROMHOST_DEV(fh) == HTIF_DEV_SYSTEM &&
141141
FROMHOST_CMD(fh) == cmd) {
142-
fromhost = 0;
142+
__write_fromhost(0);
143143
break;
144144
}
145145
__check_fromhost();

0 commit comments

Comments
 (0)