mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-10 11:04:58 -06:00
target/ppc: Move 1T segment and AMR options to PPCHash64Options
Currently env->mmu_model is a bit of an unholy mess of an enum of distinct MMU types, with various flag bits as well. This makes which bits of the field should be compared pretty confusing. Make a start on cleaning that up by moving two of the flags bits - POWERPC_MMU_1TSEG and POWERPC_MMU_AMR - which are specific to the 64-bit hash MMU into a new flags field in PPCHash64Options structure. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Greg Kurz <groug@kaod.org>
This commit is contained in:
parent
21e405f1ec
commit
58969eeece
6 changed files with 20 additions and 14 deletions
|
@ -153,12 +153,20 @@ struct PPCHash64SegmentPageSizes {
|
|||
};
|
||||
|
||||
struct PPCHash64Options {
|
||||
#define PPC_HASH64_1TSEG 0x00001
|
||||
#define PPC_HASH64_AMR 0x00002
|
||||
unsigned flags;
|
||||
PPCHash64SegmentPageSizes sps[PPC_PAGE_SIZES_MAX_SZ];
|
||||
};
|
||||
|
||||
extern const PPCHash64Options ppc_hash64_opts_basic;
|
||||
extern const PPCHash64Options ppc_hash64_opts_POWER7;
|
||||
|
||||
static inline bool ppc_hash64_has(PowerPCCPU *cpu, unsigned feature)
|
||||
{
|
||||
return !!(cpu->hash64_opts->flags & feature);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_USER_ONLY */
|
||||
|
||||
#if defined(CONFIG_USER_ONLY) || !defined(TARGET_PPC64)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue