Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/pmax - Continue on branch merge, incrementally.



details:   https://anonhg.NetBSD.org/src/rev/6a3fd1942d91
branches:  trunk
changeset: 473237:6a3fd1942d91
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Wed May 26 04:23:58 1999 +0000

description:
- Continue on branch merge, incrementally.
- Catch up filename changes escaped to be fixed.

diffstat:

 sys/arch/pmax/include/autoconf.h  |   6 ++--
 sys/arch/pmax/pmax/dec_3100.c     |  44 ++++++++++++++++++------------------
 sys/arch/pmax/pmax/dec_3max.c     |  39 +++++++++++++++++---------------
 sys/arch/pmax/pmax/dec_3maxplus.c |  21 +++++++++++------
 sys/arch/pmax/pmax/dec_3min.c     |  26 +++++++++++----------
 sys/arch/pmax/pmax/dec_5100.c     |  46 +++++++++++++++++++-------------------
 sys/arch/pmax/pmax/dec_maxine.c   |  21 ++++++++++-------
 sys/arch/pmax/pmax/mainbus.c      |   5 ++-
 sys/arch/pmax/pmax/memc_3max.c    |   6 ++--
 sys/arch/pmax/pmax/memc_3min.c    |   6 ++--
 10 files changed, 117 insertions(+), 103 deletions(-)

diffs (truncated from 636 to 300 lines):

diff -r b3b5b867460d -r 6a3fd1942d91 sys/arch/pmax/include/autoconf.h
--- a/sys/arch/pmax/include/autoconf.h  Wed May 26 02:01:49 1999 +0000
+++ b/sys/arch/pmax/include/autoconf.h  Wed May 26 04:23:58 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.h,v 1.12 1999/04/24 08:01:09 simonb Exp $ */
+/*     $NetBSD: autoconf.h,v 1.13 1999/05/26 04:23:58 nisimura Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -32,8 +32,8 @@
  */
 
 struct confargs {
-       char    *ca_name;               /* device name */
-       int     ca_slot;                /* CPU "slot" number */
+       const char      *ca_name;               /* device name */
+       int             ca_slot;                /* CPU "slot" number */
 };
 
 typedef void   *intr_arg_t;            /* pointer to some softc */
diff -r b3b5b867460d -r 6a3fd1942d91 sys/arch/pmax/pmax/dec_3100.c
--- a/sys/arch/pmax/pmax/dec_3100.c     Wed May 26 02:01:49 1999 +0000
+++ b/sys/arch/pmax/pmax/dec_3100.c     Wed May 26 04:23:58 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dec_3100.c,v 1.11 1999/05/25 04:17:57 nisimura Exp $   */
+/*     $NetBSD: dec_3100.c,v 1.12 1999/05/26 04:23:59 nisimura Exp $   */
 
 /*
  * Copyright (c) 1998 Jonathan Stone.  All rights reserved.
@@ -89,7 +89,6 @@
 #include <pmax/pmax/clockreg.h>
 #include <pmax/pmax/turbochannel.h>
 #include <pmax/pmax/pmaxtype.h>
-#include <pmax/pmax/machdep.h>         /* XXXjrs replace with vectors */
 
 #include <pmax/pmax/kn01.h>
 
@@ -106,22 +105,23 @@
 void           dec_3100_enable_intr
                   __P ((u_int slotno, int (*handler) __P((intr_arg_t sc)),
                         intr_arg_t sc, int onoff));
-int            dec_3100_intr __P((u_int mask, u_int pc,
-                             u_int statusReg, u_int causeReg));
-
+int            dec_3100_intr __P((unsigned, unsigned, unsigned, unsigned));
 void           dec_3100_cons_init __P((void));
 void           dec_3100_device_register __P((struct device *, void *));
 
 static void    dec_3100_errintr __P((void));
 
-void
-dec_3100_intr_establish __P((void* cookie, int level,
+void   dec_3100_intr_establish __P((void* cookie, int level,
                         int (*handler) __P((intr_arg_t)), intr_arg_t arg));
 void   dec_3100_intr_disestablish __P((struct ibus_attach_args *ia));
 
 extern unsigned nullclkread __P((void));
 extern unsigned (*clkread) __P((void));
 
+extern volatile struct chiptime *mcclock_addr; /* XXX */
+extern char cpu_model[];
+
+
 /*
  * Fill in platform struct.
  */
@@ -149,8 +149,7 @@
         */
        mips_hardware_intr = dec_3100_intr;
        tc_enable_interrupt = dec_3100_enable_intr; /*XXX*/
-       mcclock_addr = (volatile struct chiptime *)
-               MIPS_PHYS_TO_KSEG1(KN01_SYS_CLOCK);
+       mcclock_addr = (void *)MIPS_PHYS_TO_KSEG1(KN01_SYS_CLOCK);
 
        /* no high resolution timer circuit; possibly never called */
        clkread = nullclkread;
@@ -220,31 +219,32 @@
  * Handle pmax (DECstation 2100/3100) interrupts.
  */
 int
-dec_3100_intr(mask, pc, statusReg, causeReg)
+dec_3100_intr(mask, pc, status, cause)
        unsigned mask;
        unsigned pc;
-       unsigned statusReg;
-       unsigned causeReg;
+       unsigned status;
+       unsigned cause;
 {
-       volatile struct chiptime *c =
-           (volatile struct chiptime *)MIPS_PHYS_TO_KSEG1(KN01_SYS_CLOCK);
-       struct clockframe cf;
-       int temp;
-
        /* handle clock interrupts ASAP */
        if (mask & MIPS_INT_MASK_3) {
-               temp = c->regc; /* XXX clear interrupt bits */
+               struct clockframe cf;
+               struct chiptime *clk;
+               volatile int temp;
+
+               clk = (void *)MIPS_PHYS_TO_KSEG1(KN01_SYS_CLOCK);
+               temp = clk->regc;       /* XXX clear interrupt bits */
+
                cf.pc = pc;
-               cf.sr = statusReg;
+               cf.sr = status;
                hardclock(&cf);
                intrcnt[HARDCLOCK]++;
 
                /* keep clock interrupts enabled when we return */
-               causeReg &= ~MIPS_INT_MASK_3;
+               cause &= ~MIPS_INT_MASK_3;
        }
 
        /* If clock interrupts were enabled, re-enable them ASAP. */
-       _splset(MIPS_SR_INT_IE | (statusReg & MIPS_INT_MASK_3));
+       _splset(MIPS_SR_INT_IE | (status & MIPS_INT_MASK_3));
 
 #if NSII > 0
        if (mask & MIPS_INT_MASK_0) {
@@ -277,7 +277,7 @@
                dec_3100_errintr();
                intrcnt[ERROR_INTR]++;
        }
-       return(MIPS_SR_INT_IE | (statusReg & ~causeReg & MIPS_HARD_INT_MASK));
+       return (MIPS_SR_INT_IE | (status & ~cause & MIPS_HARD_INT_MASK));
 }
 
 void
diff -r b3b5b867460d -r 6a3fd1942d91 sys/arch/pmax/pmax/dec_3max.c
--- a/sys/arch/pmax/pmax/dec_3max.c     Wed May 26 02:01:49 1999 +0000
+++ b/sys/arch/pmax/pmax/dec_3max.c     Wed May 26 04:23:58 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dec_3max.c,v 1.12 1999/05/25 04:17:57 nisimura Exp $   */
+/*     $NetBSD: dec_3max.c,v 1.13 1999/05/26 04:23:59 nisimura Exp $   */
 
 /*
  * Copyright (c) 1998 Jonathan Stone.  All rights reserved.
@@ -73,7 +73,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: dec_3max.c,v 1.12 1999/05/25 04:17:57 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_3max.c,v 1.13 1999/05/26 04:23:59 nisimura Exp $");
 
 #include <sys/types.h>
 #include <sys/systm.h>
@@ -92,7 +92,6 @@
 #include <pmax/pmax/clockreg.h>
 #include <pmax/pmax/turbochannel.h>
 #include <pmax/pmax/pmaxtype.h>
-#include <pmax/pmax/machdep.h>         /* XXXjrs replace with vectors */
 
 #include <pmax/pmax/kn02.h>
 #include <pmax/pmax/memc.h>
@@ -107,8 +106,7 @@
 void           dec_3max_enable_intr
                   __P ((u_int slotno, int (*handler)  __P((intr_arg_t sc)),
                         intr_arg_t sc, int onoff));
-int            dec_3max_intr __P((u_int mask, u_int pc,
-                             u_int statusReg, u_int causeReg));
+int            dec_3max_intr __P((unsigned, unsigned, unsigned, unsigned));
 void           dec_3max_cons_init __P((void));
 void           dec_3max_device_register __P((struct device *, void *));
 
@@ -117,6 +115,9 @@
 extern unsigned nullclkread __P((void));
 extern unsigned (*clkread) __P((void));
 
+extern volatile struct chiptime *mcclock_addr; /* XXX */
+extern char cpu_model[];
+
 /*
  * Fill in platform struct.
  */
@@ -250,22 +251,22 @@
  * Returns spl value.
  */
 int
-dec_3max_intr(mask, pc, statusReg, causeReg)
+dec_3max_intr(mask, pc, status, cause)
        unsigned mask;
        unsigned pc;
-       unsigned statusReg;
-       unsigned causeReg;
+       unsigned status;
+       unsigned cause;
 {
+       static int warned = 0;
        unsigned i, m;
-       volatile struct chiptime *c =
-           (volatile struct chiptime *) MIPS_PHYS_TO_KSEG1(KN02_SYS_CLOCK);
        unsigned csr;
-       int temp;
-       struct clockframe cf;
-       static int warned = 0;
 
        /* handle clock interrupts ASAP */
        if (mask & MIPS_INT_MASK_1) {
+               struct clockframe cf;
+               struct chiptime *clk;
+               volatile int temp;
+
                csr = *(unsigned *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR);
                if ((csr & KN02_CSR_PSWARN) && !warned) {
                        warned = 1;
@@ -275,18 +276,20 @@
                        printf("WARNING: power supply is OK again\n");
                }
 
-               temp = c->regc; /* XXX clear interrupt bits */
+               clk = (void *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CLOCK);
+               temp = clk->regc;       /* XXX clear interrupt bits */
+
                cf.pc = pc;
-               cf.sr = statusReg;
+               cf.sr = status;
                hardclock(&cf);
                intrcnt[HARDCLOCK]++;
 
                /* keep clock interrupts enabled when we return */
-               causeReg &= ~MIPS_INT_MASK_1;
+               cause &= ~MIPS_INT_MASK_1;
        }
 
        /* If clock interrups were enabled, re-enable them ASAP. */
-       _splset(MIPS_SR_INT_IE | (statusReg & MIPS_INT_MASK_1));
+       _splset(MIPS_SR_INT_IE | (status & MIPS_INT_MASK_1));
 
        if (mask & MIPS_INT_MASK_0) {
                static int intr_map[8] = { SLOT0_INTR, SLOT1_INTR, SLOT2_INTR,
@@ -321,7 +324,7 @@
                dec_3max_errintr();
        }
 
-       return(MIPS_SR_INT_IE | (statusReg & ~causeReg & MIPS_HARD_INT_MASK));
+       return (MIPS_SR_INT_IE | (status & ~cause & MIPS_HARD_INT_MASK));
 }
 
 
diff -r b3b5b867460d -r 6a3fd1942d91 sys/arch/pmax/pmax/dec_3maxplus.c
--- a/sys/arch/pmax/pmax/dec_3maxplus.c Wed May 26 02:01:49 1999 +0000
+++ b/sys/arch/pmax/pmax/dec_3maxplus.c Wed May 26 04:23:58 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dec_3maxplus.c,v 1.19 1999/05/25 07:37:08 nisimura Exp $       */
+/*     $NetBSD: dec_3maxplus.c,v 1.20 1999/05/26 04:23:59 nisimura Exp $       */
 
 /*
  * Copyright (c) 1998 Jonathan Stone.  All rights reserved.
@@ -73,7 +73,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: dec_3maxplus.c,v 1.19 1999/05/25 07:37:08 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_3maxplus.c,v 1.20 1999/05/26 04:23:59 nisimura Exp $");
 
 #include <sys/types.h>
 #include <sys/systm.h>
@@ -97,7 +97,6 @@
 #include <pmax/pmax/clockreg.h>
 #include <pmax/pmax/turbochannel.h>
 #include <pmax/pmax/pmaxtype.h>
-#include <pmax/pmax/machdep.h>         /* XXXjrs replace with vectors */
 
 #include <pmax/pmax/kn03.h>
 #include <pmax/pmax/memc.h>
@@ -117,15 +116,21 @@
 static void    dec_3maxplus_errintr __P ((void));
 
 
-void kn03_wbflush __P((void));
-unsigned kn03_clkread __P((void));
-extern unsigned (*clkread) __P((void));
-
 /*
  * Local declarations
  */
 u_long kn03_tc3_imask;
 
+static unsigned latched_cycle_cnt;
+
+void kn03_wbflush __P((void));
+unsigned kn03_clkread __P((void));
+extern unsigned (*clkread) __P((void));
+extern void prom_haltbutton __P((void));
+
+extern volatile struct chiptime *mcclock_addr; /* XXX */
+extern char cpu_model[];
+
 
 /*
  * Fill in platform struct.
@@ -327,7 +332,7 @@
        unsigned cause;
 {
        static int user_warned = 0;
-       u_int32_t old_buscycle;
+       unsigned old_buscycle;
 



Home | Main Index | Thread Index | Old Index