summaryrefslogtreecommitdiff
path: root/lib/utils/sys
diff options
context:
space:
mode:
authorBin Meng <[email protected]>2022-12-26 11:36:03 +0800
committerAnup Patel <[email protected]>2023-01-06 18:01:36 +0530
commit65638f8d6b1f438ae442bad7a4f77b188d3d3689 (patch)
treea6f0b4a55f7cace05acb10848a5c7b18032b502c /lib/utils/sys
parent6509127ad620748c90c02b4bd32fa91df165ee82 (diff)
lib: utils/sys: Allow custom HTIF base address for RV32
commit 6dde43584f18 ("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: 6dde43584f18 ("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]>
Diffstat (limited to 'lib/utils/sys')
-rw-r--r--lib/utils/sys/htif.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/utils/sys/htif.c b/lib/utils/sys/htif.c
index d7cbeaf6..b4e63212 100644
--- a/lib/utils/sys/htif.c
+++ b/lib/utils/sys/htif.c
@@ -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();