Revision 7c664e2f

b/monitor.c
1245 1245
}
1246 1246
#endif
1247 1247

  
1248
#if defined(TARGET_SH4)
1249

  
1250
static void print_tlb(int idx, tlb_t *tlb)
1251
{
1252
    term_printf(" tlb%i:\t"
1253
                "asid=%hhu vpn=%x\tppn=%x\tsz=%hhu size=%u\t"
1254
                "v=%hhu shared=%hhu cached=%hhu prot=%hhu "
1255
                "dirty=%hhu writethrough=%hhu\n",
1256
                idx,
1257
                tlb->asid, tlb->vpn, tlb->ppn, tlb->sz, tlb->size,
1258
                tlb->v, tlb->sh, tlb->c, tlb->pr,
1259
                tlb->d, tlb->wt);
1260
}
1261

  
1262
static void tlb_info(void)
1263
{
1264
    CPUState *env = mon_get_cpu();
1265
    int i;
1266

  
1267
    term_printf ("ITLB:\n");
1268
    for (i = 0 ; i < ITLB_SIZE ; i++)
1269
        print_tlb (i, &env->itlb[i]);
1270
    term_printf ("UTLB:\n");
1271
    for (i = 0 ; i < UTLB_SIZE ; i++)
1272
        print_tlb (i, &env->utlb[i]);
1273
}
1274

  
1275
#endif
1276

  
1248 1277
static void do_info_kqemu(void)
1249 1278
{
1250 1279
#ifdef USE_KQEMU
......
1556 1585
      "", "show i8259 (PIC) state", },
1557 1586
    { "pci", "", pci_info,
1558 1587
      "", "show PCI info", },
1559
#if defined(TARGET_I386)
1588
#if defined(TARGET_I386) || defined(TARGET_SH4)
1560 1589
    { "tlb", "", tlb_info,
1561 1590
      "", "show virtual to physical memory mappings", },
1591
#endif
1592
#if defined(TARGET_I386)
1562 1593
    { "mem", "", mem_info,
1563 1594
      "", "show the active virtual memory mappings", },
1564 1595
    { "hpet", "", do_info_hpet,

Also available in: Unified diff