[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/10] PPC: monitor: add ability to dump SLB entries
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 01/10] PPC: monitor: add ability to dump SLB entries |
Date: |
Tue, 3 Jan 2012 16:08:13 +0100 |
From: Nishanth Aravamudan <address@hidden>
When run with a PPC Book3S (server) CPU Currently 'info tlb' in the
qemu monitor reports "dump_mmu: unimplemented". However, during
bringup work, it can be quite handy to have the SLB entries, which are
available in the CPUPPCState. This patch adds an implementation of
info tlb for book3s, which dumps the SLB.
Signed-off-by: Nishanth Aravamudan <address@hidden>
Signed-off-by: David Gibson <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
target-ppc/helper.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/target-ppc/helper.c b/target-ppc/helper.c
index 137a494..5847453 100644
--- a/target-ppc/helper.c
+++ b/target-ppc/helper.c
@@ -1545,12 +1545,40 @@ static void mmubooke206_dump_mmu(FILE *f,
fprintf_function cpu_fprintf,
}
}
+#if defined(TARGET_PPC64)
+static void mmubooks_dump_mmu(FILE *f, fprintf_function cpu_fprintf,
+ CPUState *env)
+{
+ int i;
+ uint64_t slbe, slbv;
+
+ cpu_synchronize_state(env);
+
+ cpu_fprintf(f, "SLB\tESID\t\t\tVSID\n");
+ for (i = 0; i < env->slb_nr; i++) {
+ slbe = env->slb[i].esid;
+ slbv = env->slb[i].vsid;
+ if (slbe == 0 && slbv == 0) {
+ continue;
+ }
+ cpu_fprintf(f, "%d\t0x%016" PRIx64 "\t0x%016" PRIx64 "\n",
+ i, slbe, slbv);
+ }
+}
+#endif
+
void dump_mmu(FILE *f, fprintf_function cpu_fprintf, CPUState *env)
{
switch (env->mmu_model) {
case POWERPC_MMU_BOOKE206:
mmubooke206_dump_mmu(f, cpu_fprintf, env);
break;
+#if defined(TARGET_PPC64)
+ case POWERPC_MMU_64B:
+ case POWERPC_MMU_2_06:
+ mmubooks_dump_mmu(f, cpu_fprintf, env);
+ break;
+#endif
default:
cpu_fprintf(f, "%s: unimplemented\n", __func__);
}
--
1.6.0.2
- [Qemu-devel] [PULL 00/10] ppc patch queue 2012-01-03, Alexander Graf, 2012/01/03
- [Qemu-devel] [PATCH 02/10] console: Fix segfault on screendump without VGA adapter, Alexander Graf, 2012/01/03
- [Qemu-devel] [PATCH 05/10] pseries: FDT NUMA extensions to support multi-node guests, Alexander Graf, 2012/01/03
- [Qemu-devel] [PATCH 08/10] pseries: Populate "/chosen/linux, stdout-path" in the FDT, Alexander Graf, 2012/01/03
- [Qemu-devel] [PATCH 10/10] PPC: Add description for the Freescale e500mc core., Alexander Graf, 2012/01/03
- [Qemu-devel] [PATCH 03/10] kvm-ppc: halt secondary cpus when guest reset, Alexander Graf, 2012/01/03
- [Qemu-devel] [PATCH 06/10] pseries: Emit device tree nodes in reg order, Alexander Graf, 2012/01/03
- [Qemu-devel] [PATCH 09/10] pseries: Check for duplicate addresses on the spapr-vio bus, Alexander Graf, 2012/01/03
- [Qemu-devel] [PATCH 01/10] PPC: monitor: add ability to dump SLB entries,
Alexander Graf <=
- [Qemu-devel] [PATCH 07/10] pseries: Add a routine to find a stable "default" vty and use it, Alexander Graf, 2012/01/03
- [Qemu-devel] [PATCH 04/10] pseries: Remove hcalls callback, Alexander Graf, 2012/01/03
- Re: [Qemu-devel] [PULL 00/10] ppc patch queue 2012-01-03, Aurelien Jarno, 2012/01/07