From: Peter Maydell <[email protected]> Convert rx to providing the translate_for_debug method rather than the deprecated get_phys_addr_debug method.
Signed-off-by: Peter Maydell <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Message-ID: <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- target/rx/cpu.h | 3 ++- target/rx/cpu.c | 2 +- target/rx/helper.c | 10 ++++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/target/rx/cpu.h b/target/rx/cpu.h index 06208380621..0c749fc58d4 100644 --- a/target/rx/cpu.h +++ b/target/rx/cpu.h @@ -150,7 +150,8 @@ const char *rx_crname(uint8_t cr); const char *rx_exception_name(int excp); void rx_cpu_do_interrupt(CPUState *cpu); bool rx_cpu_exec_interrupt(CPUState *cpu, int int_req); -hwaddr rx_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr); +bool rx_cpu_translate_for_debug(CPUState *cpu, vaddr addr, + TranslateForDebugResult *result); void rx_cpu_dump_state(CPUState *cpu, FILE *f, int flags); int rx_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int rx_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); diff --git a/target/rx/cpu.c b/target/rx/cpu.c index 44ec3c3d62f..c35a98f7cef 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -209,7 +209,7 @@ static void rx_cpu_init(Object *obj) static const struct SysemuCPUOps rx_sysemu_ops = { .has_work = rx_cpu_has_work, - .get_phys_addr_debug = rx_cpu_get_phys_addr_debug, + .translate_for_debug = rx_cpu_translate_for_debug, }; static const TCGCPUOps rx_tcg_ops = { diff --git a/target/rx/helper.c b/target/rx/helper.c index ed9cadc0bd4..f170a14721e 100644 --- a/target/rx/helper.c +++ b/target/rx/helper.c @@ -159,7 +159,13 @@ bool rx_cpu_exec_interrupt(CPUState *cs, int interrupt_request) return false; } -hwaddr rx_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr) +bool rx_cpu_translate_for_debug(CPUState *cs, vaddr addr, + TranslateForDebugResult *result) { - return addr; + *result = (TranslateForDebugResult) { + .physaddr = addr, + .lg_page_size = TARGET_PAGE_BITS, + .attrs.debug = 1, + }; + return true; } -- 2.55.0
