Source-Changes-HG archive

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

[src/thorpej_scsipi]: src/sys/arch Sync with HEAD (for UBC fixes)



details:   https://anonhg.NetBSD.org/src/rev/c6736974c004
branches:  thorpej_scsipi
changeset: 477344:c6736974c004
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Wed Dec 13 14:48:51 2000 +0000

description:
Sync with HEAD (for UBC fixes)

diffstat:

 sys/arch/alpha/a12/if_xb.c                   |    8 +-
 sys/arch/alpha/alpha/db_trace.c              |   25 +-
 sys/arch/alpha/alpha/genassym.cf             |    3 +-
 sys/arch/alpha/alpha/locore.s                |   17 +-
 sys/arch/alpha/alpha/osf1_syscall.c          |  352 +++++++++++++++++++++++++
 sys/arch/alpha/alpha/pmap.c                  |   28 +-
 sys/arch/alpha/alpha/syscall.c               |  378 +++++++++++++++++++++++++++
 sys/arch/alpha/alpha/trap.c                  |  263 +-----------------
 sys/arch/alpha/conf/Makefile.alpha           |    8 +-
 sys/arch/alpha/conf/files.alpha              |    4 +-
 sys/arch/alpha/include/alpha.h               |    3 +-
 sys/arch/alpha/include/cpu.h                 |   10 +-
 sys/arch/alpha/include/proc.h                |    3 +-
 sys/arch/alpha/include/types.h               |    4 +-
 sys/arch/alpha/include/z8530var.h            |    4 +-
 sys/arch/arm26/arm26/cpu.c                   |   54 +--
 sys/arch/arm26/arm26/except.c                |   24 +-
 sys/arch/arm26/arm26/intrnames.S             |   18 +-
 sys/arch/arm26/arm26/irq.c                   |   33 +-
 sys/arch/arm26/arm26/locore.S                |   70 ++++-
 sys/arch/arm26/arm26/start.c                 |   10 +-
 sys/arch/arm26/arm26/zeropage.S              |  100 -------
 sys/arch/arm26/conf/files.arm26              |    4 +-
 sys/arch/arm26/include/bus.h                 |    5 +-
 sys/arch/arm26/include/db_machdep.h          |    5 +-
 sys/arch/arm26/include/irq.h                 |   33 ++-
 sys/arch/arm26/include/param.h               |    8 +-
 sys/arch/arm26/ioc/ioeb.c                    |   11 +-
 sys/arch/arm26/podulebus/podulebus.c         |   16 +-
 sys/arch/arm26/podulebus/unixbp.c            |   30 +-
 sys/arch/arm26/podulebus/unixbpvar.h         |   40 ++
 sys/arch/arm32/arm32/ast.c                   |   76 +----
 sys/arch/arm32/arm32/fault.c                 |   30 +-
 sys/arch/arm32/arm32/fusu.S                  |    6 +-
 sys/arch/arm32/arm32/intr.c                  |   11 +-
 sys/arch/arm32/arm32/syscall.c               |  241 +++++-----------
 sys/arch/arm32/arm32/undefined.c             |   21 +-
 sys/arch/arm32/footbridge/footbridge_clock.c |    9 +-
 sys/arch/arm32/fpe-arm/armfpe_init.c         |    4 +-
 sys/arch/arm32/include/asm.h                 |   45 +-
 sys/arch/arm32/include/cpu.h                 |   22 +-
 sys/arch/arm32/include/types.h               |    3 +-
 sys/arch/arm32/iomd/iomd_clock.c             |    9 +-
 sys/arch/arm32/isa/clock.c                   |    8 +-
 sys/arch/arm32/ofw/ofwgencfg_clock.c         |    9 +-
 sys/arch/arm32/podulebus/if_ne_pbus.c        |    4 +-
 sys/arch/arm32/podulebus/podule_data.h       |   23 +-
 sys/arch/arm32/podulebus/podules             |   24 +-
 sys/arch/arm32/podulebus/podules.h           |   26 +-
 sys/arch/hp300/include/vmparam.h             |    4 +-
 sys/arch/hpcmips/dev/hpcfb.c                 |   63 +----
 51 files changed, 1311 insertions(+), 898 deletions(-)

diffs (truncated from 3671 to 300 lines):

diff -r 93658165065c -r c6736974c004 sys/arch/alpha/a12/if_xb.c
--- a/sys/arch/alpha/a12/if_xb.c        Fri Dec 08 09:28:43 2000 +0000
+++ b/sys/arch/alpha/a12/if_xb.c        Wed Dec 13 14:48:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_xb.c,v 1.1.12.1 2000/11/20 19:56:19 bouyer Exp $ */
+/* $NetBSD: if_xb.c,v 1.1.12.2 2000/12/13 14:48:51 bouyer Exp $ */
 
 /* [Notice revision 2.2]
  * Copyright (c) 1997, 1998 Avalon Computer Systems, Inc.
@@ -74,7 +74,7 @@
 #include "opt_avalon_a12.h"            /* Config options headers */
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: if_xb.c,v 1.1.12.1 2000/11/20 19:56:19 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xb.c,v 1.1.12.2 2000/12/13 14:48:51 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -234,7 +234,7 @@
        xbfound = 1;
        ccp = &xb_configuration;
        xb_init_config(ccp, 1);
-       printf(": driver %s mtu %d\n", "$Revision: 1.1.12.1 $", xbi.if_mtu);
+       printf(": driver %s mtu %d\n", "$Revision: 1.1.12.2 $", xbi.if_mtu);
 }
 
 static void
@@ -776,6 +776,6 @@
        /* xbi.if_broadcastaddr = (u_int8_t)&xbar_bc_addr; */
 
 #if NBPFILTER > 0
-       bpfattach(&xbi.if_bpf, &xbi, DLT_NULL, 0);
+       bpfattach(&xbi, DLT_NULL, 0);
 #endif
 }
diff -r 93658165065c -r c6736974c004 sys/arch/alpha/alpha/db_trace.c
--- a/sys/arch/alpha/alpha/db_trace.c   Fri Dec 08 09:28:43 2000 +0000
+++ b/sys/arch/alpha/alpha/db_trace.c   Wed Dec 13 14:48:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_trace.c,v 1.4.2.2 2000/12/08 09:23:21 bouyer Exp $ */
+/* $NetBSD: db_trace.c,v 1.4.2.3 2000/12/13 14:48:53 bouyer Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.4.2.2 2000/12/08 09:23:21 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.4.2.3 2000/12/13 14:48:53 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -173,27 +173,8 @@
 static void
 decode_syscall(int number, struct proc *p, void (*pr)(const char *, ...))
 {
-       db_sym_t sym;
-       db_expr_t diff;
-       char *symname;
-       const char *ename;
-       int (*f) __P((struct proc *, void *, register_t *));
 
-       (*pr)(" (%d", number); /* ) */
-       if (!p)
-               goto out;
-       if (0 <= number && number < p->p_emul->e_nsysent) {
-               ename = p->p_emul->e_name;
-               f = p->p_emul->e_sysent[number].sy_call;
-               sym = db_search_symbol((db_addr_t)f, DB_STGY_ANY, &diff);
-               if (sym == DB_SYM_NULL || diff != 0)
-                       goto out;
-               db_symbol_values(sym, &symname, NULL);
-               (*pr)(", %s.%s", ename, symname);
-       }
-out:
-       (*pr)(")");
-       return;
+       (*pr)(" (%d)", number);
 }
 
 void
diff -r 93658165065c -r c6736974c004 sys/arch/alpha/alpha/genassym.cf
--- a/sys/arch/alpha/alpha/genassym.cf  Fri Dec 08 09:28:43 2000 +0000
+++ b/sys/arch/alpha/alpha/genassym.cf  Wed Dec 13 14:48:51 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.1.2.2 2000/12/08 09:23:22 bouyer Exp $
+# $NetBSD: genassym.cf,v 1.1.2.3 2000/12/13 14:48:54 bouyer Exp $
 
 #
 # Copyright (c) 1994, 1995 Gordon W. Ross
@@ -122,6 +122,7 @@
 define P_CPU                   offsetof(struct proc, p_cpu)
 define P_MD_FLAGS              offsetof(struct proc, p_md.md_flags)
 define P_MD_PCBPADDR           offsetof(struct proc, p_md.md_pcbpaddr)
+define P_MD_SYSCALL            offsetof(struct proc, p_md.md_syscall)
 define PH_LINK                 offsetof(struct prochd, ph_link)
 define PH_RLINK                offsetof(struct prochd, ph_rlink)
 
diff -r 93658165065c -r c6736974c004 sys/arch/alpha/alpha/locore.s
--- a/sys/arch/alpha/alpha/locore.s     Fri Dec 08 09:28:43 2000 +0000
+++ b/sys/arch/alpha/alpha/locore.s     Wed Dec 13 14:48:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.65.2.3 2000/12/08 09:23:23 bouyer Exp $ */
+/* $NetBSD: locore.s,v 1.65.2.4 2000/12/13 14:48:55 bouyer Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
 
 #include <machine/asm.h>
 
-__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.65.2.3 2000/12/08 09:23:23 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.65.2.4 2000/12/13 14:48:55 bouyer Exp $");
 
 #include "assym.h"
 
@@ -364,7 +364,9 @@
        br      2b
 
        /* We've got an AST */
-6:     ldiq    a0, ALPHA_PSL_IPL_0             /* drop IPL to zero */
+6:     stq     zero, CPU_INFO_ASTPENDING(v0)   /* no AST pending */
+
+       ldiq    a0, ALPHA_PSL_IPL_0             /* drop IPL to zero */
        call_pal PAL_OSF1_swpipl
        mov     v0, s2                          /* remember old IPL */
 
@@ -525,9 +527,12 @@
        stq     ra,(FRAME_RA*8)(sp)
 
        /* syscall number, passed in v0, is first arg, frame pointer second */
-       mov     v0,a0
-       mov     sp,a1                   ; .loc 1 __LINE__
-       CALL(syscall)
+       mov     v0,a1
+       GET_CURPROC
+       ldq     a0,0(v0)
+       mov     sp,a2                   ; .loc 1 __LINE__
+       ldq     t12,P_MD_SYSCALL(a0)
+       CALL((t12))
 
        jmp     zero, exception_return
        END(XentSys)
diff -r 93658165065c -r c6736974c004 sys/arch/alpha/alpha/osf1_syscall.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/alpha/alpha/osf1_syscall.c       Wed Dec 13 14:48:51 2000 +0000
@@ -0,0 +1,352 @@
+/* $NetBSD: osf1_syscall.c,v 1.2.2.2 2000/12/13 14:48:57 bouyer Exp $ */
+
+/*-
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
+ * NASA Ames Research Center, and by Charles M. Hannum.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the NetBSD
+ *     Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *      This product includes software developed by Christopher G. Demetriou
+ *     for the NetBSD Project.
+ * 4. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ * 
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ * 
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ * 
+ * Carnegie Mellon requests users of this software to return to
+ *
+ *  Software Distribution Coordinator  or  Software.Distribution%CS.CMU.EDU@localhost
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+#include "opt_syscall_debug.h"
+#include "opt_ktrace.h"
+
+#include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
+
+__KERNEL_RCSID(0, "$NetBSD: osf1_syscall.c,v 1.2.2.2 2000/12/13 14:48:57 bouyer Exp $");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/proc.h>
+#include <sys/user.h>
+#include <sys/signal.h>
+#ifdef KTRACE
+#include <sys/ktrace.h>
+#endif
+#include <sys/syscall.h>
+
+#include <uvm/uvm_extern.h>
+
+#include <machine/cpu.h>
+#include <machine/reg.h>
+#include <machine/alpha.h>
+
+#include <compat/osf1/osf1.h>
+#include <compat/osf1/osf1_cvt.h>
+#include <compat/osf1/osf1_syscall.h>
+
+void   userret __P((struct proc *));
+void   osf1_syscall_intern __P((struct proc *));
+void   osf1_syscall_plain __P((struct proc *, u_int64_t, struct trapframe *));
+void   osf1_syscall_fancy __P((struct proc *, u_int64_t, struct trapframe *));
+
+void
+osf1_syscall_intern(p)
+       struct proc *p;
+{
+
+#ifdef KTRACE
+       if (p->p_traceflag & (KTRFAC_SYSCALL | KTRFAC_SYSRET))
+               p->p_md.md_syscall = osf1_syscall_fancy;
+       else
+#endif
+               p->p_md.md_syscall = osf1_syscall_plain;
+}
+
+/*
+ * Process a system call.
+ *
+ * System calls are strange beasts.  They are passed the syscall number
+ * in v0, and the arguments in the registers (as normal).  They return
+ * an error flag in a3 (if a3 != 0 on return, the syscall had an error),
+ * and the return value (if any) in v0.
+ *
+ * The assembly stub takes care of moving the call number into a register
+ * we can get to, and moves all of the argument registers into their places
+ * in the trap frame.  On return, it restores the callee-saved registers,



Home | Main Index | Thread Index | Old Index