Source-Changes-HG archive

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

[src/nathanw_sa]: src/sys Sync with HEAD.



details:   https://anonhg.NetBSD.org/src/rev/881191e4604b
branches:  nathanw_sa
changeset: 506625:881191e4604b
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Dec 29 19:37:28 2002 +0000

description:
Sync with HEAD.

diffstat:

 sys/arch/sh3/include/exception.h        |  139 +++++++++++++++++++++++
 sys/arch/sh3/sh3/exception.c            |    4 +-
 sys/arch/shark/conf/GENERIC             |    6 +-
 sys/arch/shark/conf/INSTALL             |    4 +-
 sys/arch/sparc/dev/vme_machdep.c        |    8 +-
 sys/arch/sparc/include/pmap.h           |   12 +-
 sys/arch/sparc/include/trap.h           |    3 +-
 sys/arch/sparc/sparc/autoconf.c         |   12 +-
 sys/arch/sparc/sparc/cache.c            |  123 +-------------------
 sys/arch/sparc/sparc/cache.h            |    6 +-
 sys/arch/sparc/sparc/cpu.c              |  133 ++++++++++-----------
 sys/arch/sparc/sparc/cpuvar.h           |   22 ++-
 sys/arch/sparc/sparc/db_interface.c     |   33 ++--
 sys/arch/sparc/sparc/db_trace.c         |   61 +++++-----
 sys/arch/sparc/sparc/intr.c             |  157 ++++++++------------------
 sys/arch/sparc/sparc/locore.s           |   22 ++-
 sys/arch/sparc/sparc/pmap.c             |  192 +++++++++----------------------
 sys/arch/sparc/sparc/trap.c             |   21 ++-
 sys/arch/sparc64/sparc64/autoconf.c     |    8 +-
 sys/arch/sparc64/sparc64/cpu.c          |   11 +-
 sys/arch/sparc64/sparc64/db_interface.c |   42 ++++++-
 sys/arch/sparc64/sparc64/locore.s       |   26 ++++-
 sys/arch/sparc64/sparc64/trap.c         |    8 +-
 sys/arch/sun3/dev/si.c                  |    4 +-
 sys/arch/sun3/dev/si_sebuf.c            |    4 +-
 sys/arch/sun3/sun3/fpu.c                |    6 +-
 sys/arch/vax/vax/trap.c                 |    4 +-
 sys/coda/00READ                         |   19 +-
 sys/coda/coda_subr.c                    |   10 +-
 sys/coda/coda_vfsops.c                  |    5 +-
 sys/coda/files.coda                     |    9 +-
 sys/compat/darwin/darwin_exec.c         |   35 +++++-
 sys/compat/darwin/darwin_exec.h         |    3 +-
 sys/compat/darwin/darwin_mman.c         |    8 +-
 sys/compat/darwin/darwin_syscall.h      |    7 +-
 sys/compat/darwin/darwin_syscallargs.h  |   15 +-
 sys/compat/darwin/darwin_syscalls.c     |   12 +-
 sys/compat/darwin/darwin_sysctl.c       |  104 +++++++++++++---
 sys/compat/darwin/darwin_sysctl.h       |   15 ++-
 sys/compat/darwin/darwin_sysent.c       |   17 +-
 sys/compat/darwin/darwin_thread.c       |   30 ++++-
 sys/compat/darwin/syscalls.master       |   10 +-
 42 files changed, 736 insertions(+), 634 deletions(-)

diffs (truncated from 2772 to 300 lines):

diff -r ed91e7b15e66 -r 881191e4604b sys/arch/sh3/include/exception.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sh3/include/exception.h  Sun Dec 29 19:37:28 2002 +0000
@@ -0,0 +1,139 @@
+/*     $NetBSD: exception.h,v 1.3.6.2 2002/12/29 19:37:28 thorpej Exp $        */
+
+/*-
+ * Copyright (c) 2002 The NetBSD Foundation, Inc.
+ * 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 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.
+ */
+
+#ifndef _SH3_EXCEPTION_H_
+#define        _SH3_EXCEPTION_H_
+/*
+ * SH3/SH4 Exception handling.
+ */
+#include <sh3/devreg.h>
+
+#ifdef _KERNEL
+#define        SH3_TRA                 0xffffffd0      /* 32bit */
+#define        SH3_EXPEVT              0xffffffd4      /* 32bit */
+#define        SH3_INTEVT              0xffffffd8      /* 32bit */
+#define        SH7709_INTEVT2          0xa4000000      /* 32bit */
+
+#define        SH4_TRA                 0xff000020      /* 32bit */
+#define        SH4_EXPEVT              0xff000024      /* 32bit */
+#define        SH4_INTEVT              0xff000028      /* 32bit */
+
+/*
+ * EXPEVT
+ */
+/* Reset exception */
+#define        EXPEVT_RESET_POWER      0x000   /* Power-On reset */
+#define        EXPEVT_RESET_MANUAL     0x020   /* Manual reset */
+#define        EXPEVT_RESET_TLB_MULTI_HIT      0x140   /* SH4 only */
+
+/* General exception */
+#define        EXPEVT_TLB_MISS_LD      0x040   /* TLB miss (load) */
+#define        EXPEVT_TLB_MISS_ST      0x060   /* TLB miss (store) */
+#define        EXPEVT_TLB_MOD          0x080   /* Initial page write */
+#define        EXPEVT_TLB_PROT_LD      0x0a0   /* Protection violation (load) */
+#define        EXPEVT_TLB_PROT_ST      0x0c0   /* Protection violation (store)*/
+#define        EXPEVT_ADDR_ERR_LD      0x0e0   /* Address error (load) */
+#define        EXPEVT_ADDR_ERR_ST      0x100   /* Address error (store) */
+#define        EXPEVT_FPU              0x120   /* FPU exception */
+#define        EXPEVT_TRAPA            0x160   /* Unconditional trap (TRAPA) */
+#define        EXPEVT_RES_INST         0x180   /* Illegal instruction */
+#define        EXPEVT_SLOT_INST        0x1a0   /* Illegal slot instruction */
+#define        EXPEVT_BREAK            0x1e0   /* User break */
+#define        EXPEVT_FPU_DISABLE      0x800   /* FPU disabled */
+#define        EXPEVT_FPU_SLOT_DISABLE 0x820   /* Slot FPU disabled */
+
+/* Software bit */
+#define        EXP_USER                0x001   /* exception from user-mode */
+
+#define        _SH_TRA_BREAK           0xc3    /* magic number for debugger */
+
+/*
+ * INTEVT/INTEVT2
+ */
+/* External interrupt */
+#define        SH_INTEVT_NMI           0x1c0
+
+#define        SH_INTEVT_TMU0_TUNI0    0x400
+#define        SH_INTEVT_TMU1_TUNI1    0x420
+#define        SH_INTEVT_TMU2_TUNI2    0x440
+#define        SH_INTEVT_TMU2_TICPI2   0x460
+
+#define        SH_INTEVT_SCI_ERI       0x4e0
+#define        SH_INTEVT_SCI_RXI       0x500
+#define        SH_INTEVT_SCI_TXI       0x520
+#define        SH_INTEVT_SCI_TEI       0x540
+
+#define        SH_INTEVT_WDT_ITI       0x560
+
+#define        SH_INTEVT_IRL9          0x320
+#define        SH_INTEVT_IRL11         0x360
+#define        SH_INTEVT_IRL13         0x3a0
+
+#define        SH4_INTEVT_SCIF_ERI     0x700
+#define        SH4_INTEVT_SCIF_RXI     0x720
+#define        SH4_INTEVT_SCIF_BRI     0x740
+#define        SH4_INTEVT_SCIF_TXI     0x760
+
+#define        SH7709_INTEVT2_IRQ0     0x600
+#define        SH7709_INTEVT2_IRQ1     0x620
+#define        SH7709_INTEVT2_IRQ2     0x640
+#define        SH7709_INTEVT2_IRQ3     0x660
+#define        SH7709_INTEVT2_IRQ4     0x680
+#define        SH7709_INTEVT2_IRQ5     0x6a0
+
+#define        SH7709_INTEVT2_PINT07   0x700
+#define        SH7709_INTEVT2_PINT8F   0x720
+
+#define        SH7709_INTEVT2_IRDA_ERI 0x880
+#define        SH7709_INTEVT2_IRDA_RXI 0x8a0
+#define        SH7709_INTEVT2_IRDA_BRI 0x8c0
+#define        SH7709_INTEVT2_IRDA_TXI 0x8e0
+
+#define        SH7709_INTEVT2_SCIF_ERI 0x900
+#define        SH7709_INTEVT2_SCIF_RXI 0x920
+#define        SH7709_INTEVT2_SCIF_BRI 0x940
+#define        SH7709_INTEVT2_SCIF_TXI 0x960
+
+#define        SH7709_INTEVT2_ADC      0x980
+
+#ifndef _LOCORE
+#if defined(SH3) && defined(SH4)
+extern u_int32_t __sh_TRA;
+extern u_int32_t __sh_EXPEVT;
+extern u_int32_t __sh_INTEVT;
+#endif /* SH3 && SH4 */
+#endif /* !_LOCORE */
+#endif /* _KERNEL */
+#endif /* !_SH3_EXCEPTION_H_ */
diff -r ed91e7b15e66 -r 881191e4604b sys/arch/sh3/sh3/exception.c
--- a/sys/arch/sh3/sh3/exception.c      Sun Dec 29 19:25:40 2002 +0000
+++ b/sys/arch/sh3/sh3/exception.c      Sun Dec 29 19:37:28 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exception.c,v 1.2.4.4 2002/12/11 06:11:55 thorpej Exp $        */
+/*     $NetBSD: exception.c,v 1.2.4.5 2002/12/29 19:37:29 thorpej Exp $        */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved.
@@ -296,7 +296,7 @@
        if (error)
                goto bad;
 
-       if ((error = trace_enter(l, code, code, args, rval)) != 0)
+       if ((error = trace_enter(l, code, code, NULL, args, rval)) != 0)
                goto bad;
 
        rval[0] = 0;
diff -r ed91e7b15e66 -r 881191e4604b sys/arch/shark/conf/GENERIC
--- a/sys/arch/shark/conf/GENERIC       Sun Dec 29 19:25:40 2002 +0000
+++ b/sys/arch/shark/conf/GENERIC       Sun Dec 29 19:37:28 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: GENERIC,v 1.1.2.6 2002/10/18 02:39:45 nathanw Exp $
+#      $NetBSD: GENERIC,v 1.1.2.7 2002/12/29 19:37:45 thorpej Exp $
 #
 # Generic Shark configuration.
 #
@@ -7,7 +7,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident         "GENERIC-$Revision: 1.1.2.6 $"
+#ident         "GENERIC-$Revision: 1.1.2.7 $"
 
 # estimated number of users
 maxusers       32
@@ -143,7 +143,7 @@
                                # (needed because we boot netbsd.aout)
 #options       DDB_ONPANIC=0   # don't run DDB at panictime
 #options       DDB_HISTORY_SIZE=100    # Enable history editing in DDB
-#options       KERNEL_DEBUG    # compile in kernel debuging capability
+#options       KERNEL_DEBUG    # compile in kernel debugging capability
 #makeoptions   DEBUG="-g"      # compile full symbol table
 
 config         netbsd          root on ? type ?
diff -r ed91e7b15e66 -r 881191e4604b sys/arch/shark/conf/INSTALL
--- a/sys/arch/shark/conf/INSTALL       Sun Dec 29 19:25:40 2002 +0000
+++ b/sys/arch/shark/conf/INSTALL       Sun Dec 29 19:37:28 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: INSTALL,v 1.2.2.7 2002/10/18 02:39:45 nathanw Exp $
+#      $NetBSD: INSTALL,v 1.2.2.8 2002/12/29 19:37:45 thorpej Exp $
 #
 #      Shark installation kernel
 #
@@ -135,7 +135,7 @@
 options        DDB             # in-kernel debugger
 #options       DDB_ONPANIC=0   # don't run DDB at panictime
 #options       DDB_HISTORY_SIZE=100    # Enable history editing in DDB
-#options       KERNEL_DEBUG    # compile in kernel debuging capability
+#options       KERNEL_DEBUG    # compile in kernel debugging capability
 #makeoptions   DEBUG="-g"      # compile full symbol table
 
 config         netbsd          root on ? type ffs      # root on miniroot
diff -r ed91e7b15e66 -r 881191e4604b sys/arch/sparc/dev/vme_machdep.c
--- a/sys/arch/sparc/dev/vme_machdep.c  Sun Dec 29 19:25:40 2002 +0000
+++ b/sys/arch/sparc/dev/vme_machdep.c  Sun Dec 29 19:37:28 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vme_machdep.c,v 1.34.4.8 2002/12/19 00:37:58 thorpej Exp $     */
+/*     $NetBSD: vme_machdep.c,v 1.34.4.9 2002/12/29 19:40:12 thorpej Exp $     */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -205,10 +205,14 @@
 struct sparc_bus_space_tag sparc_vme_bus_tag = {
        NULL, /* cookie */
        NULL, /* parent bus tag */
+       NULL, /* ranges */
+       0,    /* nranges */
        NULL, /* bus_map */
        NULL, /* bus_unmap */
        NULL, /* bus_subregion */
-       NULL  /* barrier */
+       NULL, /* barrier */
+       NULL, /* mmap */
+       NULL  /* intr_establish */
 };
 
 struct vme_chipset_tag sparc_vme_chipset_tag = {
diff -r ed91e7b15e66 -r 881191e4604b sys/arch/sparc/include/pmap.h
--- a/sys/arch/sparc/include/pmap.h     Sun Dec 29 19:25:40 2002 +0000
+++ b/sys/arch/sparc/include/pmap.h     Sun Dec 29 19:37:28 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.h,v 1.58.4.5 2002/10/18 02:39:57 nathanw Exp $ */
+/*     $NetBSD: pmap.h,v 1.58.4.6 2002/12/29 19:40:14 thorpej Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -387,13 +387,13 @@
  * Macros which implement SRMMU TLB flushing/invalidation
  */
 #define tlb_flush_page_real(va)    \
-       sta(((vaddr_t)(va) & ~0xfff) | ASI_SRMMUFP_L3, ASI_SRMMUFP, 0)
+       sta(((vaddr_t)(va) & 0xfffff000) | ASI_SRMMUFP_L3, ASI_SRMMUFP, 0)
 
-#define tlb_flush_segment_real(vr, vs) \
-       sta(((vr)<<RGSHIFT) | ((vs)<<SGSHIFT) | ASI_SRMMUFP_L2, ASI_SRMMUFP,0)
+#define tlb_flush_segment_real(va) \
+       sta(((vaddr_t)(va) & 0xfffc0000) | ASI_SRMMUFP_L2, ASI_SRMMUFP, 0)
 
-#define tlb_flush_region_real(vr) \
-       sta(((vr) << RGSHIFT) | ASI_SRMMUFP_L1, ASI_SRMMUFP, 0)
+#define tlb_flush_region_real(va) \
+       sta(((vaddr_t)(va) & 0xff000000) | ASI_SRMMUFP_L1, ASI_SRMMUFP, 0)
 
 #define tlb_flush_context_real()       sta(ASI_SRMMUFP_L0, ASI_SRMMUFP, 0)
 #define tlb_flush_all_real()           sta(ASI_SRMMUFP_LN, ASI_SRMMUFP, 0)
diff -r ed91e7b15e66 -r 881191e4604b sys/arch/sparc/include/trap.h
--- a/sys/arch/sparc/include/trap.h     Sun Dec 29 19:25:40 2002 +0000
+++ b/sys/arch/sparc/include/trap.h     Sun Dec 29 19:37:28 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.h,v 1.11 1999/01/20 00:15:08 pk Exp $ */
+/*     $NetBSD: trap.h,v 1.11.26.1 2002/12/29 19:40:15 thorpej Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -109,6 +109,7 @@
 #define        T_SVR4_SYSCALL  0x88    /* SVR4 system call */
 #define        T_BSD_SYSCALL   0x89    /* BSD system call */
 #define        T_KGDB_EXEC     0x8a    /* for kernel gdb */
+#define        T_DBPAUSE       0x8b    /* for smp kernel debugging */
 
 /* 0x8b..0xff are currently unallocated, except the following */
 #define T_SVR4_GETCC           0xa0
diff -r ed91e7b15e66 -r 881191e4604b sys/arch/sparc/sparc/autoconf.c
--- a/sys/arch/sparc/sparc/autoconf.c   Sun Dec 29 19:25:40 2002 +0000
+++ b/sys/arch/sparc/sparc/autoconf.c   Sun Dec 29 19:37:28 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.157.4.12 2002/12/19 00:38:00 thorpej Exp $ */
+/*     $NetBSD: autoconf.c,v 1.157.4.13 2002/12/29 19:40:17 thorpej Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -136,6 +136,7 @@
 static void bootpath_print __P((struct bootpath *));
 static struct bootpath *bootpath_store __P((int, struct bootpath *));
 int    find_cpus __P((void));
+char   machine_model[100];
 
 #ifdef DEBUG
 #define ACDB_BOOTDEV   0x1
@@ -1171,10 +1172,13 @@
 
 
        if (CPU_ISSUN4)
-               printf(": SUN-4/%d series\n", cpuinfo.classlvl);
+               snprintf(machine_model, sizeof machine_model, "SUN-4/%d series",
+                   cpuinfo.classlvl);



Home | Main Index | Thread Index | Old Index