summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2001-06-08 03:27:37 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2001-06-08 03:27:37 +0000
commit770fa01639d7722a906459df7780123cd3b62229 (patch)
treeb8c1cce8e1bb0e843b891a462deb43dae222d1f6 /sys
parent37950849063a8ba6857effcb862c73fc03a07061 (diff)
More changes from NetBSD that should have been part of the UVM update; tested
by beck@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/mac68k/mac68k/locore.s6
-rw-r--r--sys/arch/mac68k/mac68k/mem.c28
2 files changed, 18 insertions, 16 deletions
diff --git a/sys/arch/mac68k/mac68k/locore.s b/sys/arch/mac68k/mac68k/locore.s
index 5b4276a9f74..b98a37945e1 100644
--- a/sys/arch/mac68k/mac68k/locore.s
+++ b/sys/arch/mac68k/mac68k/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.25 2001/05/08 17:30:41 aaron Exp $ */
+/* $OpenBSD: locore.s,v 1.26 2001/06/08 03:27:36 aaron Exp $ */
/* $NetBSD: locore.s,v 1.103 1998/07/09 06:02:50 scottr Exp $ */
/*
@@ -116,8 +116,8 @@ GLOBAL(macos_tt1)
.long 0
GLOBAL(bletch)
.long 0
-GLOBAL(esym)
- .long 0
+
+BSS(esym,4)
ASENTRY_NOPROFILE(start)
movw #PSL_HIGHIPL,sr | no interrupts. ever.
diff --git a/sys/arch/mac68k/mac68k/mem.c b/sys/arch/mac68k/mac68k/mem.c
index ee5bda17417..bffcb61257d 100644
--- a/sys/arch/mac68k/mac68k/mem.c
+++ b/sys/arch/mac68k/mac68k/mem.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: mem.c,v 1.11 2001/05/08 17:30:41 aaron Exp $ */
-/* $NetBSD: mem.c,v 1.16 1998/11/10 07:29:59 scottr Exp $ */
+/* $OpenBSD: mem.c,v 1.12 2001/06/08 03:27:36 aaron Exp $ */
+/* $NetBSD: mem.c,v 1.22 1999/03/27 00:30:07 mycroft Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -106,11 +106,12 @@ mmrw(dev, uio, flags)
struct uio *uio;
int flags;
{
- register vm_offset_t o, v;
- register int c;
- register struct iovec *iov;
+ vaddr_t o, v;
+ int c;
+ struct iovec *iov;
int error = 0;
static int physlock;
+ vm_prot_t prot;
if (minor(dev) == 0) {
/* lock against other uses of shared vmmap */
@@ -146,14 +147,15 @@ mmrw(dev, uio, flags)
goto unlock;
}
- pmap_enter(pmap_kernel(), (vm_offset_t)vmmap,
- trunc_page(v), uio->uio_rw == UIO_READ ?
- VM_PROT_READ : VM_PROT_WRITE, TRUE, 0);
+ prot = uio->uio_rw == UIO_READ ? VM_PROT_READ :
+ VM_PROT_WRITE;
+ pmap_enter(pmap_kernel(), (vaddr_t)vmmap,
+ trunc_page(v), prot, TRUE, prot);
o = uio->uio_offset & PGOFSET;
c = min(uio->uio_resid, (int)(NBPG - o));
error = uiomove((caddr_t)vmmap + o, c, uio);
- pmap_remove(pmap_kernel(), (vm_offset_t)vmmap,
- (vm_offset_t)vmmap + NBPG);
+ pmap_remove(pmap_kernel(), (vaddr_t)vmmap,
+ (vaddr_t)vmmap + NBPG);
continue;
/* minor device 1 is kernel memory */
@@ -203,7 +205,7 @@ mmrw(dev, uio, flags)
}
if (error)
break;
- (caddr_t)iov->iov_base += c;
+ iov->iov_base = (caddr_t)iov->iov_base + c;
iov->iov_len -= c;
uio->uio_offset += c;
uio->uio_resid -= c;
@@ -236,10 +238,10 @@ mmmmap(dev, off, prot)
/*
* Only allow access to physical RAM.
*/
- if ((unsigned)off >= maxaddr)
+ if ((u_int)off >= maxaddr)
return (-1);
- return (m68k_btop(off));
+ return (m68k_btop((u_int)off));
}
int