Revision a8170e5e monitor.c

b/monitor.c
1059 1059
}
1060 1060

  
1061 1061
static void memory_dump(Monitor *mon, int count, int format, int wsize,
1062
                        target_phys_addr_t addr, int is_physical)
1062
                        hwaddr addr, int is_physical)
1063 1063
{
1064 1064
    CPUArchState *env;
1065 1065
    int l, line_size, i, max_digits, len;
......
1193 1193
    int count = qdict_get_int(qdict, "count");
1194 1194
    int format = qdict_get_int(qdict, "format");
1195 1195
    int size = qdict_get_int(qdict, "size");
1196
    target_phys_addr_t addr = qdict_get_int(qdict, "addr");
1196
    hwaddr addr = qdict_get_int(qdict, "addr");
1197 1197

  
1198 1198
    memory_dump(mon, count, format, size, addr, 1);
1199 1199
}
......
1201 1201
static void do_print(Monitor *mon, const QDict *qdict)
1202 1202
{
1203 1203
    int format = qdict_get_int(qdict, "format");
1204
    target_phys_addr_t val = qdict_get_int(qdict, "val");
1204
    hwaddr val = qdict_get_int(qdict, "val");
1205 1205

  
1206 1206
    switch(format) {
1207 1207
    case 'o':
1208
        monitor_printf(mon, "%#" TARGET_PRIoPHYS, val);
1208
        monitor_printf(mon, "%#" HWADDR_PRIo, val);
1209 1209
        break;
1210 1210
    case 'x':
1211
        monitor_printf(mon, "%#" TARGET_PRIxPHYS, val);
1211
        monitor_printf(mon, "%#" HWADDR_PRIx, val);
1212 1212
        break;
1213 1213
    case 'u':
1214
        monitor_printf(mon, "%" TARGET_PRIuPHYS, val);
1214
        monitor_printf(mon, "%" HWADDR_PRIu, val);
1215 1215
        break;
1216 1216
    default:
1217 1217
    case 'd':
1218
        monitor_printf(mon, "%" TARGET_PRIdPHYS, val);
1218
        monitor_printf(mon, "%" HWADDR_PRId, val);
1219 1219
        break;
1220 1220
    case 'c':
1221 1221
        monitor_printc(mon, val);
......
1337 1337
}
1338 1338

  
1339 1339
#if defined(TARGET_I386)
1340
static void print_pte(Monitor *mon, target_phys_addr_t addr,
1341
                      target_phys_addr_t pte,
1342
                      target_phys_addr_t mask)
1340
static void print_pte(Monitor *mon, hwaddr addr,
1341
                      hwaddr pte,
1342
                      hwaddr mask)
1343 1343
{
1344 1344
#ifdef TARGET_X86_64
1345 1345
    if (addr & (1ULL << 47)) {
......
1408 1408
                    if (pde & PG_PSE_MASK) {
1409 1409
                        /* 2M pages with PAE, CR4.PSE is ignored */
1410 1410
                        print_pte(mon, (l1 << 30 ) + (l2 << 21), pde,
1411
                                  ~((target_phys_addr_t)(1 << 20) - 1));
1411
                                  ~((hwaddr)(1 << 20) - 1));
1412 1412
                    } else {
1413 1413
                        pt_addr = pde & 0x3fffffffff000ULL;
1414 1414
                        for (l3 = 0; l3 < 512; l3++) {
......
1418 1418
                                print_pte(mon, (l1 << 30 ) + (l2 << 21)
1419 1419
                                          + (l3 << 12),
1420 1420
                                          pte & ~PG_PSE_MASK,
1421
                                          ~(target_phys_addr_t)0xfff);
1421
                                          ~(hwaddr)0xfff);
1422 1422
                            }
1423 1423
                        }
1424 1424
                    }
......
1510 1510
    }
1511 1511
}
1512 1512

  
1513
static void mem_print(Monitor *mon, target_phys_addr_t *pstart,
1513
static void mem_print(Monitor *mon, hwaddr *pstart,
1514 1514
                      int *plast_prot,
1515
                      target_phys_addr_t end, int prot)
1515
                      hwaddr end, int prot)
1516 1516
{
1517 1517
    int prot1;
1518 1518
    prot1 = *plast_prot;
......
1538 1538
    unsigned int l1, l2;
1539 1539
    int prot, last_prot;
1540 1540
    uint32_t pgd, pde, pte;
1541
    target_phys_addr_t start, end;
1541
    hwaddr start, end;
1542 1542

  
1543 1543
    pgd = env->cr[3] & ~0xfff;
1544 1544
    last_prot = 0;
......
1571 1571
        }
1572 1572
    }
1573 1573
    /* Flush last range */
1574
    mem_print(mon, &start, &last_prot, (target_phys_addr_t)1 << 32, 0);
1574
    mem_print(mon, &start, &last_prot, (hwaddr)1 << 32, 0);
1575 1575
}
1576 1576

  
1577 1577
static void mem_info_pae32(Monitor *mon, CPUArchState *env)
......
1580 1580
    int prot, last_prot;
1581 1581
    uint64_t pdpe, pde, pte;
1582 1582
    uint64_t pdp_addr, pd_addr, pt_addr;
1583
    target_phys_addr_t start, end;
1583
    hwaddr start, end;
1584 1584

  
1585 1585
    pdp_addr = env->cr[3] & ~0x1f;
1586 1586
    last_prot = 0;
......
1626 1626
        }
1627 1627
    }
1628 1628
    /* Flush last range */
1629
    mem_print(mon, &start, &last_prot, (target_phys_addr_t)1 << 32, 0);
1629
    mem_print(mon, &start, &last_prot, (hwaddr)1 << 32, 0);
1630 1630
}
1631 1631

  
1632 1632

  
......
1705 1705
        }
1706 1706
    }
1707 1707
    /* Flush last range */
1708
    mem_print(mon, &start, &last_prot, (target_phys_addr_t)1 << 48, 0);
1708
    mem_print(mon, &start, &last_prot, (hwaddr)1 << 48, 0);
1709 1709
}
1710 1710
#endif
1711 1711

  

Also available in: Unified diff