Source-Changes-HG archive

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

[src/sommerfeld_i386mp_1]: src/sys/arch/i386 checkpoint merge-in-progress fro...



details:   https://anonhg.NetBSD.org/src/rev/a671028b7141
branches:  sommerfeld_i386mp_1
changeset: 482412:a671028b7141
user:      sommerfeld <sommerfeld%NetBSD.org@localhost>
date:      Mon Jun 18 03:33:27 2001 +0000

description:
checkpoint merge-in-progress from mainline.

diffstat:

 sys/arch/i386/conf/GENERIC           |    6 +-
 sys/arch/i386/conf/INSTALL           |    4 +-
 sys/arch/i386/i386/db_interface.c    |    4 +-
 sys/arch/i386/i386/db_trace.c        |    6 +-
 sys/arch/i386/i386/freebsd_syscall.c |    4 +-
 sys/arch/i386/i386/genassym.cf       |   13 +---
 sys/arch/i386/i386/ibcs2_syscall.c   |    4 +-
 sys/arch/i386/i386/linux_syscall.c   |    4 +-
 sys/arch/i386/i386/locore.s          |  108 +++++++++++-----------------------
 sys/arch/i386/i386/machdep.c         |   21 +++---
 sys/arch/i386/i386/pmap.c            |    4 +-
 sys/arch/i386/i386/process_machdep.c |   35 +---------
 sys/arch/i386/i386/svr4_sigcode.s    |   14 +---
 sys/arch/i386/i386/svr4_syscall.c    |    4 +-
 sys/arch/i386/i386/sys_machdep.c     |   80 +++++++++++++------------
 sys/arch/i386/i386/trap.c            |   46 ++++++++++++-
 sys/arch/i386/i386/vm_machdep.c      |    4 +-
 sys/arch/i386/include/cpu.h          |    7 +-
 sys/arch/i386/include/db_machdep.h   |    8 +-
 sys/arch/i386/include/frame.h        |    6 +-
 sys/arch/i386/include/param.h        |    6 +-
 sys/arch/i386/include/pcb.h          |    4 +-
 sys/arch/i386/include/pmap.h         |    4 +-
 sys/arch/i386/include/segments.h     |    4 +-
 24 files changed, 184 insertions(+), 216 deletions(-)

diffs (truncated from 1112 to 300 lines):

diff -r 6bde099307f6 -r a671028b7141 sys/arch/i386/conf/GENERIC
--- a/sys/arch/i386/conf/GENERIC        Wed Jun 13 10:46:02 2001 +0000
+++ b/sys/arch/i386/conf/GENERIC        Mon Jun 18 03:33:27 2001 +0000
@@ -1,11 +1,11 @@
-#      $NetBSD: GENERIC,v 1.300.2.16 2001/05/13 00:48:52 sommerfeld Exp $
+#      $NetBSD: GENERIC,v 1.300.2.17 2001/06/18 03:33:27 sommerfeld Exp $
 #
 #      GENERIC -- everything that's currently supported
 #
 
 include "arch/i386/conf/std.i386"
 
-#ident                 "GENERIC-$Revision: 1.300.2.16 $"
+#ident                 "GENERIC-$Revision: 1.300.2.17 $"
 
 maxusers       32              # estimated number of users
 
@@ -399,6 +399,7 @@
 ahc*   at pci? dev ? function ?        # Adaptec [23]94x, aic78x0 SCSI
 bha*   at pci? dev ? function ?        # BusLogic 9xx SCSI
 dpt*   at pci? dev ? function ?        # DPT SmartCache/SmartRAID
+iha*   at pci? dev ? function ?        # Initio INIC-940/950 SCSI
 isp*   at pci? dev ? function ?        # Qlogic ISP [12]0x0 SCSI/FibreChannel
 #ncr*  at pci? dev ? function ?        # NCR 53c8xx SCSI (old driver)
 siop*  at pci? dev ? function ?        # Symbios 53c8xx SCSI
@@ -450,6 +451,7 @@
 scsibus* at bha?
 scsibus* at dpt?
 scsibus* at esp?
+scsibus* at iha?
 scsibus* at iopsp?
 scsibus* at isp?
 #scsibus* at nca?
diff -r 6bde099307f6 -r a671028b7141 sys/arch/i386/conf/INSTALL
--- a/sys/arch/i386/conf/INSTALL        Wed Jun 13 10:46:02 2001 +0000
+++ b/sys/arch/i386/conf/INSTALL        Mon Jun 18 03:33:27 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: INSTALL,v 1.135.2.10 2001/05/07 17:07:22 sommerfeld Exp $
+#      $NetBSD: INSTALL,v 1.135.2.11 2001/06/18 03:33:27 sommerfeld Exp $
 #
 #      INSTALL - Installation kernel.
 #
@@ -301,6 +301,7 @@
 ahc*   at pci? dev ? function ?        # Adaptec [23]94x, aic78x0 SCSI
 bha*   at pci? dev ? function ?        # BusLogic 9xx SCSI
 dpt*   at pci? dev ? function ?        # DPT SmartCache/SmartRAID
+iha*   at pci? dev ? function ?        # Initio INIC-940/950 SCSI
 isp*   at pci? dev ? function ?        # Qlogic ISP [12]0x0 SCSI/FibreChannel
 #ncr*  at pci? dev ? function ?        # NCR 53c8xx SCSI
 siop*  at pci? dev ? function ?        # NCR 53c8xx SCSI (new driver)
@@ -347,6 +348,7 @@
 scsibus* at aic?
 scsibus* at bha?
 scsibus* at dpt?
+scsibus* at iha?
 scsibus* at iopsp?
 scsibus* at isp?
 #scsibus* at nca?
diff -r 6bde099307f6 -r a671028b7141 sys/arch/i386/i386/db_interface.c
--- a/sys/arch/i386/i386/db_interface.c Wed Jun 13 10:46:02 2001 +0000
+++ b/sys/arch/i386/i386/db_interface.c Mon Jun 18 03:33:27 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.c,v 1.30.2.4 2001/01/23 06:34:56 thorpej Exp $    */
+/*     $NetBSD: db_interface.c,v 1.30.2.5 2001/06/18 03:33:28 sommerfeld Exp $ */
 
 /* 
  * Mach Operating System
@@ -215,6 +215,8 @@
 #endif
        ddb_regp = &dbreg;
 
+       regs->tf_gs     = ddb_regs.tf_gs;
+       regs->tf_fs     = ddb_regs.tf_fs;
        regs->tf_es     = ddb_regs.tf_es;
        regs->tf_ds     = ddb_regs.tf_ds;
        regs->tf_edi    = ddb_regs.tf_edi;
diff -r 6bde099307f6 -r a671028b7141 sys/arch/i386/i386/db_trace.c
--- a/sys/arch/i386/i386/db_trace.c     Wed Jun 13 10:46:02 2001 +0000
+++ b/sys/arch/i386/i386/db_trace.c     Mon Jun 18 03:33:27 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_trace.c,v 1.28.4.4 2001/01/23 06:34:56 thorpej Exp $        */
+/*     $NetBSD: db_trace.c,v 1.28.4.5 2001/06/18 03:33:28 sommerfeld Exp $     */
 
 /* 
  * Mach Operating System
@@ -48,8 +48,10 @@
 static int db_i386_regop (const struct db_variable *, db_expr_t *, int);
 
 const struct db_variable db_regs[] = {
+       { "ds",         dbreg(ds),     db_i386_regop },
        { "es",         dbreg(es),     db_i386_regop },
-       { "ds",         dbreg(ds),     db_i386_regop },
+       { "fs",         dbreg(fs),     db_i386_regop },
+       { "gs",         dbreg(gs),     db_i386_regop },
        { "edi",        dbreg(edi),    db_i386_regop },
        { "esi",        dbreg(esi),    db_i386_regop },
        { "ebp",        dbreg(ebp),    db_i386_regop },
diff -r 6bde099307f6 -r a671028b7141 sys/arch/i386/i386/freebsd_syscall.c
--- a/sys/arch/i386/i386/freebsd_syscall.c      Wed Jun 13 10:46:02 2001 +0000
+++ b/sys/arch/i386/i386/freebsd_syscall.c      Mon Jun 18 03:33:27 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: freebsd_syscall.c,v 1.5.4.2 2001/01/07 22:12:40 sommerfeld Exp $       */
+/*     $NetBSD: freebsd_syscall.c,v 1.5.4.3 2001/06/18 03:33:28 sommerfeld Exp $       */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if defined(_KERNEL) && !defined(_LKM)
+#if defined(_KERNEL_OPT)
 #include "opt_syscall_debug.h"
 #include "opt_ktrace.h"
 #endif
diff -r 6bde099307f6 -r a671028b7141 sys/arch/i386/i386/genassym.cf
--- a/sys/arch/i386/i386/genassym.cf    Wed Jun 13 10:46:02 2001 +0000
+++ b/sys/arch/i386/i386/genassym.cf    Mon Jun 18 03:33:27 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: genassym.cf,v 1.17.10.12 2001/05/26 20:05:42 sommerfeld Exp $
+#      $NetBSD: genassym.cf,v 1.17.10.13 2001/06/18 03:33:28 sommerfeld Exp $
 
 #
 # Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -174,8 +174,6 @@
 define PCB_CR3                 offsetof(struct pcb, pcb_cr3)
 define PCB_EBP                 offsetof(struct pcb, pcb_ebp)
 define PCB_ESP                 offsetof(struct pcb, pcb_esp)
-define PCB_FS                  offsetof(struct pcb, pcb_fs)
-define PCB_GS                  offsetof(struct pcb, pcb_gs)
 define PCB_CR0                 offsetof(struct pcb, pcb_cr0)
 define PCB_LDT_SEL             offsetof(struct pcb, pcb_ldt_sel)
 define PCB_ONFAULT             offsetof(struct pcb, pcb_onfault)
@@ -191,24 +189,15 @@
 
 define SIGF_HANDLER            offsetof(struct sigframe, sf_handler)
 define SIGF_SC                 offsetof(struct sigframe, sf_sc)
-define SC_FS                   offsetof(struct sigcontext, sc_fs)
-define SC_GS                   offsetof(struct sigcontext, sc_gs)
-define SC_EFLAGS               offsetof(struct sigcontext, sc_eflags)
 
 ifdef COMPAT_SVR4
 define SVR4_SIGF_HANDLER       offsetof(struct svr4_sigframe, sf_handler)
 define SVR4_SIGF_UC            offsetof(struct svr4_sigframe, sf_uc)
-define SVR4_UC_FS              offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_FS])
-define SVR4_UC_GS              offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_GS])
-define SVR4_UC_EFLAGS          offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_EFL])
 endif
 
 ifdef COMPAT_LINUX
 define LINUX_SIGF_HANDLER      offsetof(struct linux_sigframe, sf_handler)
 define LINUX_SIGF_SC           offsetof(struct linux_sigframe, sf_sc)
-define LINUX_SC_FS             offsetof(struct linux_sigcontext, sc_fs)
-define LINUX_SC_GS             offsetof(struct linux_sigcontext, sc_gs)
-define LINUX_SC_EFLAGS         offsetof(struct linux_sigcontext, sc_eflags)
 endif
 
 ifdef COMPAT_FREEBSD
diff -r 6bde099307f6 -r a671028b7141 sys/arch/i386/i386/ibcs2_syscall.c
--- a/sys/arch/i386/i386/ibcs2_syscall.c        Wed Jun 13 10:46:02 2001 +0000
+++ b/sys/arch/i386/i386/ibcs2_syscall.c        Mon Jun 18 03:33:27 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ibcs2_syscall.c,v 1.14.2.2 2001/01/07 22:12:41 sommerfeld Exp $        */
+/*     $NetBSD: ibcs2_syscall.c,v 1.14.2.3 2001/06/18 03:33:28 sommerfeld Exp $        */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if defined(_KERNEL) && !defined(_LKM)
+#if defined(_KERNEL_OPT)
 #include "opt_syscall_debug.h"
 #include "opt_vm86.h"
 #include "opt_ktrace.h"
diff -r 6bde099307f6 -r a671028b7141 sys/arch/i386/i386/linux_syscall.c
--- a/sys/arch/i386/i386/linux_syscall.c        Wed Jun 13 10:46:02 2001 +0000
+++ b/sys/arch/i386/i386/linux_syscall.c        Mon Jun 18 03:33:27 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_syscall.c,v 1.15.2.2 2001/01/07 22:12:41 sommerfeld Exp $        */
+/*     $NetBSD: linux_syscall.c,v 1.15.2.3 2001/06/18 03:33:28 sommerfeld Exp $        */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if defined(_KERNEL) && !defined(_LKM)
+#if defined(_KERNEL_OPT)
 #include "opt_syscall_debug.h"
 #include "opt_vm86.h"
 #include "opt_ktrace.h"
diff -r 6bde099307f6 -r a671028b7141 sys/arch/i386/i386/locore.s
--- a/sys/arch/i386/i386/locore.s       Wed Jun 13 10:46:02 2001 +0000
+++ b/sys/arch/i386/i386/locore.s       Mon Jun 18 03:33:27 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.215.2.24 2001/05/23 03:13:37 sommerfeld Exp $     */
+/*     $NetBSD: locore.s,v 1.215.2.25 2001/06/18 03:33:29 sommerfeld Exp $     */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -233,8 +233,15 @@
        pushl   %ds             ; \
        pushl   %es             ; \
        movl    %ax,%ds         ; \
-       movl    %ax,%es
+       movl    %ax,%es         ; \
+       pushl   %fs             ; \
+       pushl   %gs             ; \
+       movl    %ax,%fs         ; \
+       movl    %ax,%gs         ; \
+
 #define        INTRFASTEXIT \
+       popl    %gs             ; \
+       popl    %fs             ; \
        popl    %es             ; \
        popl    %ds             ; \
        popl    %edi            ; \
@@ -413,12 +420,15 @@
        pushl   $PSL_MBO
        popfl
 
-       /* Find out our CPU type. */
-
+       /* Clear segment registers; always null in proc0. */
        xorl    %eax,%eax
+       movl    %ax,%fs
+       movl    %ax,%gs
        decl    %eax
        movl    %eax,RELOC(cpu_info_primary)+CPU_INFO_LEVEL
 
+       /* Find out our CPU type. */
+
 try386:        /* Try to toggle alignment check flag; does not exist on 386. */
        pushfl
        popl    %eax
@@ -756,11 +766,6 @@
        call    _C_LABEL(init386)       # wire 386 chip for unix operation
        addl    $4,%esp
 
-       /* Clear segment registers; always null in proc0. */
-       xorl    %ecx,%ecx
-       movl    %cx,%fs
-       movl    %cx,%gs
-
 #ifdef SAFARI_FIFO_HACK
        movb    $5,%al
        movw    $0x37b,%dx
@@ -784,7 +789,7 @@
 /*
  * XXX We need a comment here (lightly) explaining this. Probably a
  * detailed section 9 man page, too, explaining the proc_trampoline.
- * If it is part of the MI/MD interface, it needs documentation, IMHO.
+ * Almost every port has a proc_trampoline, so it needs documentation, IMHO.
  * -- Perry Metzger, May 7, 2001
  */
 /* LINTSTUB: Func: void proc_trampoline(void) */
@@ -803,7 +808,7 @@
 
 /*
  * XXX No section 9 man page for sigcode or esigcode. IMHO,
- * if it is part of the MI/MD interface, it needs documentation.
+ * Since it is part of the MI/MD interface, it needs documentation.
  * -- Perry Metzger, May 7, 2001
  */
 /*
@@ -814,15 +819,7 @@
        call    SIGF_HANDLER(%esp)
        leal    SIGF_SC(%esp),%eax      # scp (the call may have clobbered the
                                        # copy at SIGF_SCP(%esp))
-#ifdef VM86
-       testl   $PSL_VM,SC_EFLAGS(%eax)
-       jnz     1f
-#endif
-       movl    SC_FS(%eax),%ecx
-       movl    SC_GS(%eax),%edx
-       movl    %cx,%fs
-       movl    %dx,%gs
-1:     pushl   %eax
+       pushl   %eax
        pushl   %eax                    # junk to fake return address
        movl    $SYS___sigreturn14,%eax
        int     $0x80                   # enter kernel with args on stack
@@ -839,9 +836,8 @@
 
 /*
  * XXX No section 9 man page for fillw.
- * fillw seems to be very sparsely used, one wonders if a thing named
- * in the manner of memset wouldn't be better. It is defined in cpu.h
- * so it is technically MD but...
+ * fillw seems to be very sparsely used (only in pccons it seems.)
+ * One wonders if it couldn't be done without.
  * -- Perry Metzger, May 7, 2001
  */
 /*
@@ -870,7 +866,7 @@
 
 /*



Home | Main Index | Thread Index | Old Index