mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-22 14:30:31 +00:00
ppcmmu: Add phys address to mmu_translate_imem.
For debugging.
This commit is contained in:
parent
3a5a70b56d
commit
500f38a496
@ -682,7 +682,7 @@ static inline TLBEntry* lookup_secondary_tlb(uint32_t guest_va, uint32_t tag) {
|
||||
return tlb_entry;
|
||||
}
|
||||
|
||||
uint8_t *mmu_translate_imem(uint32_t vaddr)
|
||||
uint8_t *mmu_translate_imem(uint32_t vaddr, uint32_t *paddr)
|
||||
{
|
||||
TLBEntry *tlb1_entry, *tlb2_entry;
|
||||
uint8_t *host_va;
|
||||
@ -725,6 +725,8 @@ uint8_t *mmu_translate_imem(uint32_t vaddr)
|
||||
}
|
||||
|
||||
ppc_set_cur_instruction(host_va);
|
||||
if (paddr)
|
||||
*paddr = tlb1_entry->phys_tag | (vaddr & 0xFFFUL);
|
||||
|
||||
return host_va;
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ extern void mmu_pat_ctx_changed();
|
||||
extern void tlb_flush_entry(uint32_t ea);
|
||||
|
||||
extern uint64_t mem_read_dbg(uint32_t virt_addr, uint32_t size);
|
||||
uint8_t *mmu_translate_imem(uint32_t vaddr);
|
||||
uint8_t *mmu_translate_imem(uint32_t vaddr, uint32_t *paddr = nullptr);
|
||||
|
||||
template <class T>
|
||||
extern T mmu_read_vmem(uint32_t guest_va);
|
||||
|
Loading…
x
Reference in New Issue
Block a user