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