Changeset View
Changeset View
Standalone View
Standalone View
sys/powerpc/booke/pmap.c
Context not available. | |||||
tsz = (mas1 & MAS1_TSIZE_MASK) >> MAS1_TSIZE_SHIFT; | tsz = (mas1 & MAS1_TSIZE_MASK) >> MAS1_TSIZE_SHIFT; | ||||
kernsize += (tsz > 0) ? tsize2size(tsz) : 0; | kernsize += (tsz > 0) ? tsize2size(tsz) : 0; | ||||
tlb1_set_entry(0xbffff000, 0xffe11c000ull, PAGE_SIZE, _TLB_ENTRY_SHARED | _TLB_ENTRY_IO); | |||||
jhibbits: This probably belongs with D7604, and should be conditional on EARLY_PRINTF. Also, if this… | |||||
/* Setup TLB miss defaults */ | /* Setup TLB miss defaults */ | ||||
set_mas4_defaults(); | set_mas4_defaults(); | ||||
} | } | ||||
void | |||||
pmap_early_io_unmap(vm_offset_t va, vm_size_t size) | |||||
{ | |||||
int i; | |||||
tlb_entry_t e; | |||||
for (i = 0; i < TLB1_ENTRIES && size > 0; i ++) { | |||||
tlb1_read_entry(&e, i); | |||||
if (!(e.mas1 & MAS1_VALID)) | |||||
continue; | |||||
if (va >= e.virt && (va + size) <= (e.virt + e.size)) { | |||||
jhibbitsUnsubmitted Not Done Inline ActionsThis will only work right if the mapping completely encloses the region, it won't work if the region spans multiple TLB mappings, which is possible to do in pmap_early_io_map(). Since it's only used in one location right now, I guess it's okay, but just add a comment here that it should be fixed in the future. jhibbits: This will only work right if the mapping completely encloses the region, it won't work if the… | |||||
size -= e.size; | |||||
e.mas1 &= ~MAS1_VALID; | |||||
tlb1_write_entry(&e, i); | |||||
} | |||||
} | |||||
} | |||||
vm_offset_t | vm_offset_t | ||||
pmap_early_io_map(vm_paddr_t pa, vm_size_t size) | pmap_early_io_map(vm_paddr_t pa, vm_size_t size) | ||||
{ | { | ||||
Context not available. |
This probably belongs with D7604, and should be conditional on EARLY_PRINTF. Also, if this line does go in, the PA argument should be a compile-time value, settable in the conf file. I can help you with that, but will comment on it in the D7604 review.