From 12ab80ab45183ad0eafcf59c43eda229ec1c7b94 Mon Sep 17 00:00:00 2001 From: Parshintsev Anatoly Date: Fri, 15 Aug 2025 22:46:56 +0300 Subject: [PATCH] target/riscv: fix SV57 translation for kernel address space Fixes address translation for SV57 addresses. See [1] for details. Link: https://github.com/riscv-collab/riscv-openocd/pull/1285 [1] Change-Id: I53f7062f16c0b9e8595f38c07810b2dbc300980b Signed-off-by: Parshintsev Anatoly Reviewed-on: https://review.openocd.org/c/openocd/+/9187 Tested-by: jenkins Reviewed-by: Antonio Borneo Reviewed-by: Tomas Vanek --- src/target/riscv/riscv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c index d6b5804a6..8054a1c9b 100644 --- a/src/target/riscv/riscv.c +++ b/src/target/riscv/riscv.c @@ -274,7 +274,7 @@ static const virt2phys_info_t sv57 = { .pte_ppn_shift = {10, 19, 28, 37, 46}, .pte_ppn_mask = {0x1ff, 0x1ff, 0x1ff, 0x1ff, 0xff}, .pa_ppn_shift = {12, 21, 30, 39, 48}, - .pa_ppn_mask = {0x1ff, 0x1ff, 0x1ff, 0x1ff, 0xff}, + .pa_ppn_mask = {0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff}, }; static const virt2phys_info_t sv57x4 = {