diff options
author | Tim Newsome <tim@sifive.com> | 2023-10-24 07:57:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-24 07:57:37 -0700 |
commit | 2d98ef5d13f7b707a476652c994a61a6f99d9bb3 (patch) | |
tree | f4eb00f367cf3be3471d9a7cfe006dc7b33e86b5 | |
parent | 132e3faf1d47f4a2ca7d01aa0191c59f5e1816c5 (diff) | |
parent | 109772012a206f3c51ae815530b0aba5e031a6ea (diff) | |
download | riscv-openocd-2d98ef5d13f7b707a476652c994a61a6f99d9bb3.zip riscv-openocd-2d98ef5d13f7b707a476652c994a61a6f99d9bb3.tar.gz riscv-openocd-2d98ef5d13f7b707a476652c994a61a6f99d9bb3.tar.bz2 |
Merge pull request #941 from kr-sc/kr-sc/fix-hgatp-mode-upstream
hgatp_mode in riscv_virt2phys_v defined by vsatp value
-rw-r--r-- | src/target/riscv/riscv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c index 1be815b..d3031e8 100644 --- a/src/target/riscv/riscv.c +++ b/src/target/riscv/riscv.c @@ -2295,7 +2295,7 @@ static int riscv_virt2phys_v(struct target *target, target_addr_t virtual, targe LOG_TARGET_ERROR(target, "Failed to read hgatp register."); return ERROR_FAIL; } - int hgatp_mode = get_field(vsatp, RISCV_HGATP_MODE(xlen)); + int hgatp_mode = get_field(hgatp, RISCV_HGATP_MODE(xlen)); LOG_TARGET_DEBUG(target, "G-stage translation mode: %d", hgatp_mode); const virt2phys_info_t *vsatp_info; |