diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1997-02-10 11:39:27 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1997-02-10 11:39:27 +0000 |
commit | 526401ee9732839db729c57156810057672d8c3a (patch) | |
tree | d09c601c82ffe2de1912b0963063f3d9d190e151 /sys/arch/mvme68k | |
parent | fa95ed58cc33877b3d80a7622f353d42f9347a42 (diff) |
Completely untested mvme68k changes for copypage/zeropage/mappedcopy.
Doesn't really support MAPPEDCOPY.
Diffstat (limited to 'sys/arch/mvme68k')
-rw-r--r-- | sys/arch/mvme68k/mvme68k/locore.s | 34 | ||||
-rw-r--r-- | sys/arch/mvme68k/mvme68k/mem.c | 14 | ||||
-rw-r--r-- | sys/arch/mvme68k/mvme68k/pmap.c | 6 |
3 files changed, 11 insertions, 43 deletions
diff --git a/sys/arch/mvme68k/mvme68k/locore.s b/sys/arch/mvme68k/mvme68k/locore.s index db28e3cbeb4..5e9120da872 100644 --- a/sys/arch/mvme68k/mvme68k/locore.s +++ b/sys/arch/mvme68k/mvme68k/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.13 1997/02/08 10:50:36 deraadt Exp $ */ +/* $OpenBSD: locore.s,v 1.14 1997/02/10 11:39:25 downsj Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -1121,38 +1121,6 @@ Ldorte: #endif /* - * 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/mvme68k/mvme68k/mem.c b/sys/arch/mvme68k/mvme68k/mem.c index fa4798c3ef1..49c9b1c49f8 100644 --- a/sys/arch/mvme68k/mvme68k/mem.c +++ b/sys/arch/mvme68k/mvme68k/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.4 1996/04/28 10:59:03 deraadt Exp $ */ +/* $OpenBSD: mem.c,v 1.5 1997/02/10 11:39:26 downsj Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -85,7 +85,7 @@ #include <vm/vm.h> extern u_int lowram; -caddr_t zeropage; +static caddr_t devzeropage; /*ARGSUSED*/ int @@ -193,18 +193,18 @@ mmrw(dev, uio, flags) * XXX on the hp300 we already know where there * is a global zeroed page, the null segment table. */ - if (zeropage == NULL) { + if (devzeropage == NULL) { #if CLBYTES == NBPG extern caddr_t Segtabzero; - zeropage = Segtabzero; + devzeropage = Segtabzero; #else - zeropage = (caddr_t) + devzeropage = (caddr_t) malloc(CLBYTES, M_TEMP, M_WAITOK); - bzero(zeropage, CLBYTES); + bzero(devzeropage, CLBYTES); #endif } c = min(iov->iov_len, CLBYTES); - error = uiomove(zeropage, c, uio); + error = uiomove(devzeropage, c, uio); continue; default: diff --git a/sys/arch/mvme68k/mvme68k/pmap.c b/sys/arch/mvme68k/mvme68k/pmap.c index 7bb6820cb12..f3df1b600e8 100644 --- a/sys/arch/mvme68k/mvme68k/pmap.c +++ b/sys/arch/mvme68k/mvme68k/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.5 1996/04/28 10:59:04 deraadt Exp $ */ +/* $OpenBSD: pmap.c,v 1.6 1997/02/10 11:39:26 downsj Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -1569,7 +1569,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); } @@ -1604,7 +1604,7 @@ pmap_copy_page(src, dst) 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)); } /* |