Revision 355b1943 cpu-defs.h
b/cpu-defs.h | ||
---|---|---|
76 | 76 |
#define CPU_TLB_BITS 8 |
77 | 77 |
#define CPU_TLB_SIZE (1 << CPU_TLB_BITS) |
78 | 78 |
|
79 |
#if TARGET_PHYS_ADDR_BITS == 32 && TARGET_LONG_BITS == 32
|
|
79 |
#if HOST_LONG_BITS == 32 && TARGET_LONG_BITS == 32
|
|
80 | 80 |
#define CPU_TLB_ENTRY_BITS 4 |
81 | 81 |
#else |
82 | 82 |
#define CPU_TLB_ENTRY_BITS 5 |
... | ... | |
92 | 92 |
target_ulong addr_read; |
93 | 93 |
target_ulong addr_write; |
94 | 94 |
target_ulong addr_code; |
95 |
/* Addend to virtual address to get physical address. IO accesses
|
|
95 |
/* Addend to virtual address to get host address. IO accesses
|
|
96 | 96 |
use the corresponding iotlb value. */ |
97 |
#if TARGET_PHYS_ADDR_BITS == 64 |
|
98 |
/* on i386 Linux make sure it is aligned */ |
|
99 |
target_phys_addr_t addend __attribute__((aligned(8))); |
|
100 |
#else |
|
101 |
target_phys_addr_t addend; |
|
102 |
#endif |
|
97 |
unsigned long addend; |
|
103 | 98 |
/* padding to get a power of two size */ |
104 | 99 |
uint8_t dummy[(1 << CPU_TLB_ENTRY_BITS) - |
105 | 100 |
(sizeof(target_ulong) * 3 + |
106 |
((-sizeof(target_ulong) * 3) & (sizeof(target_phys_addr_t) - 1)) +
|
|
107 |
sizeof(target_phys_addr_t))];
|
|
101 |
((-sizeof(target_ulong) * 3) & (sizeof(unsigned long) - 1)) +
|
|
102 |
sizeof(unsigned long))];
|
|
108 | 103 |
} CPUTLBEntry; |
109 | 104 |
|
105 |
extern int CPUTLBEntry_wrong_size[sizeof(CPUTLBEntry) == (1 << CPU_TLB_ENTRY_BITS) ? 1 : -1]; |
|
106 |
|
|
110 | 107 |
#define CPU_COMMON_TLB \ |
111 | 108 |
/* The meaning of the MMU modes is defined in the target code. */ \ |
112 | 109 |
CPUTLBEntry tlb_table[NB_MMU_MODES][CPU_TLB_SIZE]; \ |
Also available in: Unified diff