target/hexagon: Add HMP info tlb command
PATCH v2 1/1 target/hexagon: Add HMP info tlb command
Reviewed-by Marc-André Lureau <[email protected]>
Signed-off-by Brian Cain <[email protected]>
--- target/hexagon/hmp-cmds.c | 23 +++++++++++++++++++++++ hmp-commands-info.hx | 3 ++- target/hexagon/meson.build | 1 + 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 target/hexagon/hmp-cmds.c
target/hexagon/hmp-cmds.c new file +23 -0
@@ -0,0 +1,23 @@ +/* +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include "qemu/osdep.h" +#include "cpu.h" +#include "hex_mmu.h" +#include "monitor/hmp.h" +#include "monitor/monitor.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 (mon, env); +}
hmp-commands-info.hx +2 -1
@@ -193,7 +193,8 @@ ERST .help = "show virtual to physical memory mappings", .cmd = hmp_info_tlb, .arch_bitmask = QEMU_ARCH_I386 | QEMU_ARCH_SH4 | QEMU_ARCH_SPARC \ - | QEMU_ARCH_PPC | QEMU_ARCH_XTENSA | QEMU_ARCH_M68K, + | QEMU_ARCH_PPC | QEMU_ARCH_XTENSA | QEMU_ARCH_M68K \ + | QEMU_ARCH_HEXAGON, }, SRST
target/hexagon/meson.build +1 -0
@@ -261,6 +261,7 @@ hexagon_softmmu_ss.add(files( 'hex_interrupts.c', 'hexswi.c', 'machine.c', + 'hmp-cmds.c', )) #
Signature · 1 line
2.34.1
Quoted 2 lines · * Brian Cain ([email protected]) wrote:
Reviewed-by Marc-André Lureau <[email protected]>Signed-off-by Brian Cain <[email protected]>
Quoted 65 lines
--- target/hexagon/hmp-cmds.c | 23 +++++++++++++++++++++++ hmp-commands-info.hx | 3 ++- target/hexagon/meson.build | 1 + 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 target/hexagon/hmp-cmds.ctarget/hexagon/hmp-cmds.c new file +23
-0@@ -0,0 +1,23 @@ +/* +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include "qemu/osdep.h" +#include "cpu.h" +#include "hex_mmu.h" +#include "monitor/hmp.h" +#include "monitor/monitor.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 (mon, env); +}hmp-commands-info.hx +2
-1@@ -193,7 +193,8 @@ ERST .help = "show virtual to physical memory mappings", .cmd = hmp_info_tlb, .arch_bitmask = QEMU_ARCH_I386 | QEMU_ARCH_SH4 | QEMU_ARCH_SPARC \ - | QEMU_ARCH_PPC | QEMU_ARCH_XTENSA | QEMU_ARCH_M68K, + | QEMU_ARCH_PPC | QEMU_ARCH_XTENSA | QEMU_ARCH_M68K \ + | QEMU_ARCH_HEXAGON, }, SRSTtarget/hexagon/meson.build +1
-0@@ -261,6 +261,7 @@ hexagon_softmmu_ss.add(files( 'hex_interrupts.c', 'hexswi.c', 'machine.c', + 'hmp-cmds.c', )) #Signature · 1 line
2.34.1
Signature · 4 lines
-----Open up your eyes, open up your mind, open up your code ------- / Dr. David Alan Gilbert | Running GNU/Linux | Happy \ \ dave @ treblig.org | | In Hex / \ _________________________|_____ http://www.treblig.org |_______/