28 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
29 |
* |
* |
30 |
* |
* |
31 |
* $Id: cpu_mips.h,v 1.16 2005/06/26 22:23:43 debug Exp $ |
* $Id: cpu_mips.h,v 1.20 2005/08/07 17:42:03 debug Exp $ |
32 |
*/ |
*/ |
33 |
|
|
34 |
#include "misc.h" |
#include "misc.h" |
57 |
char isa_level; /* 1, 2, 3, 4, 5, 32, 64 */ |
char isa_level; /* 1, 2, 3, 4, 5, 32, 64 */ |
58 |
int nr_of_tlb_entries; /* 32, 48, 64, ... */ |
int nr_of_tlb_entries; /* 32, 48, 64, ... */ |
59 |
char instrs_per_cycle; /* simplified, 1, 2, or 4 */ |
char instrs_per_cycle; /* simplified, 1, 2, or 4 */ |
60 |
int default_picache; |
int picache; |
61 |
int default_pdcache; |
int pilinesize; |
62 |
int default_pilinesize; |
int piways; |
63 |
int default_pdlinesize; |
int pdcache; |
64 |
int default_scache; |
int pdlinesize; |
65 |
int default_slinesize; |
int pdways; |
66 |
|
int scache; |
67 |
|
int slinesize; |
68 |
|
int sways; |
69 |
}; |
}; |
70 |
|
|
71 |
#define INITIAL_PC 0xffffffffbfc00000ULL |
#define INITIAL_PC 0xffffffffbfc00000ULL |
262 |
uint64_t pc_last_physical_page; |
uint64_t pc_last_physical_page; |
263 |
unsigned char *pc_last_host_4k_page; |
unsigned char *pc_last_host_4k_page; |
264 |
|
|
265 |
#ifdef BINTRANS |
/* MIPS Bintrans: */ |
266 |
int dont_run_next_bintrans; |
int dont_run_next_bintrans; |
267 |
int bintrans_instructions_executed; /* set to the |
int bintrans_instructions_executed; /* set to the |
268 |
number of bintranslated instructions executed |
number of bintranslated instructions executed |
285 |
struct vth32_table **vaddr_to_hostaddr_table0; /* should point to kernel or user */ |
struct vth32_table **vaddr_to_hostaddr_table0; /* should point to kernel or user */ |
286 |
struct vth32_table *next_free_vth_table; |
struct vth32_table *next_free_vth_table; |
287 |
|
|
288 |
|
/* Testing... */ |
289 |
|
unsigned char **host_load; |
290 |
|
unsigned char **host_store; |
291 |
|
unsigned char **host_load_orig; |
292 |
|
unsigned char **host_store_orig; |
293 |
|
unsigned char **huge_r2k3k_cache_table; |
294 |
|
|
295 |
/* For 64-bit (generic) emulation: */ |
/* For 64-bit (generic) emulation: */ |
296 |
unsigned char *(*fast_vaddr_to_hostaddr)(struct cpu *cpu, |
unsigned char *(*fast_vaddr_to_hostaddr)(struct cpu *cpu, |
297 |
uint64_t vaddr, int writeflag); |
uint64_t vaddr, int writeflag); |
308 |
void (*bintrans_fast_eret)(struct cpu *); |
void (*bintrans_fast_eret)(struct cpu *); |
309 |
void (*bintrans_fast_tlbwri)(struct cpu *, int); |
void (*bintrans_fast_tlbwri)(struct cpu *, int); |
310 |
void (*bintrans_fast_tlbpr)(struct cpu *, int); |
void (*bintrans_fast_tlbpr)(struct cpu *, int); |
|
#endif |
|
311 |
|
|
312 |
#ifdef ENABLE_MIPS16 |
#ifdef ENABLE_MIPS16 |
313 |
int mips16; /* non-zero if MIPS16 code is allowed */ |
int mips16; /* non-zero if MIPS16 code is allowed */ |
318 |
int instruction_delay; |
int instruction_delay; |
319 |
#endif |
#endif |
320 |
|
|
|
int trace_tree_depth; |
|
|
|
|
321 |
uint64_t delay_jmpaddr; /* only used if delay_slot > 0 */ |
uint64_t delay_jmpaddr; /* only used if delay_slot > 0 */ |
322 |
int delay_slot; |
int delay_slot; |
323 |
int nullify_next; /* set to 1 if next instruction |
int nullify_next; /* set to 1 if next instruction |
402 |
uint64_t vaddr, uint64_t paddr0, uint64_t paddr1, |
uint64_t vaddr, uint64_t paddr0, uint64_t paddr1, |
403 |
int valid0, int valid1, int dirty0, int dirty1, int global, int asid, |
int valid0, int valid1, int dirty0, int dirty1, int global, int asid, |
404 |
int cachealgo0, int cachealgo1); |
int cachealgo0, int cachealgo1); |
405 |
void update_translation_table(struct cpu *cpu, uint64_t vaddr_page, |
void mips_update_translation_table(struct cpu *cpu, uint64_t vaddr_page, |
406 |
unsigned char *host_page, int writeflag, uint64_t paddr_page); |
unsigned char *host_page, int writeflag, uint64_t paddr_page); |
407 |
void clear_all_chunks_from_all_tables(struct cpu *cpu); |
void clear_all_chunks_from_all_tables(struct cpu *cpu); |
408 |
void mips_invalidate_translation_caches_paddr(struct cpu *cpu, uint64_t paddr); |
void mips_invalidate_translation_caches_paddr(struct cpu *cpu, uint64_t paddr); |