mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
MIPS TLB style selection at runtime, by Herve Poussineau.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2809 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
f707cfba9a
commit
29929e3490
8 changed files with 149 additions and 114 deletions
|
@ -33,9 +33,8 @@ union fpr_t {
|
|||
# define FP_ENDIAN_IDX 0
|
||||
#endif
|
||||
|
||||
#if defined(MIPS_USES_R4K_TLB)
|
||||
typedef struct tlb_t tlb_t;
|
||||
struct tlb_t {
|
||||
typedef struct r4k_tlb_t r4k_tlb_t;
|
||||
struct r4k_tlb_t {
|
||||
target_ulong VPN;
|
||||
uint32_t PageMask;
|
||||
uint_fast8_t ASID;
|
||||
|
@ -48,7 +47,6 @@ struct tlb_t {
|
|||
uint_fast16_t D1:1;
|
||||
target_ulong PFN[2];
|
||||
};
|
||||
#endif
|
||||
|
||||
typedef struct CPUMIPSState CPUMIPSState;
|
||||
struct CPUMIPSState {
|
||||
|
@ -100,11 +98,19 @@ struct CPUMIPSState {
|
|||
#define FP_INVALID 16
|
||||
#define FP_UNIMPLEMENTED 32
|
||||
|
||||
#if defined(MIPS_USES_R4K_TLB)
|
||||
tlb_t tlb[MIPS_TLB_MAX];
|
||||
uint32_t tlb_in_use;
|
||||
uint32_t nb_tlb;
|
||||
#endif
|
||||
uint32_t tlb_in_use;
|
||||
int (*map_address) (CPUMIPSState *env, target_ulong *physical, int *prot, target_ulong address, int rw, int access_type);
|
||||
void (*do_tlbwi) (void);
|
||||
void (*do_tlbwr) (void);
|
||||
void (*do_tlbp) (void);
|
||||
void (*do_tlbr) (void);
|
||||
union {
|
||||
struct {
|
||||
r4k_tlb_t tlb[MIPS_TLB_MAX];
|
||||
} r4k;
|
||||
} mmu;
|
||||
|
||||
int32_t CP0_Index;
|
||||
int32_t CP0_Random;
|
||||
target_ulong CP0_EntryLo0;
|
||||
|
@ -289,6 +295,16 @@ struct CPUMIPSState {
|
|||
struct QEMUTimer *timer; /* Internal timer */
|
||||
};
|
||||
|
||||
int no_mmu_map_address (CPUMIPSState *env, target_ulong *physical, int *prot,
|
||||
target_ulong address, int rw, int access_type);
|
||||
int fixed_mmu_map_address (CPUMIPSState *env, target_ulong *physical, int *prot,
|
||||
target_ulong address, int rw, int access_type);
|
||||
int r4k_map_address (CPUMIPSState *env, target_ulong *physical, int *prot,
|
||||
target_ulong address, int rw, int access_type);
|
||||
void r4k_do_tlbwi (void);
|
||||
void r4k_do_tlbwr (void);
|
||||
void r4k_do_tlbp (void);
|
||||
void r4k_do_tlbr (void);
|
||||
typedef struct mips_def_t mips_def_t;
|
||||
int mips_find_by_name (const unsigned char *name, mips_def_t **def);
|
||||
void mips_cpu_list (FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue