From: Peter Maydell <[email protected]> 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 <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-ID: <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- target/xtensa/xtensa-semi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/target/xtensa/xtensa-semi.c b/target/xtensa/xtensa-semi.c index 9a6a9c8b4e4..3340bd1d415 100644 --- a/target/xtensa/xtensa-semi.c +++ b/target/xtensa/xtensa-semi.c @@ -215,15 +215,20 @@ void HELPER(simcall)(CPUXtensaState *env) uint32_t len_done = 0; while (len > 0) { - hwaddr paddr = cpu_get_phys_addr_debug(cs, vaddr); + TranslateForDebugResult tres; uint32_t page_left = TARGET_PAGE_SIZE - (vaddr & (TARGET_PAGE_SIZE - 1)); uint32_t io_sz = page_left < len ? page_left : len; hwaddr sz = io_sz; - void *buf = address_space_map(as, paddr, &sz, !is_write, attrs); + void *buf = NULL; uint32_t io_done; bool error = false; + if (cpu_translate_for_debug(cs, vaddr, &tres)) { + buf = address_space_map(as, tres.physaddr, &sz, + !is_write, attrs); + } + if (buf) { vaddr += io_sz; len -= io_sz; -- 2.53.0
