diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-11 14:47:08 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-11 14:47:08 +0000 |
commit | 5579c7f37ebba03f6732b4353cc7dc9fa497b7c2 (patch) | |
tree | 14a411453913b646c990567be406de96c54c2c45 /exec-all.h | |
parent | 31fc12df2c15a79e75a78288a552797a1be47f25 (diff) |
Remove code phys_ram_base uses.
Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7085 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'exec-all.h')
-rw-r--r-- | exec-all.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/exec-all.h b/exec-all.h index 33ccb7b445..0afaae86d1 100644 --- a/exec-all.h +++ b/exec-all.h @@ -316,6 +316,7 @@ static inline target_ulong get_phys_addr_code(CPUState *env1, target_ulong addr) static inline target_ulong get_phys_addr_code(CPUState *env1, target_ulong addr) { int mmu_idx, page_index, pd; + void *p; page_index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1); mmu_idx = cpu_mmu_index(env1); @@ -331,7 +332,9 @@ static inline target_ulong get_phys_addr_code(CPUState *env1, target_ulong addr) cpu_abort(env1, "Trying to execute code outside RAM or ROM at 0x" TARGET_FMT_lx "\n", addr); #endif } - return addr + env1->tlb_table[mmu_idx][page_index].addend - (unsigned long)phys_ram_base; + p = (void *)(unsigned long)addr + + env1->tlb_table[mmu_idx][page_index].addend; + return qemu_ram_addr_from_host(p); } /* Deterministic execution requires that IO only be performed on the last |