diff options
author | Steve Murphree <smurph@cvs.openbsd.org> | 2001-12-22 19:17:02 +0000 |
---|---|---|
committer | Steve Murphree <smurph@cvs.openbsd.org> | 2001-12-22 19:17:02 +0000 |
commit | ed4580d3ff5729b39bd6d8922dcfe2cb1e97d4e4 (patch) | |
tree | f7cfd93d87d11e5095144499d62c75e439670c7e /sys/arch/mvme88k | |
parent | 2be42eebc94841831305e8310f14b8b2476da576 (diff) |
mc88110 mods.
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r-- | sys/arch/mvme88k/include/mmu.h | 17 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/m88110_mmu.S | 46 |
2 files changed, 56 insertions, 7 deletions
diff --git a/sys/arch/mvme88k/include/mmu.h b/sys/arch/mvme88k/include/mmu.h index 82e9e5ffdef..c5a8826ccad 100644 --- a/sys/arch/mvme88k/include/mmu.h +++ b/sys/arch/mvme88k/include/mmu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mmu.h,v 1.14 2001/12/16 23:49:46 miod Exp $ */ +/* $OpenBSD: mmu.h,v 1.15 2001/12/22 19:17:01 smurph Exp $ */ #ifndef __MACHINE_MMU_H__ #define __MACHINE_MMU_H__ @@ -60,7 +60,7 @@ typedef union sdt_entry_template { typedef struct pt_entry { unsigned long pfn:20, /* page frame address */ - rsvA:1, /* reserved */ + rsvA:1, /* reserved (U1 on mc88110) */ wired:1, /* wired bit <<software>> */ wt:1, /* writethrough (cache control) */ sup:1, /* supervisor protection */ @@ -70,10 +70,16 @@ typedef struct pt_entry { modified:1, /* modified */ pg_used:1, /* used (referenced) */ prot:1, /* write protect */ - rsvC:1, /* reserved */ - dtype:1; /* valid */ + dtype:2; /* descriptor type (bit 2 only on mc88110) */ } pt_entry_t; +/* mc88110 indirect descriptors */ +typedef struct pt_ind_entry { + unsigned long + pda:30, /* page descriptor address */ + dtype:2; /* valid */ +} pt_ind_entry_t; + typedef union pte_template { pt_entry_t pte; unsigned long bits; @@ -137,6 +143,8 @@ typedef union batc_template { */ #define DT_INVALID 0 #define DT_VALID 1 +#define DT_IND_MASKED 2 +#define DT_IND_UMASKED 3 /* * Number of entries in a page table. @@ -243,7 +251,6 @@ extern u_int kvtop __P((vm_offset_t)); #define DMA_CACHE_SYNC 0x1 #define DMA_CACHE_SYNC_INVAL 0x2 #define DMA_CACHE_INV 0x3 -extern void dma_cachectl(vm_offset_t, int, int); #endif /* __MACHINE_MMU_H__ */ diff --git a/sys/arch/mvme88k/mvme88k/m88110_mmu.S b/sys/arch/mvme88k/mvme88k/m88110_mmu.S index 99d75f850e1..962da1fc2d5 100644 --- a/sys/arch/mvme88k/mvme88k/m88110_mmu.S +++ b/sys/arch/mvme88k/mvme88k/m88110_mmu.S @@ -1,12 +1,44 @@ -# $OpenBSD: m88110_mmu.S,v 1.6 2001/12/16 23:49:46 miod Exp $ +# $OpenBSD: m88110_mmu.S,v 1.7 2001/12/22 19:17:01 smurph Exp $ +/* + * Copyright (c) 2000 Steve Murphree, Jr. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Steve Murphree, Jr. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ #include <machine/asm.h> /* set routines */ ENTRY(set_icmd) + FLUSH_PIPELINE jmp.n r1 stcr r2, ICMD ENTRY(set_ictl) + FLUSH_PIPELINE jmp.n r1 stcr r2, ICTL ENTRY(set_isar) @@ -14,10 +46,12 @@ ENTRY(set_isar) stcr r2, ISAR ENTRY(set_isap) FLUSH_PIPELINE + NOP stcr r2, ISAP jmp r1 ENTRY(set_iuap) FLUSH_PIPELINE + NOP stcr r2, IUAP jmp r1 ENTRY(set_iir) @@ -42,11 +76,15 @@ ENTRY(set_ipar) jmp.n r1 stcr r2, IPAR ENTRY(set_dcmd) + FLUSH_PIPELINE jmp.n r1 stcr r2, DCMD ENTRY(set_dctl) - jmp.n r1 + FLUSH_PIPELINE stcr r2, DCTL + NOP + FLUSH_PIPELINE + jmp r1 ENTRY(set_dsar) stcr r2, DSAR NOP @@ -55,11 +93,15 @@ ENTRY(set_dsap) FLUSH_PIPELINE NOP stcr r2, DSAP + FLUSH_PIPELINE + NOP jmp r1 ENTRY(set_duap) FLUSH_PIPELINE NOP stcr r2, DUAP + FLUSH_PIPELINE + NOP jmp r1 ENTRY(set_dir) jmp.n r1 |