kernel_pmap --> pmap_kernel()

This commit is contained in:
mycroft 1995-04-10 16:48:27 +00:00
parent e25c1817cf
commit 68c8c80929
20 changed files with 61 additions and 61 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ie.c,v 1.12 1995/02/16 21:50:43 pk Exp $ */
/* $NetBSD: if_ie.c,v 1.13 1995/04/10 16:48:27 mycroft Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995 Charles Hannum.
@ -516,7 +516,7 @@ ieattach(parent, self, aux)
* XXX
*/
ie_map = vm_map_create(kernel_pmap, (vm_offset_t)IEOB_ADBASE,
ie_map = vm_map_create(pmap_kernel(), (vm_offset_t)IEOB_ADBASE,
(vm_offset_t)IEOB_ADBASE + sc->sc_msize, 1);
if (ie_map == NULL) panic("ie_map");
sc->sc_maddr = (caddr_t) kmem_alloc(ie_map, sc->sc_msize);
@ -541,9 +541,9 @@ ieattach(parent, self, aux)
* to IEOB_ADBASE to be safe.
*/
pa = pmap_extract(kernel_pmap, (vm_offset_t)sc->sc_maddr);
pa = pmap_extract(pmap_kernel(), (vm_offset_t)sc->sc_maddr);
if (pa == 0) panic("ie pmap_extract");
pmap_enter(kernel_pmap, trunc_page(IEOB_ADBASE+IE_SCP_ADDR),
pmap_enter(pmap_kernel(), trunc_page(IEOB_ADBASE+IE_SCP_ADDR),
(vm_offset_t)pa | PMAP_NC,
VM_PROT_READ | VM_PROT_WRITE, 1);

View File

@ -1,4 +1,4 @@
/* $NetBSD: obio.c,v 1.12 1995/03/01 21:09:35 pk Exp $ */
/* $NetBSD: obio.c,v 1.13 1995/04/10 16:48:34 mycroft Exp $ */
/*
* Copyright (c) 1993, 1994 Theo de Raadt
@ -349,7 +349,7 @@ bus_tmp(pa, bustype)
vm_offset_t addr = (vm_offset_t)pa & ~PGOFSET;
int pmtype = bt2pmt[bustype];
pmap_enter(kernel_pmap, TMPMAP_VA,
pmap_enter(pmap_kernel(), TMPMAP_VA,
addr | pmtype | PMAP_NC,
VM_PROT_READ | VM_PROT_WRITE, 1);
return ((void *)TMPMAP_VA);
@ -358,5 +358,5 @@ bus_tmp(pa, bustype)
void
bus_untmp()
{
pmap_remove(kernel_pmap, TMPMAP_VA, TMPMAP_VA+NBPG);
pmap_remove(pmap_kernel(), TMPMAP_VA, TMPMAP_VA+NBPG);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.20 1995/02/16 21:51:38 pk Exp $ */
/* $NetBSD: clock.c,v 1.21 1995/04/10 16:48:44 mycroft Exp $ */
/*
* Copyright (c) 1992, 1993
@ -239,8 +239,8 @@ clockattach(parent, self, aux)
*/
cl = (struct clockreg *)mapiodev(ra->ra_paddr, 2 * NBPG,
ca->ca_bustype);
pmap_changeprot(kernel_pmap, (vm_offset_t)cl, VM_PROT_READ, 1);
pmap_changeprot(kernel_pmap, (vm_offset_t)cl + NBPG, VM_PROT_READ, 1);
pmap_changeprot(pmap_kernel(), (vm_offset_t)cl, VM_PROT_READ, 1);
pmap_changeprot(pmap_kernel(), (vm_offset_t)cl + NBPG, VM_PROT_READ, 1);
cl = (struct clockreg *)((int)cl + CLK_MK48T08_OFF);
} else {
/*
@ -248,7 +248,7 @@ clockattach(parent, self, aux)
*/
cl = (struct clockreg *)mapiodev(ra->ra_paddr, sizeof *clockreg,
ca->ca_bustype);
pmap_changeprot(kernel_pmap, (vm_offset_t)cl, VM_PROT_READ, 1);
pmap_changeprot(pmap_kernel(), (vm_offset_t)cl, VM_PROT_READ, 1);
idp = &cl->cl_idprom;
}
@ -325,7 +325,7 @@ clk_wenable(onoff)
prot = --writers == 0 ? VM_PROT_READ : 0;
splx(s);
if (prot)
pmap_changeprot(kernel_pmap, (vm_offset_t)clockreg, prot, 1);
pmap_changeprot(pmap_kernel(), (vm_offset_t)clockreg, prot, 1);
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.c,v 1.7 1994/12/16 21:52:36 deraadt Exp $ */
/* $NetBSD: intr.c,v 1.8 1995/04/10 16:48:48 mycroft Exp $ */
/*
* Copyright (c) 1992, 1993
@ -249,12 +249,12 @@ intr_fasttrap(level, vec)
I_MOVi(I_L3, level), I_BA(0, displ), I_RDPSR(I_L0));
#endif
/* kernel text is write protected -- let us in for a moment */
pmap_changeprot(kernel_pmap, (vm_offset_t)tv,
pmap_changeprot(pmap_kernel(), (vm_offset_t)tv,
VM_PROT_READ|VM_PROT_WRITE, 1);
tv->tv_instr[0] = I_SETHI(I_L3, hi22); /* sethi %hi(vec),%l3 */
tv->tv_instr[1] = I_JMPLri(I_G0, I_L3, lo10);/* jmpl %l3+%lo(vec),%g0 */
tv->tv_instr[2] = I_RDPSR(I_L0); /* mov %psr, %l0 */
pmap_changeprot(kernel_pmap, (vm_offset_t)tv, VM_PROT_READ, 1);
pmap_changeprot(pmap_kernel(), (vm_offset_t)tv, VM_PROT_READ, 1);
fastvec |= 1 << level;
splx(s);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.38 1995/01/11 21:21:11 pk Exp $ */
/* $NetBSD: machdep.c,v 1.39 1995/04/10 16:48:52 mycroft Exp $ */
/*
* Copyright (c) 1992, 1993
@ -209,7 +209,7 @@ cpu_startup()
* map, but we want one completely separate, even though it uses
* the same pmap.
*/
phys_map = vm_map_create(kernel_pmap, DVMA_BASE, DVMA_END, 1);
phys_map = vm_map_create(pmap_kernel(), DVMA_BASE, DVMA_END, 1);
if (phys_map == NULL)
panic("unable to create DVMA map");
@ -251,7 +251,7 @@ cpu_startup()
* fix message buffer mapping, note phys addr of msgbuf is 0
*/
pmap_enter(kernel_pmap, MSGBUF_VA, 0x0, VM_PROT_READ|VM_PROT_WRITE, 1);
pmap_enter(pmap_kernel(), MSGBUF_VA, 0x0, VM_PROT_READ|VM_PROT_WRITE, 1);
if (cputyp == CPU_SUN4)
msgbufp = (struct msgbuf *)(MSGBUF_VA + 4096);
else
@ -940,7 +940,7 @@ mapdev(phys, virt, size, bustype)
ret = (void *)v;
phys = (void *)trunc_page(phys);
do {
pmap_enter(kernel_pmap, v,
pmap_enter(pmap_kernel(), v,
(vm_offset_t)phys | pmtype | PMAP_NC,
VM_PROT_READ | VM_PROT_WRITE, 1);
v += PAGE_SIZE;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mem.c,v 1.8 1995/04/10 11:55:05 mycroft Exp $ */
/* $NetBSD: mem.c,v 1.9 1995/04/10 16:48:57 mycroft Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -121,13 +121,13 @@ mmrw(dev, uio, flags)
error = EFAULT;
goto unlock;
}
pmap_enter(kernel_pmap, (vm_offset_t)vmmap,
pmap_enter(pmap_kernel(), (vm_offset_t)vmmap,
trunc_page(v), uio->uio_rw == UIO_READ ?
VM_PROT_READ : VM_PROT_WRITE, TRUE);
o = uio->uio_offset & PGOFSET;
c = min(uio->uio_resid, (int)(NBPG - o));
error = uiomove((caddr_t)vmmap + o, c, uio);
pmap_remove(kernel_pmap, (vm_offset_t)vmmap,
pmap_remove(pmap_kernel(), (vm_offset_t)vmmap,
(vm_offset_t)vmmap + NBPG);
continue;

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.10 1995/02/23 19:56:24 pk Exp $ */
/* $NetBSD: vm_machdep.c,v 1.11 1995/04/10 16:49:02 mycroft Exp $ */
/*
* Copyright (c) 1992, 1993
@ -74,12 +74,12 @@ pagemove(from, to, size)
if (size & CLOFSET || (int)from & CLOFSET || (int)to & CLOFSET)
panic("pagemove 1");
while (size > 0) {
pa = pmap_extract(kernel_pmap, (vm_offset_t)from);
pa = pmap_extract(pmap_kernel(), (vm_offset_t)from);
if (pa == 0)
panic("pagemove 2");
pmap_remove(kernel_pmap,
pmap_remove(pmap_kernel(),
(vm_offset_t)from, (vm_offset_t)from + PAGE_SIZE);
pmap_enter(kernel_pmap,
pmap_enter(pmap_kernel(),
(vm_offset_t)to, pa, VM_PROT_READ|VM_PROT_WRITE, 1);
from += PAGE_SIZE;
to += PAGE_SIZE;

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.53 1995/04/10 11:58:33 mycroft Exp $ */
/* $NetBSD: machdep.c,v 1.54 1995/04/10 16:49:11 mycroft Exp $ */
/*
* Copyright (c) 1994 Gordon W. Ross
@ -288,7 +288,7 @@ void cpu_startup()
/*
* Allocate a map for physio and DVMA
*/
phys_map = vm_map_create(kernel_pmap, DVMA_SPACE_START,
phys_map = vm_map_create(pmap_kernel(), DVMA_SPACE_START,
DVMA_SPACE_END, TRUE);
if (phys_map == NULL)
panic("cpu_startup: unable to create physmap");

View File

@ -1,4 +1,4 @@
/* $NetBSD: mem.c,v 1.16 1995/04/10 11:55:07 mycroft Exp $ */
/* $NetBSD: mem.c,v 1.17 1995/04/10 16:49:14 mycroft Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -139,13 +139,13 @@ mmrw(dev, uio, flags)
physlock = 0;
goto use_kmem;
}
pmap_enter(kernel_pmap, (vm_offset_t)vmmap,
pmap_enter(pmap_kernel(), (vm_offset_t)vmmap,
trunc_page(v), uio->uio_rw == UIO_READ ?
VM_PROT_READ : VM_PROT_WRITE, TRUE);
o = uio->uio_offset & PGOFSET;
c = min(uio->uio_resid, (int)(NBPG - o));
error = uiomove((caddr_t)vmmap + o, c, uio);
pmap_remove(kernel_pmap, (vm_offset_t)vmmap,
pmap_remove(pmap_kernel(), (vm_offset_t)vmmap,
(vm_offset_t)vmmap + NBPG);
continue;

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.25 1995/04/03 22:06:11 gwr Exp $ */
/* $NetBSD: vm_machdep.c,v 1.26 1995/04/10 16:49:17 mycroft Exp $ */
/*
* Copyright (c) 1994 Gordon W. Ross
@ -340,14 +340,14 @@ void pagemove(from, to, size)
panic("pagemove 1");
#endif
while (size > 0) {
pa = pmap_extract(kernel_pmap, (vm_offset_t)from);
pa = pmap_extract(pmap_kernel(), (vm_offset_t)from);
#ifdef DIAGNOSTIC
if (pa == 0)
panic("pagemove 2");
#endif
pmap_remove(kernel_pmap,
pmap_remove(pmap_kernel(),
(vm_offset_t)from, (vm_offset_t)from + NBPG);
pmap_enter(kernel_pmap,
pmap_enter(pmap_kernel(),
(vm_offset_t)to, pa, VM_PROT_READ|VM_PROT_WRITE, 1);
from += NBPG;
to += NBPG;
@ -431,12 +431,12 @@ caddr_t dvma_remap(char *kva, int len)
dvma = (vm_offset_t) dvma1st;
while (len > 0) {
phys = pmap_extract(kernel_pmap, (vm_offset_t)kva);
phys = pmap_extract(pmap_kernel(), (vm_offset_t)kva);
if (phys == 0)
panic("dvma_remap: phys=0");
/* Duplicate the mapping */
pmap_enter(kernel_pmap, dvma,
pmap_enter(pmap_kernel(), dvma,
phys | PMAP_NC,
VM_PROT_ALL, FALSE);
@ -450,7 +450,7 @@ caddr_t dvma_remap(char *kva, int len)
void dvma_unmap(caddr_t dvma_addr, int len)
{
pmap_remove(kernel_pmap, (vm_offset_t)dvma_addr,
pmap_remove(pmap_kernel(), (vm_offset_t)dvma_addr,
(vm_offset_t)dvma_addr + len);
dvma_vm_free(dvma_addr, len);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.8 1995/03/30 21:25:23 ragge Exp $ */
/* $NetBSD: machdep.c,v 1.9 1995/04/10 16:49:22 mycroft Exp $ */
/* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
* Copyright (c) 1993 Adam Glass
@ -132,7 +132,7 @@ cpu_startup() {
*/
#if 0
for (i = 0; i < btoc(sizeof (struct msgbuf)); i++)
pmap_enter(kernel_pmap, (vm_offset_t)msgbufp,
pmap_enter(pmap_kernel(), (vm_offset_t)msgbufp,
avail_end + i * NBPG, VM_PROT_ALL, TRUE);
msgbufmapped = 1;
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: mem.c,v 1.6 1995/04/10 11:55:10 mycroft Exp $ */
/* $NetBSD: mem.c,v 1.7 1995/04/10 16:49:25 mycroft Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -121,13 +121,13 @@ mmrw(dev, uio, flags)
error = EFAULT;
goto unlock;
}
pmap_enter(kernel_pmap, (vm_offset_t)vmmap,
pmap_enter(pmap_kernel(), (vm_offset_t)vmmap,
trunc_page(v), uio->uio_rw == UIO_READ ?
VM_PROT_READ : VM_PROT_WRITE, TRUE);
o = uio->uio_offset & PGOFSET;
c = min(uio->uio_resid, (int)(NBPG - o));
error = uiomove((caddr_t)vmmap + o, c, uio);
pmap_remove(kernel_pmap, (vm_offset_t)vmmap,
pmap_remove(pmap_kernel(), (vm_offset_t)vmmap,
(vm_offset_t)vmmap + NBPG);
continue;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wd.c,v 1.136 1995/04/01 10:31:40 mycroft Exp $ */
/* $NetBSD: wd.c,v 1.137 1995/04/10 16:53:06 mycroft Exp $ */
/*
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
@ -1510,7 +1510,7 @@ wddump(dev)
}
#ifdef notdef /* Cannot use this since this address was mapped differently. */
pmap_enter(kernel_pmap, CADDR1, trunc_page(addr), VM_PROT_READ, TRUE);
pmap_enter(pmap_kernel(), CADDR1, trunc_page(addr), VM_PROT_READ, TRUE);
#else
*CMAP1 = PG_V | PG_KW | ctob((long)addr);
tlbflush();

View File

@ -1,4 +1,4 @@
/* $NetBSD: wd.c,v 1.136 1995/04/01 10:31:40 mycroft Exp $ */
/* $NetBSD: wd.c,v 1.137 1995/04/10 16:53:06 mycroft Exp $ */
/*
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
@ -1510,7 +1510,7 @@ wddump(dev)
}
#ifdef notdef /* Cannot use this since this address was mapped differently. */
pmap_enter(kernel_pmap, CADDR1, trunc_page(addr), VM_PROT_READ, TRUE);
pmap_enter(pmap_kernel(), CADDR1, trunc_page(addr), VM_PROT_READ, TRUE);
#else
*CMAP1 = PG_V | PG_KW | ctob((long)addr);
tlbflush();

View File

@ -1,4 +1,4 @@
/* $NetBSD: sd.c,v 1.66 1995/04/01 10:29:48 mycroft Exp $ */
/* $NetBSD: sd.c,v 1.67 1995/04/10 16:53:40 mycroft Exp $ */
/*
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
@ -927,7 +927,7 @@ sddump(dev_t dev)
blknum = dumplo + blkoff;
while (num > 0) {
pmap_enter(kernel_pmap,
pmap_enter(pmap_kernel(),
MAPTO,
trunc_page(addr),
VM_PROT_READ,

View File

@ -1,4 +1,4 @@
/* $NetBSD: sd.c,v 1.66 1995/04/01 10:29:48 mycroft Exp $ */
/* $NetBSD: sd.c,v 1.67 1995/04/10 16:53:40 mycroft Exp $ */
/*
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
@ -927,7 +927,7 @@ sddump(dev_t dev)
blknum = dumplo + blkoff;
while (num > 0) {
pmap_enter(kernel_pmap,
pmap_enter(pmap_kernel(),
MAPTO,
trunc_page(addr),
VM_PROT_READ,

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_glue.c,v 1.44 1995/01/09 01:30:46 cgd Exp $ */
/* $NetBSD: vm_glue.c,v 1.45 1995/04/10 16:53:51 mycroft Exp $ */
/*
* Copyright (c) 1991, 1993
@ -161,10 +161,10 @@ chgkprot(addr, len, rw)
* page 0 from an invalid mapping, not that it
* really matters...
*/
pa = pmap_extract(kernel_pmap, sva|1);
pa = pmap_extract(pmap_kernel(), sva|1);
if (pa == 0)
panic("chgkprot: invalid page");
pmap_enter(kernel_pmap, sva, pa&~1, prot, TRUE);
pmap_enter(pmap_kernel(), sva, pa&~1, prot, TRUE);
}
}
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_kern.c,v 1.16 1995/01/09 02:45:47 cgd Exp $ */
/* $NetBSD: vm_kern.c,v 1.17 1995/04/10 16:53:55 mycroft Exp $ */
/*
* Copyright (c) 1991, 1993
@ -447,7 +447,7 @@ kmem_init(start, end)
{
register vm_map_t m;
m = vm_map_create(kernel_pmap, VM_MIN_KERNEL_ADDRESS, end, FALSE);
m = vm_map_create(pmap_kernel(), VM_MIN_KERNEL_ADDRESS, end, FALSE);
vm_map_lock(m);
/* N.B.: cannot use kgdb to debug, starting with this assignment ... */
kernel_map = m;

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_map.c,v 1.20 1994/10/29 07:35:12 cgd Exp $ */
/* $NetBSD: vm_map.c,v 1.21 1995/04/10 16:54:00 mycroft Exp $ */
/*
* Copyright (c) 1991, 1993
@ -1311,7 +1311,7 @@ vm_map_pageable(map, start, end, new_pageable)
*
* HACK HACK HACK HACK
*/
if (vm_map_pmap(map) == kernel_pmap) {
if (vm_map_pmap(map) == pmap_kernel()) {
vm_map_unlock(map); /* trust me ... */
}
else {
@ -1343,7 +1343,7 @@ vm_map_pageable(map, start, end, new_pageable)
entry = entry->next;
}
if (vm_map_pmap(map) == kernel_pmap) {
if (vm_map_pmap(map) == pmap_kernel()) {
vm_map_lock(map);
}
else {

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_page.c,v 1.24 1995/03/27 09:09:05 cgd Exp $ */
/* $NetBSD: vm_page.c,v 1.25 1995/04/10 16:54:10 mycroft Exp $ */
/*
* Copyright (c) 1991, 1993
@ -480,7 +480,7 @@ pmap_steal_memory(size)
* but some pmap modules barf if they are.
*/
pmap_enter(kernel_pmap, vaddr, paddr,
pmap_enter(pmap_kernel(), vaddr, paddr,
VM_PROT_READ|VM_PROT_WRITE, FALSE);
}