0480884f14
The poorly named get_segment() function handles most of the address translation logic for hash-based MMUs. It has many ugly conditionals on whether the MMU is 32-bit or 64-bit. This patch splits the function into 32 and 64-bit versions, using the switch on mmu_type that's already in the caller (get_physical_address()) to select the right one. Most of the original function remains in mmu_helper.c to support the 6xx software loaded TLB implementations (cleaning those up is a project for another day). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
16 lines
437 B
C
16 lines
437 B
C
#if !defined (__MMU_HASH64_H__)
|
|
#define __MMU_HASH64_H__
|
|
|
|
#ifndef CONFIG_USER_ONLY
|
|
|
|
#ifdef TARGET_PPC64
|
|
void dump_slb(FILE *f, fprintf_function cpu_fprintf, CPUPPCState *env);
|
|
int ppc_store_slb (CPUPPCState *env, target_ulong rb, target_ulong rs);
|
|
int get_segment64(CPUPPCState *env, mmu_ctx_t *ctx,
|
|
target_ulong eaddr, int rw, int type);
|
|
#endif
|
|
|
|
#endif /* CONFIG_USER_ONLY */
|
|
|
|
#endif /* !defined (__MMU_HASH64_H__) */
|