mem: Add memory map logging
This commit is contained in:
@@ -2313,6 +2313,56 @@ mem_mapping_recalc(uint64_t base, uint64_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
flushmmucache_cr3();
|
flushmmucache_cr3();
|
||||||
|
|
||||||
|
#ifdef ENABLE_MEM_LOG
|
||||||
|
pclog("\nMemory map:\n");
|
||||||
|
mem_mapping_t *write = (mem_mapping_t *) -1, *read = (mem_mapping_t *) -1, *write_bus = (mem_mapping_t *) -1, *read_bus = (mem_mapping_t *) -1;
|
||||||
|
for (c = 0; c < (sizeof(write_mapping) / sizeof(write_mapping[0])); c++) {
|
||||||
|
if ((write_mapping[c] == write) && (read_mapping[c] == read) && (write_mapping_bus[c] == write_bus) && (read_mapping_bus[c] == read_bus))
|
||||||
|
continue;
|
||||||
|
write = write_mapping[c];
|
||||||
|
read = read_mapping[c];
|
||||||
|
write_bus = write_mapping_bus[c];
|
||||||
|
read_bus = read_mapping_bus[c];
|
||||||
|
|
||||||
|
pclog("%08X | ", c << MEM_GRANULARITY_BITS);
|
||||||
|
if (read) {
|
||||||
|
pclog("R%c%c%c %08X+% 8X",
|
||||||
|
read->read_b ? 'b' : ' ', read->read_w ? 'w' : ' ', read->read_l ? 'l' : ' ',
|
||||||
|
read->base, read->size);
|
||||||
|
} else {
|
||||||
|
pclog(" ");
|
||||||
|
}
|
||||||
|
if (write) {
|
||||||
|
pclog(" | W%c%c%c %08X+% 8X",
|
||||||
|
write->write_b ? 'b' : ' ', write->write_w ? 'w' : ' ', write->write_l ? 'l' : ' ',
|
||||||
|
write->base, write->size);
|
||||||
|
} else {
|
||||||
|
pclog(" | ");
|
||||||
|
}
|
||||||
|
pclog(" | %c\n", _mem_exec[c] ? 'X' : ' ');
|
||||||
|
|
||||||
|
if ((write != write_bus) || (read != read_bus)) {
|
||||||
|
pclog(" ^ bus | ");
|
||||||
|
if (read_bus) {
|
||||||
|
pclog("R%c%c%c %08X+% 8X",
|
||||||
|
read_bus->read_b ? 'b' : ' ', read_bus->read_w ? 'w' : ' ', read_bus->read_l ? 'l' : ' ',
|
||||||
|
read_bus->base, read_bus->size);
|
||||||
|
} else {
|
||||||
|
pclog(" ");
|
||||||
|
}
|
||||||
|
if (write_bus) {
|
||||||
|
pclog(" | W%c%c%c %08X+% 8X",
|
||||||
|
write_bus->write_b ? 'b' : ' ', write_bus->write_w ? 'w' : ' ', write_bus->write_l ? 'l' : ' ',
|
||||||
|
write_bus->base, write_bus->size);
|
||||||
|
} else {
|
||||||
|
pclog(" | ");
|
||||||
|
}
|
||||||
|
pclog(" |\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pclog("\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Reference in New Issue
Block a user