Skip to content

Commit

Permalink
hgatp_mode in riscv_virt2phys_v defined by vsatp value
Browse files Browse the repository at this point in the history
Replace `vsatp` with `hgatp` (how it should be)
  • Loading branch information
kr-sc committed Oct 23, 2023
1 parent aad90d8 commit 2773962
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/target/riscv/riscv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2297,7 +2297,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;
Expand Down

0 comments on commit 2773962

Please sign in to comment.