Commit a6b025d37d13fffe6f2bc0b5fc8d88503348eeb7

Authored by bellard
1 parent edfcbd99

added cpu_get_phys_page_debug()


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@579 c046a42c-6fe2-441c-8c8c-71466251a162
target-arm/translate.c
... ... @@ -897,3 +897,8 @@ void cpu_arm_dump_state(CPUARMState *env, FILE *f, int flags)
897 897 env->cpsr & (1 << 29) ? 'C' : '-',
898 898 env->cpsr & (1 << 28) ? 'V' : '-');
899 899 }
  900 +
  901 +target_ulong cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
  902 +{
  903 + return addr;
  904 +}
... ...
target-ppc/helper.c
... ... @@ -414,6 +414,22 @@ int get_physical_address (CPUState *env, uint32_t *physical, int *prot,
414 414 return ret;
415 415 }
416 416  
  417 +#if defined(CONFIG_USER_ONLY)
  418 +target_ulong cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
  419 +{
  420 + return addr;
  421 +}
  422 +#else
  423 +target_ulong cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
  424 +{
  425 + uint32_t phys_addr;
  426 + int prot;
  427 +
  428 + if (get_physical_address(env, &phys_addr, &prot, addr, 0, ACCESS_INT) != 0)
  429 + return -1;
  430 + return phys_addr;
  431 +}
  432 +#endif
417 433  
418 434 #if !defined(CONFIG_USER_ONLY)
419 435  
... ...