| 80 |
#define TB_JMP_CACHE_BITS 12 |
#define TB_JMP_CACHE_BITS 12 |
| 81 |
#define TB_JMP_CACHE_SIZE (1 << TB_JMP_CACHE_BITS) |
#define TB_JMP_CACHE_SIZE (1 << TB_JMP_CACHE_BITS) |
| 82 |
|
|
| 83 |
#define CPU_TLB_SIZE 256 |
#define CPU_TLB_BITS 8 |
| 84 |
|
#define CPU_TLB_SIZE (1 << CPU_TLB_BITS) |
| 85 |
|
|
| 86 |
typedef struct CPUTLBEntry { |
typedef struct CPUTLBEntry { |
| 87 |
/* bit 31 to TARGET_PAGE_BITS : virtual address |
/* bit 31 to TARGET_PAGE_BITS : virtual address |
| 90 |
bit 3 : indicates that the entry is invalid |
bit 3 : indicates that the entry is invalid |
| 91 |
bit 2..0 : zero |
bit 2..0 : zero |
| 92 |
*/ |
*/ |
| 93 |
target_ulong address; |
target_ulong addr_read; |
| 94 |
|
target_ulong addr_write; |
| 95 |
|
target_ulong addr_code; |
| 96 |
/* addend to virtual address to get physical address */ |
/* addend to virtual address to get physical address */ |
| 97 |
target_phys_addr_t addend; |
target_phys_addr_t addend; |
| 98 |
} CPUTLBEntry; |
} CPUTLBEntry; |
| 108 |
target_ulong mem_write_vaddr; /* target virtual addr at which the \ |
target_ulong mem_write_vaddr; /* target virtual addr at which the \ |
| 109 |
memory was written */ \ |
memory was written */ \ |
| 110 |
/* 0 = kernel, 1 = user */ \ |
/* 0 = kernel, 1 = user */ \ |
| 111 |
CPUTLBEntry tlb_read[2][CPU_TLB_SIZE]; \ |
CPUTLBEntry tlb_table[2][CPU_TLB_SIZE]; \ |
|
CPUTLBEntry tlb_write[2][CPU_TLB_SIZE]; \ |
|
| 112 |
struct TranslationBlock *tb_jmp_cache[TB_JMP_CACHE_SIZE]; \ |
struct TranslationBlock *tb_jmp_cache[TB_JMP_CACHE_SIZE]; \ |
| 113 |
\ |
\ |
| 114 |
/* from this point: preserved by CPU reset */ \ |
/* from this point: preserved by CPU reset */ \ |