diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -684,7 +684,7 @@ /* Create the l3 tables for the early devmap */ freemempos = pmap_bootstrap_l3(l1pt, - VM_MAX_KERNEL_ADDRESS - L2_SIZE, freemempos); + VM_MAX_KERNEL_ADDRESS - PMAP_MAPDEV_EARLY_SIZE, freemempos); /* * Invalidate the mapping we created for the DTB. At this point a copy @@ -738,7 +738,7 @@ msgbufp = (void *)msgbufpv; virtual_avail = roundup2(freemempos, L2_SIZE); - virtual_end = VM_MAX_KERNEL_ADDRESS - L2_SIZE; + virtual_end = VM_MAX_KERNEL_ADDRESS - PMAP_MAPDEV_EARLY_SIZE; kernel_vm_end = virtual_avail; pa = pmap_early_vtophys(l1pt, freemempos);