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 Complete merge with -current



details:   https://anonhg.NetBSD.org/src/rev/fa35b86c900a
branches:  sommerfeld_i386mp_1
changeset: 482413:fa35b86c900a
user:      sommerfeld <sommerfeld%NetBSD.org@localhost>
date:      Mon Jun 18 04:49:04 2001 +0000

description:
Complete merge with -current

diffstat:

 sys/arch/i386/conf/files.i386        |   3 ++-
 sys/arch/i386/i386/db_interface.c    |   8 +++++++-
 sys/arch/i386/i386/mptramp.s         |   5 ++---
 sys/arch/i386/i386/process_machdep.c |  15 +++++++--------
 sys/arch/i386/i386/trap.c            |  20 ++++++++++----------
 5 files changed, 28 insertions(+), 23 deletions(-)

diffs (184 lines):

diff -r a671028b7141 -r fa35b86c900a sys/arch/i386/conf/files.i386
--- a/sys/arch/i386/conf/files.i386     Mon Jun 18 03:33:27 2001 +0000
+++ b/sys/arch/i386/conf/files.i386     Mon Jun 18 04:49:04 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.i386,v 1.147.2.13 2001/05/26 22:13:08 sommerfeld Exp $
+#      $NetBSD: files.i386,v 1.147.2.14 2001/06/18 04:49:04 sommerfeld Exp $
 #
 # new style config file for i386 architecture
 #
@@ -365,6 +365,7 @@
 include        "compat/linux/arch/i386/files.linux_i386"
 file   arch/i386/i386/linux_sigcode.s          compat_linux
 file   arch/i386/i386/linux_syscall.c          compat_linux
+file   arch/i386/i386/linux_trap.c             compat_linux
 
 # FreeBSD binary compatibility (COMPAT_FREEBSD)
 include        "compat/freebsd/files.freebsd"
diff -r a671028b7141 -r fa35b86c900a sys/arch/i386/i386/db_interface.c
--- a/sys/arch/i386/i386/db_interface.c Mon Jun 18 03:33:27 2001 +0000
+++ b/sys/arch/i386/i386/db_interface.c Mon Jun 18 04:49:04 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.c,v 1.30.2.5 2001/06/18 03:33:28 sommerfeld Exp $ */
+/*     $NetBSD: db_interface.c,v 1.30.2.6 2001/06/18 04:49:05 sommerfeld Exp $ */
 
 /* 
  * Mach Operating System
@@ -202,6 +202,12 @@
                asm("movw %%ss,%w0" : "=r" (ddb_regs.tf_ss));
        }
 
+       ddb_regs.tf_cs &= 0xffff;
+       ddb_regs.tf_ds &= 0xffff;
+       ddb_regs.tf_es &= 0xffff;
+       ddb_regs.tf_fs &= 0xffff;               
+       ddb_regs.tf_gs &= 0xffff;
+       ddb_regs.tf_ss &= 0xffff;
        s = splhigh();
        db_active++;
        cnpollc(TRUE);
diff -r a671028b7141 -r fa35b86c900a sys/arch/i386/i386/mptramp.s
--- a/sys/arch/i386/i386/mptramp.s      Mon Jun 18 03:33:27 2001 +0000
+++ b/sys/arch/i386/i386/mptramp.s      Mon Jun 18 04:49:04 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mptramp.s,v 1.1.2.5 2001/05/27 17:11:18 sommerfeld Exp $       */
+/*     $NetBSD: mptramp.s,v 1.1.2.6 2001/06/18 04:49:05 sommerfeld Exp $       */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -246,10 +246,9 @@
        
        HALT(0x25)
        /* Restore segment registers. */
-       movl    PCB_FS(%esi),%eax
+       xorl    %eax,%eax
        HALTT(0x26,%eax)
        movl    %ax,%fs
-       movl    PCB_GS(%esi),%eax
        HALTT(0x27,%eax)        
        movl    %ax,%gs
        movl    PCB_CR0(%esi),%eax
diff -r a671028b7141 -r fa35b86c900a sys/arch/i386/i386/process_machdep.c
--- a/sys/arch/i386/i386/process_machdep.c      Mon Jun 18 03:33:27 2001 +0000
+++ b/sys/arch/i386/i386/process_machdep.c      Mon Jun 18 04:49:04 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: process_machdep.c,v 1.30.10.5 2001/06/18 03:33:31 sommerfeld Exp $     */
+/*     $NetBSD: process_machdep.c,v 1.30.10.6 2001/06/18 04:49:05 sommerfeld Exp $     */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -116,10 +116,10 @@
        } else
 #endif
        {
-               regs->r_gs = tf->tf_gs;
-               regs->r_fs = tf->tf_fs;
-               regs->r_es = tf->tf_es;
-               regs->r_ds = tf->tf_ds;
+               regs->r_gs = tf->tf_gs & 0xffff;
+               regs->r_fs = tf->tf_fs & 0xffff;
+               regs->r_es = tf->tf_es & 0xffff;
+               regs->r_ds = tf->tf_ds & 0xffff;
                regs->r_eflags = tf->tf_eflags;
        }
        regs->r_edi = tf->tf_edi;
@@ -130,9 +130,9 @@
        regs->r_ecx = tf->tf_ecx;
        regs->r_eax = tf->tf_eax;
        regs->r_eip = tf->tf_eip;
-       regs->r_cs = tf->tf_cs;
+       regs->r_cs = tf->tf_cs & 0xffff;
        regs->r_esp = tf->tf_esp;
-       regs->r_ss = tf->tf_ss;
+       regs->r_ss = tf->tf_ss & 0xffff;
 
        return (0);
 }
@@ -192,7 +192,6 @@
        } else
 #endif
        {
-
                /*
                 * Check for security violations.
                 */
diff -r a671028b7141 -r fa35b86c900a sys/arch/i386/i386/trap.c
--- a/sys/arch/i386/i386/trap.c Mon Jun 18 03:33:27 2001 +0000
+++ b/sys/arch/i386/i386/trap.c Mon Jun 18 04:49:04 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.134.2.16 2001/06/18 03:33:31 sommerfeld Exp $       */
+/*     $NetBSD: trap.c,v 1.134.2.17 2001/06/18 04:49:05 sommerfeld Exp $       */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -322,14 +322,14 @@
        case T_ALIGNFLT|T_USER:
        case T_NMI|T_USER:
                KERNEL_PROC_LOCK(p);
-               trapsignal(p, SIGBUS, type &~ T_USER);
+               (*p->p_emul->e_trapsignal)(p, SIGBUS, type & ~T_USER);
                KERNEL_PROC_UNLOCK(p);          
                goto out;
 
        case T_PRIVINFLT|T_USER:        /* privileged instruction fault */
        case T_FPOPFLT|T_USER:          /* coprocessor operand fault */
                KERNEL_PROC_LOCK(p);
-               trapsignal(p, SIGILL, type &~ T_USER);
+               (*p->p_emul->e_trapsignal)(p, SIGILL, type & ~T_USER);
                KERNEL_PROC_UNLOCK(p);
                goto out;
 
@@ -353,14 +353,14 @@
                        return;
                }
                KERNEL_PROC_LOCK(p);
-               trapsignal(p, rv, type &~ T_USER);
+               (*p->p_emul->e_trapsignal)(p, rv, type & ~T_USER);
                KERNEL_PROC_UNLOCK(p);
                goto out;
 #else
                printf("pid %d killed due to lack of floating point\n",
                    p->p_pid);
                KERNEL_PROC_LOCK(p);            
-               trapsignal(p, SIGKILL, type &~ T_USER);
+               (*p->p_emul->e_trapsignal)(p, SIGKILL, type & ~T_USER);
                KERNEL_PROC_UNLOCK(p);          
                goto out;
 #endif
@@ -370,13 +370,13 @@
        case T_OFLOW|T_USER:
        case T_DIVIDE|T_USER:
                KERNEL_PROC_LOCK(p);            
-               trapsignal(p, SIGFPE, type &~ T_USER);
+               (*p->p_emul->e_trapsignal)(p, SIGFPE, type & ~T_USER);
                KERNEL_PROC_UNLOCK(p);          
                goto out;
 
        case T_ARITHTRAP|T_USER:
                KERNEL_PROC_LOCK(p);            
-               trapsignal(p, SIGFPE, frame.tf_err);
+               (*p->p_emul->e_trapsignal)(p, SIGFPE, frame.tf_err);
                KERNEL_PROC_UNLOCK(p);          
                goto out;
 
@@ -504,9 +504,9 @@
                               p->p_pid, p->p_comm,
                               p->p_cred && p->p_ucred ?
                               p->p_ucred->cr_uid : -1);
-                       trapsignal(p, SIGKILL, T_PAGEFLT);
+                       (*p->p_emul->e_trapsignal)(p, SIGKILL, T_PAGEFLT);
                } else {
-                       trapsignal(p, SIGSEGV, T_PAGEFLT);
+                       (*p->p_emul->e_trapsignal)(p, SIGSEGV, T_PAGEFLT);
                }
                if (type == T_PAGEFLT)
                        KERNEL_UNLOCK();
@@ -531,7 +531,7 @@
        trace:
 #endif
                KERNEL_PROC_LOCK(p);
-               trapsignal(p, SIGTRAP, type &~ T_USER);
+               (*p->p_emul->e_trapsignal)(p, SIGTRAP, type & ~T_USER);
                KERNEL_PROC_UNLOCK(p);
                break;
 



Home | Main Index | Thread Index | Old Index