target/ppc: Add debug function for radix mmu translation
commit95cb0657766a495ca54caa15ab9feb5681c20f15
authorSuraj Jitindar Singh <sjitindarsingh@gmail.com>
Mon, 3 Jul 2017 06:19:47 +0000 (3 16:19 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 11 Jul 2017 01:04:02 +0000 (11 11:04 +1000)
tree63a382387721d1731c25d6503f0e85f7fe5d645d
parent6a042827b638dc73da6a72c72596f5be80bd4581
target/ppc: Add debug function for radix mmu translation

In target/ppc/mmu-hash64.c there already exists the function
ppc_hash64_get_phys_page_debug() to get the physical (real) address for
a given effective address in hash mode.

Implement the function ppc_radix64_get_phys_page_debug() to allow a real
address to be obtained for a given effective address in radix mode.
This is used when a debugger is attached to qemu.

Previously we just had a comment saying this is unimplemented which then
fell through to the default case and caused an abort due to
unrecognised mmu model as the default had no case for the V3 mmu, which
was misleading at best.

We reuse ppc_radix64_walk_tree() which is used by the radix fault
handler since the process of walking the radix tree is identical.

Reported-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/mmu-radix64.c
target/ppc/mmu-radix64.h
target/ppc/mmu_helper.c