mips/tlb_helper: Add support for 'info tlb' cmd
PATCH 1/1 mips/tlb_helper: Add support for 'info tlb' cmd
From: NDNF <[email protected]>
This adds hmp 'info tlb' command support for the mips platform. 1k pages are not supported.
--- hmp-commands-info.hx | 3 ++- target/mips/cpu.h | 3 +++ target/mips/meson.build | 1 + target/mips/monitor.c | 26 ++++++++++++++++++++++ target/mips/tlb_helper.c | 48 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 target/mips/monitor.c
hmp-commands-info.hx +2 -1
@@ -222,7 +222,8 @@ SRST ERST #if defined(TARGET_I386) || defined(TARGET_SH4) || defined(TARGET_SPARC) || \ - defined(TARGET_PPC) || defined(TARGET_XTENSA) || defined(TARGET_M68K) + defined(TARGET_PPC) || defined(TARGET_XTENSA) || defined(TARGET_M68K) || \ + defined(TARGET_MIPS) || defined(TARGET_MIPS64) { .name = "tlb", .args_type = "",
target/mips/cpu.h +3 -0
@@ -1337,6 +1337,9 @@ void itc_reconfigure(struct MIPSITUState *tag);/* helper.c */ target_ulong exception_resume_pc (CPUMIPSState *env); +/*tlb_helper.c*/ +void dump_mmu (CPUMIPSState *env); +static inline void cpu_get_tb_cpu_state (CPUMIPSState *env,target_ulong *pc,target_ulong *cs_base,uint32_t *flags) {
target/mips/meson.build +1 -0
@@ -31,6 +31,7 @@ mips_softmmu_ss.add(files( 'cp0_timer.c', 'machine.c', 'mips-semi.c', + 'monitor.c', )) mips_softmmu_ss.add(when: 'CONFIG_TCG', if_true: files( 'cp0_helper.c',
target/mips/monitor.c new file +26 -0
@@ -0,0 +1,26 @@ +/* +* monitor.c +* +* Copyright (c) 2010-2021 Institute for System Programming +* of the Russian Academy of Sciences. +* +* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +* +*/ + +#include "qemu/osdep.h" +#include "cpu.h" +#include "monitor/monitor.h" +#include "monitor/hmp-target.h" +#include "monitor/hmp.h" + +void hmp_info_tlb (Monitor *mon,const QDict *qdict) +{ +CPUArchState *env =mon_get_cpu_env (mon); +if (!env) { +monitor_printf (mon,"No CPU available\n" ); +return ; + } +dump_mmu (env); +}
target/mips/tlb_helper.c +48 -0
60 lines not on this page · raw message
Signature · 1 line
2.25.1
Quoted 7 lines · Arkadiy
From: NDNF <[email protected]>
This adds hmp 'info tlb' command support for the mips platform. 1k pages are not supported.
Signed-off-by NDNF <[email protected]>
Hi; for QEMU contributions we request that the signed-off-by line is your real name, not a pseudonym; we follow basically the Linux kernel policy on this:
thanks
-- PMM
Quoted 7 lines · Peter Maydell
Quoted 6 lines · Arkadiy
From: NDNF <[email protected]>
This adds hmp 'info tlb' command support for the mips platform. 1k pages are not supported.
Quoted 7 lines
Quoted 1 line
Signed-off-by NDNF <[email protected]>Hi; for QEMU contributions we request that the signed-off-by line is your real name, not a pseudonym; we follow basically the Linux kernel policy on this:
This is probably an incorrect email setup due to problems with UTF-8 encoding and the list. Ivanov Arkasha already contributed to QEMU (see commit 56b90e60c40: "target/avr: Fix interrupt execution") Previous patches sent from аркадий иванов ("block: increased maximum size of vvfat devices") were rejected by the list.