Changeset View
Changeset View
Standalone View
Standalone View
sys/powerpc/booke/pmap.c
Show First 20 Lines • Show All 1,048 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
/* | /* | ||||
* Initialize the pmap module. | * Initialize the pmap module. | ||||
* Called by vm_init, to initialize any structures that the pmap | * Called by vm_init, to initialize any structures that the pmap | ||||
* system needs to map virtual memory. | * system needs to map virtual memory. | ||||
*/ | */ | ||||
static void | static void | ||||
mmu_booke_init() | mmu_booke_init(void) | ||||
{ | { | ||||
int shpgperproc = PMAP_SHPGPERPROC; | int shpgperproc = PMAP_SHPGPERPROC; | ||||
/* | /* | ||||
* Initialize the address space (zone) for the pv entries. Set a | * Initialize the address space (zone) for the pv entries. Set a | ||||
* high water mark so that the system can recover from excessive | * high water mark so that the system can recover from excessive | ||||
* numbers of pv entries. | * numbers of pv entries. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 1,048 Lines • ▼ Show 20 Lines | if (sz > (gran - ofs)) { | ||||
e.mas3 = 0; | e.mas3 = 0; | ||||
tlb1_write_entry(&e, i); | tlb1_write_entry(&e, i); | ||||
} | } | ||||
} | } | ||||
extern struct dump_pa dump_map[PHYS_AVAIL_SZ + 1]; | extern struct dump_pa dump_map[PHYS_AVAIL_SZ + 1]; | ||||
void | void | ||||
mmu_booke_scan_init() | mmu_booke_scan_init(void) | ||||
{ | { | ||||
vm_offset_t va; | vm_offset_t va; | ||||
pte_t *pte; | pte_t *pte; | ||||
int i; | int i; | ||||
if (!do_minidump) { | if (!do_minidump) { | ||||
/* Initialize phys. segments for dumpsys(). */ | /* Initialize phys. segments for dumpsys(). */ | ||||
memset(&dump_map, 0, sizeof(dump_map)); | memset(&dump_map, 0, sizeof(dump_map)); | ||||
▲ Show 20 Lines • Show All 686 Lines • ▼ Show 20 Lines | #endif | ||||
return (mapped); | return (mapped); | ||||
} | } | ||||
/* | /* | ||||
* TLB1 initialization routine, to be called after the very first | * TLB1 initialization routine, to be called after the very first | ||||
* assembler level setup done in locore.S. | * assembler level setup done in locore.S. | ||||
*/ | */ | ||||
void | void | ||||
tlb1_init() | tlb1_init(void) | ||||
{ | { | ||||
vm_offset_t mas2; | vm_offset_t mas2; | ||||
uint32_t mas0, mas1, mas3, mas7; | uint32_t mas0, mas1, mas3, mas7; | ||||
uint32_t tsz; | uint32_t tsz; | ||||
tlb1_get_tlbconf(); | tlb1_get_tlbconf(); | ||||
mas0 = MAS0_TLBSEL(1) | MAS0_ESEL(0); | mas0 = MAS0_TLBSEL(1) | MAS0_ESEL(0); | ||||
▲ Show 20 Lines • Show All 284 Lines • Show Last 20 Lines |