qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH-for-9.1 12/21] target/nios2: Replace qemu_printf() by monitor_pri


From: Philippe Mathieu-Daudé
Subject: [PATCH-for-9.1 12/21] target/nios2: Replace qemu_printf() by monitor_printf() in monitor
Date: Thu, 21 Mar 2024 16:48:28 +0100

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/nios2/monitor.c | 31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/target/nios2/monitor.c b/target/nios2/monitor.c
index c6043769e4..983c16d7f8 100644
--- a/target/nios2/monitor.c
+++ b/target/nios2/monitor.c
@@ -22,7 +22,6 @@
  * THE SOFTWARE.
  */
 #include "qemu/osdep.h"
-#include "qemu/qemu-print.h"
 #include "cpu.h"
 #include "monitor/monitor.h"
 #include "monitor/hmp-target.h"
@@ -32,24 +31,24 @@ void nios2_info_mmu(Monitor *mon, CPUNios2State *env)
 {
     Nios2CPU *cpu = env_archcpu(env);
 
-    qemu_printf("MMU: ways %d, entries %d, pid bits %d\n",
-                cpu->tlb_num_ways, cpu->tlb_num_entries,
-                cpu->pid_num_bits);
+    monitor_printf(mon, "MMU: ways %d, entries %d, pid bits %d\n",
+                   cpu->tlb_num_ways, cpu->tlb_num_entries,
+                   cpu->pid_num_bits);
 
     for (int i = 0; i < cpu->tlb_num_entries; i++) {
         Nios2TLBEntry *entry = &env->mmu.tlb[i];
-        qemu_printf("TLB[%d] = %08X %08X %c VPN %05X "
-                    "PID %02X %c PFN %05X %c%c%c%c\n",
-                    i, entry->tag, entry->data,
-                    (entry->tag & (1 << 10)) ? 'V' : '-',
-                    entry->tag >> 12,
-                    entry->tag & ((1 << cpu->pid_num_bits) - 1),
-                    (entry->tag & (1 << 11)) ? 'G' : '-',
-                    FIELD_EX32(entry->data, CR_TLBACC, PFN),
-                    (entry->data & CR_TLBACC_C) ? 'C' : '-',
-                    (entry->data & CR_TLBACC_R) ? 'R' : '-',
-                    (entry->data & CR_TLBACC_W) ? 'W' : '-',
-                    (entry->data & CR_TLBACC_X) ? 'X' : '-');
+        monitor_printf(mon, "TLB[%d] = %08X %08X %c VPN %05X "
+                       "PID %02X %c PFN %05X %c%c%c%c\n",
+                       i, entry->tag, entry->data,
+                       (entry->tag & (1 << 10)) ? 'V' : '-',
+                       entry->tag >> 12,
+                       entry->tag & ((1 << cpu->pid_num_bits) - 1),
+                       (entry->tag & (1 << 11)) ? 'G' : '-',
+                       FIELD_EX32(entry->data, CR_TLBACC, PFN),
+                       (entry->data & CR_TLBACC_C) ? 'C' : '-',
+                       (entry->data & CR_TLBACC_R) ? 'R' : '-',
+                       (entry->data & CR_TLBACC_W) ? 'W' : '-',
+                       (entry->data & CR_TLBACC_X) ? 'X' : '-');
     }
 }
 
-- 
2.41.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]