Merge pull request #941 from kr-sc/kr-sc/fix-hgatp-mode-upstream

hgatp_mode in riscv_virt2phys_v defined by vsatp value
This commit is contained in:
Tim Newsome 2023-10-24 07:57:37 -07:00 committed by GitHub
commit 2d98ef5d13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;