Changeset View
Changeset View
Standalone View
Standalone View
head/sys/riscv/riscv/pmap.c
Show First 20 Lines • Show All 584 Lines • ▼ Show 20 Lines | pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, vm_size_t kernlen) | ||||
for (i = 0; i < physmap_idx * 2; i += 2) { | for (i = 0; i < physmap_idx * 2; i += 2) { | ||||
if (physmap[i] == physmap[i + 1]) | if (physmap[i] == physmap[i + 1]) | ||||
continue; | continue; | ||||
if (physmap[i] <= min_pa) | if (physmap[i] <= min_pa) | ||||
min_pa = physmap[i]; | min_pa = physmap[i]; | ||||
if (physmap[i + 1] > max_pa) | if (physmap[i + 1] > max_pa) | ||||
max_pa = physmap[i + 1]; | max_pa = physmap[i + 1]; | ||||
} | } | ||||
printf("physmap_idx %lx\n", physmap_idx); | printf("physmap_idx %u\n", physmap_idx); | ||||
printf("min_pa %lx\n", min_pa); | printf("min_pa %lx\n", min_pa); | ||||
printf("max_pa %lx\n", max_pa); | printf("max_pa %lx\n", max_pa); | ||||
/* Create a direct map region early so we can use it for pa -> va */ | /* Create a direct map region early so we can use it for pa -> va */ | ||||
pmap_bootstrap_dmap(l1pt, min_pa, max_pa); | pmap_bootstrap_dmap(l1pt, min_pa, max_pa); | ||||
/* | /* | ||||
* Read the page table to find out what is already mapped. | * Read the page table to find out what is already mapped. | ||||
▲ Show 20 Lines • Show All 4,034 Lines • Show Last 20 Lines |