last minute changes, updating present version
authorWilliam Nesheim <william@ucbvax.Berkeley.EDU>
Fri, 10 May 1991 09:08:27 +0000 (01:08 -0800)
committerWilliam Nesheim <william@ucbvax.Berkeley.EDU>
Fri, 10 May 1991 09:08:27 +0000 (01:08 -0800)
SCCS-vsn: sys/i386/include/pte.h 5.5
SCCS-vsn: sys/i386/include/vmparam.h 5.8
SCCS-vsn: sys/i386/include/trap.h 5.4
SCCS-vsn: sys/i386/include/cpu.h 5.4
SCCS-vsn: sys/i386/include/pcb.h 5.9
SCCS-vsn: sys/i386/include/pmap.h 1.5

usr/src/sys/i386/include/cpu.h
usr/src/sys/i386/include/pcb.h
usr/src/sys/i386/include/pmap.h
usr/src/sys/i386/include/pte.h
usr/src/sys/i386/include/trap.h
usr/src/sys/i386/include/vmparam.h

index 0e6fb31..66d37b2 100644 (file)
@@ -7,7 +7,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)cpu.h       5.3 (Berkeley) %G%
+ *     @(#)cpu.h       5.4 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -20,7 +20,7 @@
  * definitions of cpu-dependent requirements
  * referenced in generic code
  */
  * definitions of cpu-dependent requirements
  * referenced in generic code
  */
-#undef COPY_SIGCODE            /* copy sigcode above user stack in exec */
+#undef COPY_SIGCODE            /* don't copy sigcode above user stack in exec */
 
 /*
  * function vs. inline configuration;
 
 /*
  * function vs. inline configuration;
@@ -28,9 +28,9 @@
  * rather than inline or machine-dependent implementations
  */
 #define        NEED_MINMAX             /* need {,i,l,ul}{min,max} functions */
  * rather than inline or machine-dependent implementations
  */
 #define        NEED_MINMAX             /* need {,i,l,ul}{min,max} functions */
-#define        NEED_FFS                /* don't need ffs function */
-#define        NEED_BCMP               /* don't need bcmp function */
-#define        NEED_STRLEN             /* don't need strlen function */
+#define        NEED_FFS                /* need ffs function */
+#define        NEED_BCMP               /* need bcmp function */
+#define        NEED_STRLEN             /* need strlen function */
 
 #define        cpu_exec(p)     /* nothing */
 
 
 #define        cpu_exec(p)     /* nothing */
 
index 16bca17..0cf4ccf 100644 (file)
@@ -7,10 +7,9 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)pcb.h       5.8 (Berkeley) %G%
+ *     @(#)pcb.h       5.9 (Berkeley) %G%
  */
 
  */
 
-
 /*
  * Intel 386 process control block
  */
 /*
  * Intel 386 process control block
  */
 #include "machine/npx.h"
 
 struct pcb {
 #include "machine/npx.h"
 
 struct pcb {
-       struct  i386tss pcbtss;
-#define        pcb_ksp pcbtss.tss_esp0
-#define        pcb_ptd pcbtss.tss_cr3
+       struct  i386tss pcb_tss;
+#define        pcb_ksp pcb_tss.tss_esp0
+#define        pcb_ptd pcb_tss.tss_cr3
 #define        pcb_cr3 pcb_ptd
 #define        pcb_cr3 pcb_ptd
-#define        pcb_pc  pcbtss.tss_eip
-#define        pcb_psl pcbtss.tss_eflags
-#define        pcb_usp pcbtss.tss_esp
-#define        pcb_fp  pcbtss.tss_ebp
+#define        pcb_pc  pcb_tss.tss_eip
+#define        pcb_psl pcb_tss.tss_eflags
+#define        pcb_usp pcb_tss.tss_esp
+#define        pcb_fp  pcb_tss.tss_ebp
+#ifdef notyet
+       u_char  pcb_iomap[NPORT/sizeof(u_char)]; /* i/o port bitmap */
+#endif
+       struct  save87  pcb_savefpu;    /* floating point state for 287/387 */
+       struct  emcsts  pcb_saveemc;    /* Cyrix EMC state */
 /*
  * Software pcb (extension)
  */
        int     pcb_flags;
 /*
  * Software pcb (extension)
  */
        int     pcb_flags;
-#define        FP_WASUSED      0x1     /* floating point has been used in this proc */
-#define        FP_NEEDSSAVE    0x2     /* needs save on next context switch */
-#define        FP_NEEDSRESTORE 0x4     /* need restore on next DNA fault */
-#define        FP_USESEMC      0x8     /* process uses EMC memory-mapped mode */
-       struct  save87  pcb_savefpu;
-       struct  emcsts  pcb_saveemc;
-       struct  pte     *pcb_p0br;
-       struct  pte     *pcb_p1br;
-       int     pcb_p0lr;
-       int     pcb_p1lr;
-       int     pcb_szpt;       /* number of pages of user page table */
-       int     pcb_cmap2;
-       int     *pcb_sswap;
-       long    pcb_sigc[8];
-       int     pcb_iml;        /* interrupt mask level */
+#define        FP_WASUSED      0x01    /* floating point has been used in this proc */
+#define        FP_NEEDSSAVE    0x02    /* needs save on next context switch */
+#define        FP_NEEDSRESTORE 0x04    /* need restore on next DNA fault */
+#define        FP_USESEMC      0x08    /* process uses EMC memory-mapped mode */
+#define        FM_TRAP         0x10    /* process entered kernel on a trap frame */
+       short   pcb_iml;        /* interrupt mask level */
+       caddr_t pcb_onfault;    /* copyin/out fault recovery */
+       long    pcb_sigc[8];    /* XXX signal code trampoline */
+       int     pcb_cmap2;      /* XXX temporary PTE - will prefault instead */
 };
 };
+
+struct pcb *curpcb;            /* our current running pcb */
index 20d8e8a..96042b9 100644 (file)
  *
  * from hp300: @(#)pmap.h      7.2 (Berkeley) 12/16/90
  *
  *
  * from hp300: @(#)pmap.h      7.2 (Berkeley) 12/16/90
  *
- *     @(#)pmap.h      1.4 (Berkeley) %G%
+ *     @(#)pmap.h      1.5 (Berkeley) %G%
  */
 
 #ifndef        _PMAP_MACHINE_
 #define        _PMAP_MACHINE_  1
 
  */
 
 #ifndef        _PMAP_MACHINE_
 #define        _PMAP_MACHINE_  1
 
-#include "sys/lock.h"
-#include "machine/vmparam.h"
-#include "vm/vm_statistics.h"
-
 /*
  * 386 page table entry and page table directory
  * W.Jolitz, 8/89
 /*
  * 386 page table entry and page table directory
  * W.Jolitz, 8/89
@@ -154,11 +150,9 @@ extern int IdlePTD;
 /*
  * Pmap stuff
  */
 /*
  * Pmap stuff
  */
-#define PMAP_NULL      ((pmap_t) 0)
 
 struct pmap {
        pd_entry_t              *pm_pdir;       /* KVA of page directory */
 
 struct pmap {
        pd_entry_t              *pm_pdir;       /* KVA of page directory */
-       /* caddr_t                      *pm_ptobj;      /* page table object */
        boolean_t               pm_pdchanged;   /* pdir changed */
        short                   pm_dref;        /* page directory ref count */
        short                   pm_count;       /* pmap reference count */
        boolean_t               pm_pdchanged;   /* pdir changed */
        short                   pm_dref;        /* page directory ref count */
        short                   pm_count;       /* pmap reference count */
@@ -178,7 +172,7 @@ extern pmap_t               kernel_pmap;
        if ((pmapp) != PMAP_NULL /*&& (pmapp)->pm_pdchanged */) {  \
                (pcbp)->pcb_cr3 = \
                    pmap_extract(kernel_pmap, (pmapp)->pm_pdir); \
        if ((pmapp) != PMAP_NULL /*&& (pmapp)->pm_pdchanged */) {  \
                (pcbp)->pcb_cr3 = \
                    pmap_extract(kernel_pmap, (pmapp)->pm_pdir); \
-               if ((pmapp) == u.u_procp->p_map->pmap) \
+               if ((pmapp) == &curproc->p_vmspace->vm_pmap) \
                        load_cr3((pcbp)->pcb_cr3); \
                (pmapp)->pm_pdchanged = FALSE; \
        }
                        load_cr3((pcbp)->pcb_cr3); \
                (pmapp)->pm_pdchanged = FALSE; \
        }
index 8f5fd0c..d5fcb84 100644 (file)
@@ -7,7 +7,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)pte.h       5.4 (Berkeley) %G%
+ *     @(#)pte.h       5.5 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -104,18 +104,7 @@ unsigned int
 
 #ifndef LOCORE
 #ifdef KERNEL
 
 #ifndef LOCORE
 #ifdef KERNEL
-/* utilities defined in locore.s */
-extern struct pte Sysmap[];
-extern struct pte Usrptmap[];
-extern struct pte usrpt[];
-extern struct pte Swapmap[];
-extern struct pte Forkmap[];
-extern struct pte Xswapmap[];
-extern struct pte Xswap2map[];
-extern struct pte Pushmap[];
-extern struct pte Vfmap[];
-extern struct pte mmap[];
-extern struct pte msgbufmap[];
-extern struct pte kmempt[], ekmempt[];
+/* utilities defined in pmap.c */
+extern struct pte *Sysmap;
 #endif
 #endif
 #endif
 #endif
index 5e7f1a9..8e4e9c5 100644 (file)
@@ -7,7 +7,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)trap.h      5.3 (Berkeley) %G%
+ *     @(#)trap.h      5.4 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -65,3 +65,6 @@
 #define            BUS_SEGNP_FAULT     T_SEGNPFLT      /* segment not present */
 #define            BUS_STK_FAULT       T_STKFLT        /* stack segment */
 #define            BUS_SEGM_FAULT      T_RESERVED      /* segment protection base */
 #define            BUS_SEGNP_FAULT     T_SEGNPFLT      /* segment not present */
 #define            BUS_STK_FAULT       T_STKFLT        /* stack segment */
 #define            BUS_SEGM_FAULT      T_RESERVED      /* segment protection base */
+
+/* Trap's coming from user mode */
+#define        T_USER  0x100
index f98d4cf..e298fc7 100644 (file)
@@ -7,7 +7,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)vmparam.h   5.7 (Berkeley) %G%
+ *     @(#)vmparam.h   5.8 (Berkeley) %G%
  */
 
 
  */
 
 
  * USRTEXT is the start of the user text/data space, while USRSTACK
  * is the top (end) of the user stack. Immediately above the user stack
  * resides the user structure, which is UPAGES long and contains the
  * USRTEXT is the start of the user text/data space, while USRSTACK
  * is the top (end) of the user stack. Immediately above the user stack
  * resides the user structure, which is UPAGES long and contains the
- * kernel stack. As such, UPAGES is the number of pages from the beginning
- * of the P1 region to the beginning of the user stack. Also, the P0
- * region begins with user text and ends with user data.
- * Immediately after the user structure is the kernal address space.
+ * kernel stack.
+ *
+ * Immediately after the user structure is the page table map, and then
+ * kernal address space.
  */
 #define        USRTEXT         0
  */
 #define        USRTEXT         0
-#define        USRSTACK        0xFDBFE000
+#define        USRSTACK        0xFDBFD000
 #define        BTOPUSRSTACK    (0xFDC00-(UPAGES))      /* btop(USRSTACK) */
 #define        BTOPUSRSTACK    (0xFDC00-(UPAGES))      /* btop(USRSTACK) */
-
-#define P1PAGES                0xFDC00
 #define        LOWPAGES        0
 #define HIGHPAGES      UPAGES
 
 #define        LOWPAGES        0
 #define HIGHPAGES      UPAGES
 
 
 /* user/kernel map constants */
 #define VM_MIN_ADDRESS         ((vm_offset_t)0)
 
 /* user/kernel map constants */
 #define VM_MIN_ADDRESS         ((vm_offset_t)0)
+#define VM_MAXUSER_ADDRESS     ((vm_offset_t)0xFDBFD000)
 #define UPT_MIN_ADDRESS                ((vm_offset_t)0xFDC00000)
 #define UPT_MAX_ADDRESS                ((vm_offset_t)0xFDFF7000)
 #define VM_MAX_ADDRESS         UPT_MAX_ADDRESS
 #define UPT_MIN_ADDRESS                ((vm_offset_t)0xFDC00000)
 #define UPT_MAX_ADDRESS                ((vm_offset_t)0xFDFF7000)
 #define VM_MAX_ADDRESS         UPT_MAX_ADDRESS