Revision 2bd9543c
b/hw/ppce500_mpc8544ds.c | ||
---|---|---|
174 | 174 |
/* Create -kernel TLB entries for BookE, linearly spanning 256MB. */ |
175 | 175 |
static inline target_phys_addr_t booke206_page_size_to_tlb(uint64_t size) |
176 | 176 |
{ |
177 |
return (ffs(size >> 10) - 1) >> 1;
|
|
177 |
return ffs(size >> 10) - 1;
|
|
178 | 178 |
} |
179 | 179 |
|
180 | 180 |
static void mmubooke_create_initial_mapping(CPUState *env, |
b/target-ppc/cpu.h | ||
---|---|---|
667 | 667 |
#define MAS0_ATSEL_TLB 0 |
668 | 668 |
#define MAS0_ATSEL_LRAT MAS0_ATSEL |
669 | 669 |
|
670 |
#define MAS1_TSIZE_SHIFT 8
|
|
671 |
#define MAS1_TSIZE_MASK (0xf << MAS1_TSIZE_SHIFT) |
|
670 |
#define MAS1_TSIZE_SHIFT 7
|
|
671 |
#define MAS1_TSIZE_MASK (0x1f << MAS1_TSIZE_SHIFT)
|
|
672 | 672 |
|
673 | 673 |
#define MAS1_TS_SHIFT 12 |
674 | 674 |
#define MAS1_TS (1 << MAS1_TS_SHIFT) |
b/target-ppc/helper.c | ||
---|---|---|
1293 | 1293 |
{ |
1294 | 1294 |
uint32_t tlbncfg; |
1295 | 1295 |
int tlbn = booke206_tlbm_to_tlbn(env, tlb); |
1296 |
target_phys_addr_t tlbm_size;
|
|
1296 |
int tlbm_size;
|
|
1297 | 1297 |
|
1298 | 1298 |
tlbncfg = env->spr[SPR_BOOKE_TLB0CFG + tlbn]; |
1299 | 1299 |
|
... | ... | |
1301 | 1301 |
tlbm_size = (tlb->mas1 & MAS1_TSIZE_MASK) >> MAS1_TSIZE_SHIFT; |
1302 | 1302 |
} else { |
1303 | 1303 |
tlbm_size = (tlbncfg & TLBnCFG_MINSIZE) >> TLBnCFG_MINSIZE_SHIFT; |
1304 |
tlbm_size <<= 1; |
|
1304 | 1305 |
} |
1305 | 1306 |
|
1306 |
return (1 << (tlbm_size << 1)) << 10;
|
|
1307 |
return 1024ULL << tlbm_size;
|
|
1307 | 1308 |
} |
1308 | 1309 |
|
1309 | 1310 |
/* TLB check function for MAS based SoftTLBs */ |
Also available in: Unified diff