aboutsummaryrefslogtreecommitdiff
path: root/target-ppc
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-01-24 15:18:16 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-01-24 15:18:16 +0000
commita6b025d37d13fffe6f2bc0b5fc8d88503348eeb7 (patch)
tree875873c7f655ad05cac1df6d3b4a73bdfd1c983a /target-ppc
parentedfcbd99373f44d61980d731a9e176591a85f420 (diff)
added cpu_get_phys_page_debug()
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@579 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc')
-rw-r--r--target-ppc/helper.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/target-ppc/helper.c b/target-ppc/helper.c
index 1520d6c821..50c480e2b5 100644
--- a/target-ppc/helper.c
+++ b/target-ppc/helper.c
@@ -414,6 +414,22 @@ int get_physical_address (CPUState *env, uint32_t *physical, int *prot,
return ret;
}
+#if defined(CONFIG_USER_ONLY)
+target_ulong cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
+{
+ return addr;
+}
+#else
+target_ulong cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
+{
+ uint32_t phys_addr;
+ int prot;
+
+ if (get_physical_address(env, &phys_addr, &prot, addr, 0, ACCESS_INT) != 0)
+ return -1;
+ return phys_addr;
+}
+#endif
#if !defined(CONFIG_USER_ONLY)