mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-02 06:11:00 +00:00
target/sparc: remove MemoryRegionSection check code from sparc_cpu_get_phys_page_debug()
This code is preventing the MMU debug code from displaying virtual mappings of IO devices (anything that is not located in the RAM). Before this patch, Qemu would output 0xffffffffffffffff (-1) as the physical address corresponding to an IO device virtual address. With this patch the intended physical address is displayed. Backports commit 7e450a8f50ac12fc8f69b6ce555254c84efcf407 from qemu
This commit is contained in:
parent
13e1357dbf
commit
0a43963f3b
|
@ -849,18 +849,12 @@ hwaddr sparc_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
|
||||||
CPUSPARCState *env = &cpu->env;
|
CPUSPARCState *env = &cpu->env;
|
||||||
hwaddr phys_addr;
|
hwaddr phys_addr;
|
||||||
int mmu_idx = cpu_mmu_index(env, false);
|
int mmu_idx = cpu_mmu_index(env, false);
|
||||||
MemoryRegionSection section;
|
|
||||||
|
|
||||||
if (cpu_sparc_get_phys_page(env, &phys_addr, addr, 2, mmu_idx) != 0) {
|
if (cpu_sparc_get_phys_page(env, &phys_addr, addr, 2, mmu_idx) != 0) {
|
||||||
if (cpu_sparc_get_phys_page(env, &phys_addr, addr, 0, mmu_idx) != 0) {
|
if (cpu_sparc_get_phys_page(env, &phys_addr, addr, 0, mmu_idx) != 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
section = memory_region_find(get_system_memory(cs->uc), phys_addr, 1);
|
|
||||||
memory_region_unref(section.mr);
|
|
||||||
if (!int128_nz(section.size)) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return phys_addr;
|
return phys_addr;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue