target/xtensa/xtensa-semi: Use cpu_translate_for_debug()
We want to remove the cpu_get_phys_addr_debug() function; update the xtensa semihosting code to use cpu_translate_for_debug() instead. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20260430093810.2762539-23-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Peter Maydell committed
Apr 30, 2026 at 10:38 UTC
a0c9fc28bcc565e74c18d4f6ee67a4e7f6187403
1 file changed
+7
-2
target/xtensa/xtensa-semi.c
+7
-2
@@ -215,15 +215,20 @@ void HELPER(simcall)(CPUXtensaState *env)
215
uint32_t len_done = 0;
216
217
while (len > 0) {
218
- hwaddr paddr = cpu_get_phys_addr_debug(cs, vaddr);
218
+ TranslateForDebugResult tres;
219
uint32_t page_left =
220
TARGET_PAGE_SIZE - (vaddr & (TARGET_PAGE_SIZE - 1));
221
uint32_t io_sz = page_left < len ? page_left : len;
222
hwaddr sz = io_sz;
223
- void *buf = address_space_map(as, paddr, &sz, !is_write, attrs);
223
+ void *buf = NULL;
224
uint32_t io_done;
225
bool error = false;
226
227
+ if (cpu_translate_for_debug(cs, vaddr, &tres)) {
228
+ buf = address_space_map(as, tres.physaddr, &sz,
229
+ !is_write, attrs);
230
+ }
231
+
232
if (buf) {
233
vaddr += io_sz;
234
len -= io_sz;