CVS commit: src/sys/arch/sun3/sun3x
Module Name:src Committed By: tsutsui Date: Wed Aug 19 13:11:42 UTC 2020 Modified Files: src/sys/arch/sun3/sun3x: pmap.c Log Message: Make sure pmap_kenter_pa(9) handles uncached mappings properly. Fixes "cgfour(4) is mis-probed as bwtwo(4)" problem on 3/80 that has been broken since NetBSD 1.6. Now Xorg 1.20 based Xsun 8bpp color server is confirmed working on the cgfour(4). Should be pulled up to netbsd-9. XXX: all MD PMAP_NC flags should be replaced with MI PMAP_NOCACHE flag. To generate a diff of this commit: cvs rdiff -u -r1.116 -r1.117 src/sys/arch/sun3/sun3x/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sun3/sun3x/pmap.c diff -u src/sys/arch/sun3/sun3x/pmap.c:1.116 src/sys/arch/sun3/sun3x/pmap.c:1.117 --- src/sys/arch/sun3/sun3x/pmap.c:1.116 Thu Mar 5 15:56:20 2020 +++ src/sys/arch/sun3/sun3x/pmap.c Wed Aug 19 13:11:42 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.116 2020/03/05 15:56:20 msaitoh Exp $ */ +/* $NetBSD: pmap.c,v 1.117 2020/08/19 13:11:42 tsutsui Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -105,7 +105,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.116 2020/03/05 15:56:20 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.117 2020/08/19 13:11:42 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_pmap_debug.h" @@ -2145,6 +2145,12 @@ void pmap_kenter_pa(vaddr_t va, paddr_t pa, vm_prot_t prot, u_int flags) { mmu_short_pte_t *pte; + u_int mapflags; + + /* XXX: MD PMAP_NC should be replaced by MI PMAP_NOCACHE in flags. */ + mapflags = (pa & ~MMU_PAGE_MASK); + if ((mapflags & PMAP_NC) != 0) + flags |= PMAP_NOCACHE; /* This array is traditionally named "Sysmap" */ pte = [(u_long)m68k_btop(va - KERNBASE3X)]; @@ -2153,6 +2159,8 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, v pte->attr.raw = MMU_DT_INVALID | MMU_DT_PAGE | (pa & MMU_PAGE_MASK); if (!(prot & VM_PROT_WRITE)) pte->attr.raw |= MMU_SHORT_PTE_WP; + if ((flags & PMAP_NOCACHE) != 0) + pte->attr.raw |= MMU_SHORT_PTE_CI; } void
CVS commit: src/sys/arch/sun3/sun3x
Module Name:src Committed By: christos Date: Mon Mar 24 18:42:56 UTC 2014 Modified Files: src/sys/arch/sun3/sun3x: locore.s Log Message: avoid dup defs, use global macros To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/arch/sun3/sun3x/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sun3/sun3x/locore.s diff -u src/sys/arch/sun3/sun3x/locore.s:1.64 src/sys/arch/sun3/sun3x/locore.s:1.65 --- src/sys/arch/sun3/sun3x/locore.s:1.64 Thu Dec 22 10:33:30 2011 +++ src/sys/arch/sun3/sun3x/locore.s Mon Mar 24 14:42:56 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.64 2011/12/22 15:33:30 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.65 2014/03/24 18:42:56 christos Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -431,12 +431,6 @@ Lbrkpt2: * %d0,%d1,%a0,%a1, sr, pc, vo */ -#define INTERRUPT_SAVEREG \ - moveml #0xC0C0,%sp@- - -#define INTERRUPT_RESTORE \ - moveml %sp@+,#0x0303 - /* * This is the common auto-vector interrupt handler, * for which the CPU provides the vector=0x18+level. @@ -450,7 +444,7 @@ Lbrkpt2: GLOBAL(_isr_autovec) INTERRUPT_SAVEREG jbsr _C_LABEL(isr_autovec) - INTERRUPT_RESTORE + INTERRUPT_RESTOREREG jra _ASM_LABEL(rei) /* clock: see clock.c */ @@ -462,7 +456,7 @@ GLOBAL(_isr_autovec) GLOBAL(_isr_clock) INTERRUPT_SAVEREG jbsr _C_LABEL(clock_intr) - INTERRUPT_RESTORE + INTERRUPT_RESTOREREG jra _ASM_LABEL(rei) | Handler for all vectored interrupts (i.e. VME interrupts) @@ -474,11 +468,11 @@ GLOBAL(_isr_clock) GLOBAL(_isr_vectored) INTERRUPT_SAVEREG jbsr _C_LABEL(isr_vectored) - INTERRUPT_RESTORE + INTERRUPT_RESTOREREG jra _ASM_LABEL(rei) #undef INTERRUPT_SAVEREG -#undef INTERRUPT_RESTORE +#undef INTERRUPT_RESTOREREG /* interrupt counters (needed by vmstat) */ GLOBAL(intrnames)
CVS commit: src/sys/arch/sun3/sun3x
Module Name:src Committed By: christos Date: Thu Nov 7 02:37:56 UTC 2013 Modified Files: src/sys/arch/sun3/sun3x: dvma.c Log Message: fix variable usage To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/sun3/sun3x/dvma.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sun3/sun3x/dvma.c diff -u src/sys/arch/sun3/sun3x/dvma.c:1.42 src/sys/arch/sun3/sun3x/dvma.c:1.43 --- src/sys/arch/sun3/sun3x/dvma.c:1.42 Fri Sep 6 13:43:19 2013 +++ src/sys/arch/sun3/sun3x/dvma.c Wed Nov 6 21:37:56 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: dvma.c,v 1.42 2013/09/06 17:43:19 tsutsui Exp $ */ +/* $NetBSD: dvma.c,v 1.43 2013/11/07 02:37:56 christos Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -69,7 +69,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: dvma.c,v 1.42 2013/09/06 17:43:19 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: dvma.c,v 1.43 2013/11/07 02:37:56 christos Exp $); #include sys/param.h #include sys/systm.h @@ -166,7 +166,7 @@ dvma_mapin(void *kmem_va, int len, int c int npf, s, error; paddr_t pa; long off; - bool rv; + bool rv __debugused; kva = (vaddr_t)kmem_va; #ifdef DIAGNOSTIC @@ -304,7 +304,7 @@ _bus_dmamap_load(bus_dma_tag_t t, bus_dm vsize_t off, sgsize; paddr_t pa; pmap_t pmap; - int error, rv, s; + int error, rv __diagused, s; /* * Make sure that on error condition we return no valid mappings. @@ -369,7 +369,7 @@ _bus_dmamap_unload(bus_dma_tag_t t, bus_ bus_dma_segment_t *segs; vaddr_t dva; vsize_t sgsize; - int error, s; + int error __diagused, s; #ifdef DIAGNOSTIC if (map-dm_nsegs != 1)