Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386 PMAP_NEW is no longer optional on the i386; th...



details:   https://anonhg.NetBSD.org/src/rev/2bd4fecca916
branches:  trunk
changeset: 473726:2bd4fecca916
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Jun 17 00:12:10 1999 +0000

description:
PMAP_NEW is no longer optional on the i386; the old pmap's page table
allocation strategy no longer works at all.  Move pmap.new.* to pmap.*.

To read the revision history of PMAP_NEW up until this merge, use cvs
rlog of the old pmap.new.* files.

diffstat:

 sys/arch/i386/conf/files.i386    |     5 +-
 sys/arch/i386/conf/std.i386      |     4 +-
 sys/arch/i386/i386/db_memrw.c    |    16 +-
 sys/arch/i386/i386/genassym.cf   |    12 +-
 sys/arch/i386/i386/locore.s      |    51 +-
 sys/arch/i386/i386/machdep.c     |    40 +-
 sys/arch/i386/i386/mem.c         |     3 +-
 sys/arch/i386/i386/pmap.c        |  5242 +++++++++++++++++++++++++------------
 sys/arch/i386/i386/pmap.new.c    |  3760 ---------------------------
 sys/arch/i386/i386/trap.c        |    31 +-
 sys/arch/i386/i386/vm_machdep.c  |    61 +-
 sys/arch/i386/include/Makefile   |     4 +-
 sys/arch/i386/include/pmap.h     |   620 +++-
 sys/arch/i386/include/pmap.new.h |   537 ---
 sys/arch/i386/include/vmparam.h  |    13 +-
 15 files changed, 3992 insertions(+), 6407 deletions(-)

diffs (truncated from 11120 to 300 lines):

diff -r f72a736744cb -r 2bd4fecca916 sys/arch/i386/conf/files.i386
--- a/sys/arch/i386/conf/files.i386     Wed Jun 16 23:32:17 1999 +0000
+++ b/sys/arch/i386/conf/files.i386     Thu Jun 17 00:12:10 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.i386,v 1.133 1999/06/07 20:31:30 thorpej Exp $
+#      $NetBSD: files.i386,v 1.134 1999/06/17 00:12:10 thorpej Exp $
 #
 # new style config file for i386 architecture
 #
@@ -49,8 +49,7 @@
 file   arch/i386/i386/mem.c
 file   arch/i386/i386/microtime.s
 file   arch/i386/i386/ns_cksum.c       ns
-file   arch/i386/i386/pmap.c           !pmap_new
-file   arch/i386/i386/pmap.new.c       pmap_new
+file   arch/i386/i386/pmap.c
 file   arch/i386/i386/process_machdep.c
 file   arch/i386/i386/sys_machdep.c
 file   arch/i386/i386/trap.c
diff -r f72a736744cb -r 2bd4fecca916 sys/arch/i386/conf/std.i386
--- a/sys/arch/i386/conf/std.i386       Wed Jun 16 23:32:17 1999 +0000
+++ b/sys/arch/i386/conf/std.i386       Thu Jun 17 00:12:10 1999 +0000
@@ -1,9 +1,11 @@
-# $NetBSD: std.i386,v 1.13 1999/03/24 06:06:10 mrg Exp $
+# $NetBSD: std.i386,v 1.14 1999/06/17 00:12:10 thorpej Exp $
 #
 # standard, required NetBSD/i386 'options'
 
 machine i386
 
+# NOTE: PMAP_NEW is no longer optional on the i386 -- the old pmap
+# no longer works, and has been deleted from the source tree.
 options        PMAP_NEW        # UVM's new pmap interface
 
 options        EXEC_AOUT       # exec a.out binaries
diff -r f72a736744cb -r 2bd4fecca916 sys/arch/i386/i386/db_memrw.c
--- a/sys/arch/i386/i386/db_memrw.c     Wed Jun 16 23:32:17 1999 +0000
+++ b/sys/arch/i386/i386/db_memrw.c     Thu Jun 17 00:12:10 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_memrw.c,v 1.6 1999/04/12 20:38:19 pk Exp $  */
+/*     $NetBSD: db_memrw.c,v 1.7 1999/06/17 00:12:11 thorpej Exp $     */
 
 /* 
  * Mach Operating System
@@ -33,8 +33,6 @@
  * by DDB and KGDB.
  */
 
-#include "opt_pmap_new.h"
-
 #include <sys/param.h>
 #include <sys/proc.h>
 #include <sys/systm.h>
@@ -61,10 +59,6 @@
                *data++ = *src++;
 }
 
-#if !defined(PMAP_NEW)
-pt_entry_t *pmap_pte __P((pmap_t, vaddr_t));
-#endif
-
 /*
  * Write bytes to kernel address space for debugger.
  */
@@ -85,22 +79,14 @@
 
        if (addr >= VM_MIN_KERNEL_ADDRESS &&
            addr < (vaddr_t)&etext) {
-#if defined(PMAP_NEW)
                ptep0 = PTE_BASE + i386_btop(addr);
-#else
-               ptep0 = pmap_pte(pmap_kernel(), addr);
-#endif
                oldmap0 = *ptep0;
                *(int *)ptep0 |= /* INTEL_PTE_WRITE */ PG_RW;
 
                addr1 = i386_trunc_page(addr + size - 1);
                if (i386_trunc_page(addr) != addr1) {
                        /* data crosses a page boundary */
-#if defined(PMAP_NEW)
                        ptep1 = PTE_BASE + i386_btop(addr1);
-#else
-                       ptep1 = pmap_pte(pmap_kernel(), addr1);
-#endif
                        oldmap1 = *ptep1;
                        *(int *)ptep1 |= /* INTEL_PTE_WRITE */ PG_RW;
                }
diff -r f72a736744cb -r 2bd4fecca916 sys/arch/i386/i386/genassym.cf
--- a/sys/arch/i386/i386/genassym.cf    Wed Jun 16 23:32:17 1999 +0000
+++ b/sys/arch/i386/i386/genassym.cf    Thu Jun 17 00:12:10 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: genassym.cf,v 1.16 1999/03/24 11:23:45 tron Exp $
+#      $NetBSD: genassym.cf,v 1.17 1999/06/17 00:12:11 thorpej Exp $
 
 #
 # Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -74,7 +74,6 @@
 #      @(#)genassym.c  5.11 (Berkeley) 5/10/91
 #
 
-include "opt_pmap_new.h"
 include "opt_compat_svr4.h"
 include "opt_compat_freebsd.h"
 include "opt_compat_linux.h"
@@ -120,20 +119,11 @@
 
 define SRUN                    SRUN
 
-ifdef PMAP_NEW
 define PDSLOT_PTE              PDSLOT_PTE
 define PDSLOT_APTE             PDSLOT_APTE
 define PDSLOT_KERN             PDSLOT_KERN
 define NKPTP_MIN               NKPTP_MIN
 define NKPTP_MAX               NKPTP_MAX
-else
-define PTDPTDI                 PTDPTDI
-define KPTDI                   KPTDI
-define NKPDE_BASE              NKPDE_BASE
-define NKPDE_MAX               NKPDE_MAX
-define NKPDE_SCALE             NKPDE_SCALE
-define APTDPTDI                APTDPTDI
-endif
 
 define VM_MAXUSER_ADDRESS      (int)VM_MAXUSER_ADDRESS
 
diff -r f72a736744cb -r 2bd4fecca916 sys/arch/i386/i386/locore.s
--- a/sys/arch/i386/i386/locore.s       Wed Jun 16 23:32:17 1999 +0000
+++ b/sys/arch/i386/i386/locore.s       Thu Jun 17 00:12:10 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.208 1999/03/24 05:51:00 mrg Exp $ */
+/*     $NetBSD: locore.s,v 1.209 1999/06/17 00:12:11 thorpej Exp $     */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -79,7 +79,6 @@
 #include "opt_vm86.h"
 #include "opt_user_ldt.h"
 #include "opt_dummy_nops.h"
-#include "opt_pmap_new.h"
 #include "opt_compat_freebsd.h"
 #include "opt_compat_linux.h"
 #include "opt_compat_ibcs2.h"
@@ -187,16 +186,9 @@
  *
  * XXX 4 == sizeof pde
  */
-#ifdef PMAP_NEW
        .set    _C_LABEL(PTmap),(PDSLOT_PTE << PDSHIFT)
        .set    _C_LABEL(PTD),(_C_LABEL(PTmap) + PDSLOT_PTE * NBPG)
        .set    _C_LABEL(PTDpde),(_C_LABEL(PTD) + PDSLOT_PTE * 4)
-#else
-       .globl  _C_LABEL(PTmap),_C_LABEL(PTD),_C_LABEL(PTDpde)
-       .set    _C_LABEL(PTmap),(PTDPTDI << PDSHIFT)
-       .set    _C_LABEL(PTD),(_C_LABEL(PTmap) + PTDPTDI * NBPG)
-       .set    _C_LABEL(PTDpde),(_C_LABEL(PTD) + PTDPTDI * 4)
-#endif
 
 /*
  * APTmap, APTD is the alternate recursive pagemap.
@@ -204,16 +196,9 @@
  *
  * XXX 4 == sizeof pde
  */
-#ifdef PMAP_NEW
        .set    _C_LABEL(APTmap),(PDSLOT_APTE << PDSHIFT)
        .set    _C_LABEL(APTD),(_C_LABEL(APTmap) + PDSLOT_APTE * NBPG)
        .set    _C_LABEL(APTDpde),(_C_LABEL(PTD) + PDSLOT_APTE * 4)
-#else
-       .globl  _C_LABEL(APTmap),_C_LABEL(APTD),_C_LABEL(APTDpde)
-       .set    _C_LABEL(APTmap),(APTDPTDI << PDSHIFT)
-       .set    _C_LABEL(APTD),(_C_LABEL(APTmap) + APTDPTDI * NBPG)
-       .set    _C_LABEL(APTDpde),(_C_LABEL(PTD) + APTDPTDI * 4)
-#endif
 
 
 /*
@@ -550,7 +535,6 @@
         * Calculate the size of the kernel page table directory, and
         * how many entries it will have.
         */
-#if defined(PMAP_NEW)
        movl    RELOC(nkpde),%ecx               # get nkpde
        cmpl    $NKPTP_MIN,%ecx                 # larger than min?
        jge     1f
@@ -560,21 +544,6 @@
        jle     2f
        movl    $NKPTP_MAX,%ecx
 2:
-#else
-       movl    RELOC(nkpde),%ecx               # get nkpde
-       testl   %ecx,%ecx                       # if it's non-zero, use as-is
-       jnz     2f
-
-       movl    RELOC(biosextmem),%ecx
-       shrl    $10,%ecx                        # cvt. # of KB to # of MB
-       imull   $NKPDE_SCALE,%ecx               # scale to # of KPDEs
-       addl    $NKPDE_BASE,%ecx                # and add the base.
-       cmpl    $NKPDE_MAX,%ecx                 # clip to max.
-       jle     1f
-       movl    $NKPDE_MAX,%ecx
-1:     movl    %ecx,RELOC(nkpde)
-2:
-#endif
 
        /* Clear memory for bootstrap tables. */
        shll    $PGSHIFT,%ecx
@@ -649,21 +618,13 @@
 
        /* Map kernel PDEs. */
        movl    RELOC(nkpde),%ecx                       # for this many pde s,
-#if defined(PMAP_NEW)
        leal    (PROC0PDIR+PDSLOT_KERN*4)(%esi),%ebx    # kernel pde offset
-#else
-       leal    (PROC0PDIR+KPTDI*4)(%esi),%ebx          # offset of pde for kernel
-#endif
        leal    (SYSMAP+PG_V|PG_KW)(%esi),%eax          # pte for KPT in proc 0,
        fillkpt
 
        /* Install a PDE recursively mapping page directory as a page table! */
        leal    (PROC0PDIR+PG_V|PG_KW)(%esi),%eax       # pte for ptd
-#ifdef PMAP_NEW
        movl    %eax,(PROC0PDIR+PDSLOT_PTE*4)(%esi)     # recursive PD slot
-#else
-       movl    %eax,(PROC0PDIR+PTDPTDI*4)(%esi)        # which is where PTmap maps!
-#endif
 
        /* Save phys. addr of PTD, for libkvm. */
        movl    %esi,RELOC(PTDpaddr)
@@ -1150,10 +1111,8 @@
        /* Compute PTE offset for start address. */
        shrl    $PGSHIFT,%edi
 
-#if defined(PMAP_NEW)
        movl    _C_LABEL(curpcb),%edx
        movl    $2f,PCB_ONFAULT(%edx)
-#endif
 
 1:     /* Check PTE for each page. */
        testb   $PG_RW,_C_LABEL(PTmap)(,%edi,4)
@@ -1280,10 +1239,8 @@
        movl    $NBPG,%ecx
        subl    %eax,%ecx               # ecx = NBPG - (src % NBPG)
 
-#if defined(PMAP_NEW)
        movl    _C_LABEL(curpcb),%eax
        movl    $6f,PCB_ONFAULT(%eax)
-#endif
 
 1:     /*
         * Once per page, check that we are still within the bounds of user
@@ -1577,10 +1534,8 @@
        jne     2f
 #endif /* I486_CPU || I586_CPU || I686_CPU */
 
-#ifdef PMAP_NEW
        movl    _C_LABEL(curpcb),%eax
        movl    $3f,PCB_ONFAULT(%eax)
-#endif
 
        movl    %edx,%eax
        shrl    $PGSHIFT,%eax           # calculate pte address
@@ -1624,10 +1579,8 @@
        jne     2f
 #endif /* I486_CPU || I586_CPU || I686_CPU */
 
-#ifdef PMAP_NEW
        movl    _C_LABEL(curpcb),%eax
        movl    $3f,PCB_ONFAULT(%eax)
-#endif
 
        movl    %edx,%eax
        shrl    $PGSHIFT,%eax           # calculate pte address
@@ -1706,10 +1659,8 @@
        jne     2f
 #endif /* I486_CPU || I586_CPU || I686_CPU */
 
-#ifdef PMAP_NEW
        movl    _C_LABEL(curpcb),%eax
        movl    $3f,PCB_ONFAULT(%eax)
-#endif
 
        movl    %edx,%eax
        shrl    $PGSHIFT,%eax           # calculate pte address
diff -r f72a736744cb -r 2bd4fecca916 sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c      Wed Jun 16 23:32:17 1999 +0000
+++ b/sys/arch/i386/i386/machdep.c      Thu Jun 17 00:12:10 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.358 1999/05/26 19:16:31 thorpej Exp $    */
+/*     $NetBSD: machdep.c,v 1.359 1999/06/17 00:12:11 thorpej Exp $    */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -79,7 +79,6 @@
 #include "opt_ddb.h"
 #include "opt_vm86.h"
 #include "opt_user_ldt.h"
-#include "opt_pmap_new.h"
 #include "opt_compat_netbsd.h"
 #include "opt_cpureset_delay.h"
 #include "opt_compat_svr4.h"



Home | Main Index | Thread Index | Old Index