Changeset View
Changeset View
Standalone View
Standalone View
head/sys/powerpc/aim/moea64_native.c
Show First 20 Lines • Show All 395 Lines • ▼ Show 20 Lines | for (i = 0; i < 16; i++) | ||||
mtsrin(i << ADDR_SR_SHFT, kernel_pmap->pm_sr[i]); | mtsrin(i << ADDR_SR_SHFT, kernel_pmap->pm_sr[i]); | ||||
#endif | #endif | ||||
/* | /* | ||||
* Install page table | * Install page table | ||||
*/ | */ | ||||
__asm __volatile ("ptesync; mtsdr1 %0; isync" | __asm __volatile ("ptesync; mtsdr1 %0; isync" | ||||
:: "r"((uintptr_t)moea64_pteg_table | :: "r"(((uintptr_t)moea64_pteg_table & ~DMAP_BASE_ADDRESS) | ||||
| (uintptr_t)(flsl(moea64_pteg_mask >> 11)))); | | (uintptr_t)(flsl(moea64_pteg_mask >> 11)))); | ||||
tlbia(); | tlbia(); | ||||
} | } | ||||
static void | static void | ||||
moea64_bootstrap_native(mmu_t mmup, vm_offset_t kernelstart, | moea64_bootstrap_native(mmu_t mmup, vm_offset_t kernelstart, | ||||
vm_offset_t kernelend) | vm_offset_t kernelend) | ||||
{ | { | ||||
Show All 16 Lines | moea64_bootstrap_native(mmu_t mmup, vm_offset_t kernelstart, | ||||
/* | /* | ||||
* We now need to allocate memory. This memory, to be allocated, | * We now need to allocate memory. This memory, to be allocated, | ||||
* has to reside in a page table. The page table we are about to | * has to reside in a page table. The page table we are about to | ||||
* allocate. We don't have BAT. So drop to data real mode for a minute | * allocate. We don't have BAT. So drop to data real mode for a minute | ||||
* as a measure of last resort. We do this a couple times. | * as a measure of last resort. We do this a couple times. | ||||
*/ | */ | ||||
moea64_pteg_table = (struct lpte *)moea64_bootstrap_alloc(size, size); | moea64_pteg_table = (struct lpte *)moea64_bootstrap_alloc(size, size); | ||||
if (hw_direct_map) | |||||
moea64_pteg_table = | |||||
(struct lpte *)PHYS_TO_DMAP((vm_offset_t)moea64_pteg_table); | |||||
DISABLE_TRANS(msr); | DISABLE_TRANS(msr); | ||||
bzero(__DEVOLATILE(void *, moea64_pteg_table), moea64_pteg_count * | bzero(__DEVOLATILE(void *, moea64_pteg_table), moea64_pteg_count * | ||||
sizeof(struct lpteg)); | sizeof(struct lpteg)); | ||||
ENABLE_TRANS(msr); | ENABLE_TRANS(msr); | ||||
CTR1(KTR_PMAP, "moea64_bootstrap: PTEG table at %p", moea64_pteg_table); | CTR1(KTR_PMAP, "moea64_bootstrap: PTEG table at %p", moea64_pteg_table); | ||||
moea64_mid_bootstrap(mmup, kernelstart, kernelend); | moea64_mid_bootstrap(mmup, kernelstart, kernelend); | ||||
▲ Show 20 Lines • Show All 234 Lines • Show Last 20 Lines |