aboutsummaryrefslogtreecommitdiff
path: root/target-mips/cpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'target-mips/cpu.h')
-rw-r--r--target-mips/cpu.h32
1 files changed, 24 insertions, 8 deletions
diff --git a/target-mips/cpu.h b/target-mips/cpu.h
index 33cb6573eb..9e029199b7 100644
--- a/target-mips/cpu.h
+++ b/target-mips/cpu.h
@@ -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, ...));