summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/mac68k/mac68k/locore.s34
-rw-r--r--sys/arch/mac68k/mac68k/mem.c12
-rw-r--r--sys/arch/mac68k/mac68k/pmap.c6
3 files changed, 10 insertions, 42 deletions
diff --git a/sys/arch/mac68k/mac68k/locore.s b/sys/arch/mac68k/mac68k/locore.s
index 94b2b1bf8ef..ac74bedde32 100644
--- a/sys/arch/mac68k/mac68k/locore.s
+++ b/sys/arch/mac68k/mac68k/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.16 1997/01/24 01:35:47 briggs Exp $ */
+/* $OpenBSD: locore.s,v 1.17 1997/02/10 12:01:45 downsj Exp $ */
/* $NetBSD: locore.s,v 1.73 1997/01/09 07:28:12 scottr Exp $ */
/*
@@ -1115,38 +1115,6 @@ _esigcode:
#include <m68k/asm.h>
/*
- * copypage(fromaddr, toaddr)
- *
- * Optimized version of bcopy for a single page-aligned NBPG byte copy.
- */
-ENTRY(copypage)
- movl sp@(4),a0 | source address
- movl sp@(8),a1 | destination address
- movl #NBPG/32,d0 | number of 32 byte chunks
-#if defined(M68040)
- cmpl #MMU_68040,_mmutype | 68040?
- jne Lmlloop | no, use movl
-Lm16loop:
- .long 0xf6209000 | move16 a0@+,a1@+
- .long 0xf6209000 | move16 a0@+,a1@+
- subql #1,d0
- jne Lm16loop
- rts
-#endif
-Lmlloop:
- movl a0@+,a1@+
- movl a0@+,a1@+
- movl a0@+,a1@+
- movl a0@+,a1@+
- movl a0@+,a1@+
- movl a0@+,a1@+
- movl a0@+,a1@+
- movl a0@+,a1@+
- subql #1,d0
- jne Lmlloop
- rts
-
-/*
* non-local gotos
*/
ENTRY(setjmp)
diff --git a/sys/arch/mac68k/mac68k/mem.c b/sys/arch/mac68k/mac68k/mem.c
index 34e02c57c10..f9dd4160bbd 100644
--- a/sys/arch/mac68k/mac68k/mem.c
+++ b/sys/arch/mac68k/mac68k/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.3 1996/06/08 16:21:16 briggs Exp $ */
+/* $OpenBSD: mem.c,v 1.4 1997/02/10 12:01:47 downsj Exp $ */
/* $NetBSD: mem.c,v 1.11 1996/05/05 06:18:41 briggs Exp $ */
/*
@@ -57,7 +57,7 @@
#include <vm/vm.h>
-caddr_t zeropage;
+static caddr_t devzeropage;
#define mmread mmrw
#define mmwrite mmrw
@@ -155,13 +155,13 @@ mmrw(dev, uio, flags)
c = iov->iov_len;
break;
}
- if (zeropage == NULL) {
- zeropage = (caddr_t)
+ if (devzeropage == NULL) {
+ devzeropage = (caddr_t)
malloc(CLBYTES, M_TEMP, M_WAITOK);
- bzero(zeropage, CLBYTES);
+ bzero(devzeropage, CLBYTES);
}
c = min(iov->iov_len, CLBYTES);
- error = uiomove(zeropage, c, uio);
+ error = uiomove(devzeropage, c, uio);
continue;
default:
diff --git a/sys/arch/mac68k/mac68k/pmap.c b/sys/arch/mac68k/mac68k/pmap.c
index 20001f22c53..d925b9225a8 100644
--- a/sys/arch/mac68k/mac68k/pmap.c
+++ b/sys/arch/mac68k/mac68k/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.7 1997/01/24 01:35:51 briggs Exp $ */
+/* $OpenBSD: pmap.c,v 1.8 1997/02/10 12:01:49 downsj Exp $ */
/* $NetBSD: pmap.c,v 1.28 1996/10/21 05:42:27 scottr Exp $ */
/*
@@ -1460,7 +1460,7 @@ pmap_zero_page(phys)
#endif
kva = (vm_offset_t) CADDR1;
pmap_enter(pmap_kernel(), kva, phys, VM_PROT_READ|VM_PROT_WRITE, TRUE);
- bzero((caddr_t)kva, NBPG);
+ zeropage((caddr_t)kva);
pmap_remove_mapping(pmap_kernel(), kva, PT_ENTRY_NULL,
PRM_TFLUSH|PRM_CFLUSH);
}
@@ -1489,7 +1489,7 @@ void copypage __P((caddr_t, caddr_t));
pmap_enter(pmap_kernel(), dkva, dst, VM_PROT_READ|VM_PROT_WRITE, TRUE);
copypage((caddr_t)skva, (caddr_t)dkva);
/* CADDR1 and CADDR2 are virtually contiguous */
- pmap_remove(pmap_kernel(), skva, skva+2*NBPG);
+ pmap_remove(pmap_kernel(), skva, skva + (2 * NBPG));
}