Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/arm64/pmap.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 1,431 Lines • ▼ Show 20 Lines | pmap_bootstrap_san1(vm_offset_t va, int scale) | ||||
int i; | int i; | ||||
kernstart = pmap_early_vtophys(KERNBASE); | kernstart = pmap_early_vtophys(KERNBASE); | ||||
/* | /* | ||||
* Rebuild physmap one more time, we may have excluded more regions from | * Rebuild physmap one more time, we may have excluded more regions from | ||||
* allocation since pmap_bootstrap(). | * allocation since pmap_bootstrap(). | ||||
*/ | */ | ||||
bzero(physmap, sizeof(physmap)); | |||||
physmap_idx = physmem_avail(physmap, nitems(physmap)); | physmap_idx = physmem_avail(physmap, nitems(physmap)); | ||||
physmap_idx /= 2; | physmap_idx /= 2; | ||||
eva = va + (virtual_avail - VM_MIN_KERNEL_ADDRESS) / scale; | eva = va + (virtual_avail - VM_MIN_KERNEL_ADDRESS) / scale; | ||||
/* | /* | ||||
* Find a slot in the physmap large enough for what we needed. We try to put | * Find a slot in the physmap large enough for what we needed. We try to put | ||||
* the shadow map as high up as we can to avoid depleting the lower 4GB in case | * the shadow map as high up as we can to avoid depleting the lower 4GB in case | ||||
▲ Show 20 Lines • Show All 8,315 Lines • Show Last 20 Lines |