diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c index 477e7457c6ac..51ec4d4663ec 100644 --- a/sys/sparc64/sparc64/machdep.c +++ b/sys/sparc64/sparc64/machdep.c @@ -205,7 +205,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec) { struct pcpu *pc; vm_offset_t end; - vm_offset_t off; + vm_offset_t va; caddr_t kmdp; end = 0; @@ -324,8 +324,8 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec) /* * Map and initialize the message buffer (after setting trap table). */ - for (off = 0; off < round_page(MSGBUF_SIZE); off += PAGE_SIZE) - pmap_kenter((vm_offset_t)msgbufp + off, msgbuf_phys + off); + va = (vm_offset_t)msgbufp; + pmap_map(&va, msgbuf_phys, msgbuf_phys + MSGBUF_SIZE, 0); msgbufinit(msgbufp, MSGBUF_SIZE); mutex_init();