Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/sys/arch/sun3/sun3x Pull up following revision(s) (reques...



details:   https://anonhg.NetBSD.org/src/rev/7c499d17748e
branches:  netbsd-9
changeset: 937783:7c499d17748e
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Aug 26 18:06:54 2020 +0000

description:
Pull up following revision(s) (requested by tsutsui in ticket #1060):

        sys/arch/sun3/sun3x/pmap.c: revision 1.117

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.

diffstat:

 sys/arch/sun3/sun3x/pmap.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (40 lines):

diff -r ae8ad85c8e1f -r 7c499d17748e sys/arch/sun3/sun3x/pmap.c
--- a/sys/arch/sun3/sun3x/pmap.c        Wed Aug 26 17:55:48 2020 +0000
+++ b/sys/arch/sun3/sun3x/pmap.c        Wed Aug 26 18:06:54 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.114 2016/12/22 14:47:59 cherry Exp $        */
+/*     $NetBSD: pmap.c,v 1.114.20.1 2020/08/26 18:06:54 martin Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -105,7 +105,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.114 2016/12/22 14:47:59 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.114.20.1 2020/08/26 18:06:54 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_pmap_debug.h"
@@ -2145,6 +2145,12 @@
 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 = &kernCbase[(u_long)m68k_btop(va - KERNBASE3X)];
@@ -2153,6 +2159,8 @@
        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



Home | Main Index | Thread Index | Old Index