Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arc merge changes between OpenBSD-2.1 and OpenBSD-2.6



details:   https://anonhg.NetBSD.org/src/rev/e82cf0796a58
branches:  trunk
changeset: 482807:e82cf0796a58
user:      soda <soda%NetBSD.org@localhost>
date:      Tue Feb 22 11:25:55 2000 +0000

description:
merge changes between OpenBSD-2.1 and OpenBSD-2.6

diffstat:

 sys/arch/arc/TODO                 |   39 ++++-
 sys/arch/arc/algor/algor.h        |   45 +++++-
 sys/arch/arc/algor/algorbus.c     |  143 +++++++++++++------
 sys/arch/arc/arc/arc_trap.c       |   17 +-
 sys/arch/arc/arc/arcbios.c        |   72 +++------
 sys/arch/arc/arc/arcbios.h        |   29 +++-
 sys/arch/arc/arc/arctype.h        |   38 ++++-
 sys/arch/arc/arc/clock.c          |    7 +-
 sys/arch/arc/arc/clock_mc.c       |   60 +++++--
 sys/arch/arc/arc/clockvar.h       |    4 +-
 sys/arch/arc/arc/conf.c           |  129 ++++++++---------
 sys/arch/arc/arc/machdep.c        |   77 ++++++----
 sys/arch/arc/arc/mainbus.c        |   46 +++---
 sys/arch/arc/arc/minidebug.c      |   26 +++-
 sys/arch/arc/conf/ARCTIC          |  264 ++++++++++++++++++++++---------------
 sys/arch/arc/conf/GENERIC         |  267 +++++++++++++++++++++++--------------
 sys/arch/arc/conf/IMP3            |   88 ------------
 sys/arch/arc/conf/M403            |  188 +++++++++++++++++---------
 sys/arch/arc/conf/Makefile.arc    |    7 +-
 sys/arch/arc/conf/NFSROOT         |  126 -----------------
 sys/arch/arc/conf/P4032           |  179 +++++++++++++++---------
 sys/arch/arc/conf/PICA            |  184 ++++++++++++++++---------
 sys/arch/arc/conf/RAMDISK         |  268 +++++++++++++++++++++++++------------
 sys/arch/arc/conf/files.arc       |   20 +-
 sys/arch/arc/dev/asc.c            |   28 +--
 sys/arch/arc/dev/com_lbus.c       |    5 +-
 sys/arch/arc/dev/dma.c            |   14 +-
 sys/arch/arc/dev/dma.h            |   28 +-
 sys/arch/arc/dev/fd.c             |    9 +-
 sys/arch/arc/dev/if_sn.c          |   58 +++++--
 sys/arch/arc/dev/lpt_lbus.c       |    1 +
 sys/arch/arc/dev/pccons.c         |   45 ++++-
 sys/arch/arc/dti/btl.c            |    4 +-
 sys/arch/arc/dti/btlreg.h         |    2 +
 sys/arch/arc/dti/desktech.h       |   17 ++-
 sys/arch/arc/include/ansi.h       |    4 +-
 sys/arch/arc/include/bus.h        |   62 +++++++-
 sys/arch/arc/include/cdefs.h      |    4 +-
 sys/arch/arc/include/cpu.h        |    4 +-
 sys/arch/arc/include/db_machdep.h |    4 +-
 sys/arch/arc/include/disklabel.h  |    4 +-
 sys/arch/arc/include/joystick.h   |    3 +-
 sys/arch/arc/include/spinlock.h   |    3 -
 sys/arch/arc/isa/isabus.c         |    7 +-
 sys/arch/arc/isa/isadma.c         |    7 +-
 sys/arch/arc/isa/isapnp_machdep.c |    3 +-
 sys/arch/arc/isa/joy.c            |    3 +-
 sys/arch/arc/pci/pbcpcibus.c      |  206 +++++++++++++++++++++++-----
 sys/arch/arc/pci/pci_machdep.h    |   11 +-
 sys/arch/arc/pci/v962pcbreg.h     |   29 +++-
 sys/arch/arc/pica/picabus.c       |    8 +-
 sys/arch/arc/stand/mbr/Makefile   |    8 +-
 52 files changed, 1735 insertions(+), 1169 deletions(-)

diffs (truncated from 5053 to 300 lines):

diff -r b3827b5c5794 -r e82cf0796a58 sys/arch/arc/TODO
--- a/sys/arch/arc/TODO Tue Feb 22 11:25:06 2000 +0000
+++ b/sys/arch/arc/TODO Tue Feb 22 11:25:55 2000 +0000
@@ -1,4 +1,4 @@
-$NetBSD: TODO,v 1.4 2000/01/23 21:01:48 soda Exp $
+$NetBSD: TODO,v 1.5 2000/02/22 11:25:55 soda Exp $
 
 To do list (not in any particular order).
 
@@ -7,18 +7,19 @@
 
     o   Boot. Standalone boot program instead of booting the kernel directly?
 
-    o   sigsetjmp/siglongjmp missing....
-
-    o   Add more videomodes to pccons driver. 50kHz and 64kHz monitors?
-       This seems to be hard. Need more info on the chip.
-
-    o   Find out why bitmap load to S3-928 flashes screen.
+    o   Find out why bitmap load to S3-928 flashes screen. (X server)
        Know why (enable linear mode). Need S3 info.
 
     o   Can we have 32 double registers?
 
     o  64bit kernel/userland
 
+    o  repair DeskStation and Algor support
+
+       -   64bit device physical address space for Tyne (see OpenBSD pmap.c)
+
+       -   requires bus_dma
+
     o  source code structure is quite obsolete,
        general clean up is needed as nisimura-san suggested.
        especially:
@@ -30,18 +31,27 @@
 
        -   clean up bus_space implementation, remove inb/outb
 
-       -   eliminate OpenBSD compat #define symbols
-
     o  fix kernel start address
 
     o  merge new wscons
 
     o  parse ARC BIOS configuration information and use it
 
+    o  omit __BROKEN_CONFIG_UNIT_USAGE
+
+    o  omit __SWAP_BROKEN in <mips/types.h>
+
     o  fix implementation of DELAY(), clean up clock implementation
 
+    o  asc.c scsi clock/NCR53CF94 handling clean up
+
     o  if_sn.c ether address handling clean up
 
+    o  com_lbus.c clock handling clean up
+
+    o  implement NCR 53c700(?) driver for NEC RISCserver 2200
+       based on amiga siop driver?
+
     o  use MI driver
 
        -   use MI ncr53c9x driver instead of home grown asc
@@ -56,4 +66,15 @@
        -   make pccons MI, and share it with i386,
            or simply eliminate pccons
 
+    o easy part
+
+       - ARC boot device name -> NetBSD root device conversion
+
+       - and missing MI devices
+               lkm, tun, vcoda, raidframe, ...
+
+       - way to specify serial console
+
+    o resolve "XXX"
+
 Lots of other things.....
diff -r b3827b5c5794 -r e82cf0796a58 sys/arch/arc/algor/algor.h
--- a/sys/arch/arc/algor/algor.h        Tue Feb 22 11:25:06 2000 +0000
+++ b/sys/arch/arc/algor/algor.h        Tue Feb 22 11:25:55 2000 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: algor.h,v 1.2 2000/01/23 21:01:49 soda Exp $   */
-/*     $OpenBSD: algor.h,v 1.3 1997/04/19 17:19:36 pefo Exp $ */
+/*     $NetBSD: algor.h,v 1.3 2000/02/22 11:25:56 soda Exp $   */
+/*     $OpenBSD: algor.h,v 1.4 1998/03/16 09:38:23 pefo Exp $ */
 
 /*
  * Copyright (c) 1996 Per Fogelstrom
@@ -37,12 +37,15 @@
 #define        _ALGOR_H_ 1
 
 /*
- * P-4032's Physical address space
+ * Physical address space
  */
 
 #define P4032_PHYS_MIN         0x00000000      /* 256 Meg */
 #define P4032_PHYS_MAX         0x0fffffff
 
+#define P5064_PHYS_MIN         0x00000000      /* 256 Meg */
+#define P5064_PHYS_MAX         0x0fffffff
+
 /*
  * Memory map
  */
@@ -50,8 +53,11 @@
 #define P4032_PHYS_MEMORY_START        0x00000000
 #define P4032_PHYS_MEMORY_END  0x0fffffff      /* 256 Meg in 2 slots */
 
+#define P5064_PHYS_MEMORY_START        0x00000000
+#define P5064_PHYS_MEMORY_END  0x0fffffff      /* 256 Meg in 2 slots */
+
 /*
- * I/O map
+ * I/O map P-4032
  */
 
 #define        P4032_V96x              0xbef00000      /* PCI Bus bridge ctrlregs */
@@ -76,6 +82,37 @@
 #define        P4032_IXR1              0xbff90010      /* Int crossbar register 0 */
 #define        P4032_IXR2              0xbff90014      /* Int crossbar register 0 */
 
+
+/*
+ * I/O map P-5064
+ */
+
+#define        P5064_V96x              P4032_V96x      /* PCI Bus bridge ctrlregs */
+
+#define        P5064_CLOCK             0xbd000070      /* RTC clock ptr reg, data +1 */
+#define        P5064_KEYB              0xbd000064      /* PC Keyboard controller */
+#define        P5064_LED               P4032_LED       /* 4 Char LED display */
+#define        P5064_LCD               P4032_LCD       /* LCD option display */
+#define        P5064_GPIO              P4032_GPIO      /* General purpose I/O */
+#define        P5064_GPIO_IACK         P4032_GPIO_IACK /* General purpose I/O Iack */
+#define        P5064_FPY               0xbd0003f0      /* Floppy controller */
+#define        P5064_COM1              0xbd0003f8      /* Serial port com1 */
+#define        P5064_COM2              0xbd0002f8      /* Serial port com2 */
+#define        P5064_CENTR             0xbd000378      /* Centronics paralell port */
+#define        P5064_IMR               0xbff90000      /* Int mask reg (wr) */
+#define        P5064_IRR               0xbff90000      /* Int request reg (rd) */
+#define        P5064_EIRR              0xbff90004      /* Error int request reg (rd) */
+#define        P5064_ICR               0xbff90004      /* Int clear register (wr) */
+#define        P5064_PCIIMR            0xbff90008      /* PCI Int mask reg (wr) */
+#define        P5064_PCIIRR            0xbff90008      /* PCI Int req reg (rd) */
+#define        P5064_IDEIMR            0xbff9000c      /* IDE Int req reg (rd) */
+#define        P5064_IDEIRR            0xbff9000c      /* IDE Int req reg (rd) */
+#define        P5064_IXR0              0xbff90010      /* Int crossbar register 0 */
+#define        P5064_IXR1              0xbff90014      /* Int crossbar register 1 */
+#define        P5064_IXR2              0xbff90018      /* Int crossbar register 2 */
+#define        P5064_IXR3              0xbff9001c      /* Int crossbar register 3 */
+#define        P5064_IXR4              0xbff90020      /* Int crossbar register 4 */
+  
 /*
  * Interrupt controller interrupt masks
  */
diff -r b3827b5c5794 -r e82cf0796a58 sys/arch/arc/algor/algorbus.c
--- a/sys/arch/arc/algor/algorbus.c     Tue Feb 22 11:25:06 2000 +0000
+++ b/sys/arch/arc/algor/algorbus.c     Tue Feb 22 11:25:55 2000 +0000
@@ -1,8 +1,8 @@
-/*     $NetBSD: algorbus.c,v 1.2 2000/01/23 21:01:49 soda Exp $        */
-/*     $OpenBSD: algorbus.c,v 1.3 1997/04/19 17:19:37 pefo Exp $ */
+/*     $NetBSD: algorbus.c,v 1.3 2000/02/22 11:25:56 soda Exp $        */
+/*     $OpenBSD: algorbus.c,v 1.6 1999/01/11 05:11:09 millert Exp $ */
 
 /*
- * Copyright (c) 1996 Per Fogelstrom
+ * Copyright (c) 1996, 1997, 1998 Per Fogelstrom, Opsycon AB
  * 
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -15,7 +15,7 @@
  * 3. All advertising materials mentioning features or use of this software
  *    must display the following acknowledgement:
  *     This product includes software developed under OpenBSD by
- *     Per Fogelstrom.
+ *     Per Fogelstrom, Opsycon AB.
  * 4. The name of the author may not be used to endorse or promote products
  *    derived from this software without specific prior written permission.
  *
@@ -75,10 +75,9 @@
 int    algor_clkintr __P((unsigned, struct clockframe *));
 int    algor_errintr __P((unsigned, struct clockframe *));
 
-extern int cputype;
-
 int p4032_imask = 0;
-int p4032_ixr = 0;
+int p4032_ixr0 = 0;    /* Routing for local and panic ints. */
+int p4032_ixr1 = 0;    /* Routing for pci and ide ints. */
 
 /*
  *  Interrupt dispatch table.
@@ -100,14 +99,18 @@
        {0, algor_intrnull, (void *)NULL, 0 },  /* 13 */
        {0, algor_intrnull, (void *)NULL, 0 },  /* 14 */
        {0, algor_intrnull, (void *)NULL, 0 },  /* 15 */
+       {0, algor_intrnull, (void *)NULL, 0 },  /* 16 */
+       {0, algor_intrnull, (void *)NULL, 0 },  /* 17 */
+       {0, algor_intrnull, (void *)NULL, 0 },  /* 18 */
+       {0, algor_intrnull, (void *)NULL, 0 },  /* 19 */
 };
 #define NUM_INT_SLOTS (sizeof(int_table) / sizeof(struct algor_int_desc))
 
 struct algor_dev {
        struct confargs ps_ca;
-       u_int8_t        ps_mask;
-       u_int8_t        ps_ipl;
-       u_int16_t       ps_route;
+       u_int8_t        ps_mask;        /* Interrupt mask register value */
+       u_int8_t        ps_ipl;         /* IPL to route int to */
+       u_int16_t       ps_route;       /* int routing mask bits */
        intr_handler_t  ps_handler;
        void            *ps_base;
 };
@@ -123,27 +126,34 @@
     {{ NULL,            -1, NULL, },
        0,              0x0000, NULL,           (void *)NULL, },
 };
-#define NUM_ALGOR_DEVS (sizeof(algor_4032_cpu) / sizeof(struct algor_dev))
+
+struct algor_dev algor_5064_cpu[] = {
+    {{ "dallas_rtc",    0, 0, },
+       P4032_IM_RTC,  IPL_CLOCK, 0xc000, algor_intrnull, (void *)P5064_CLOCK, },
+    {{ "com",           1, 0, },
+       P4032_IM_COM1, IPL_TTY,   0x00c0, algor_intrnull, (void *)P5064_COM1,  },
+    {{ "com",           2, 0, },
+       P4032_IM_COM2, IPL_TTY,   0x0300, algor_intrnull, (void *)P5064_COM2,  },
+    {{ "lpt",           3, 0, },
+       P4032_IM_CENTR,IPL_TTY,   0x0c00, algor_intrnull, (void *)P5064_CENTR, },
+    {{ NULL,            -1, NULL, },
+       0,              0x0000, NULL,           (void *)NULL, },
+};
 
 /* IPL routing values */
 static int ipxrtab[] = {
-       0x000000,       /* IPL_BIO */
-       0x555555,       /* IPL_NET */
-       0xaaaaaa,       /* IPL_TTY */
-       0xffffff,       /* IPL_CLOCK */
+       0x00000000,     /* IPL_BIO */
+       0x55555555,     /* IPL_NET */
+       0xaaaaaaaa,     /* IPL_TTY */
+       0xffffffff,     /* IPL_CLOCK */
 };
        
 
 
 struct algor_dev *algor_cpu_devs[] = {
-       NULL,                   /* Unused */
-       NULL,                   /* Unused */
-       NULL,                   /* Unused */
-       NULL,                   /* Unused */
-       NULL,                   /* Unused */
-       NULL,                   /* Unused */
-       algor_4032_cpu,         /* 6 = ALGORITHMICS R4032 Board */
-       NULL,
+       NULL,                   /* Unused */
+       algor_4032_cpu,         /* 0x21 = ALGORITHMICS P-4032 board */
+       algor_5064_cpu,         /* 0x22 = ALGORITHMICS P-5064 board */
 };
 int nalgor_cpu_devs = sizeof algor_cpu_devs / sizeof algor_cpu_devs[0];
 
@@ -160,8 +170,9 @@
                 return (0);
 
         /* Make sure that unit exists. */
-       if (match->cf_unit != 0 ||
-           cputype > nalgor_cpu_devs || algor_cpu_devs[cputype] == NULL)
+       if (match->cf_unit != 0
+           || (system_type - ALGOR_CLASS) > nalgor_cpu_devs
+           || algor_cpu_devs[system_type - ALGOR_CLASS] == NULL)
                return (0);
 
        return (1);
@@ -180,10 +191,10 @@
        printf("\n");
 
        /* keep our CPU device description handy */
-       sc->sc_devs = algor_cpu_devs[cputype];
+       sc->sc_devs = algor_cpu_devs[system_type - ALGOR_CLASS];
 
        /* set up interrupt handlers */
-       set_intr(MIPS_INT_MASK_1, algor_iointr, 2);
+       set_intr(MIPS_INT_MASK_1, algor_iointr, 3);
        set_intr(MIPS_INT_MASK_4, algor_errintr, 0);
 
        sc->sc_bus.ab_dv = (struct device *)sc;
@@ -249,16 +260,23 @@
                int_table[slot].int_hand = handler;
                int_table[slot].param = arg;
        }
-       p4032_ixr |= ipxrtab[ipl] & dev->ps_route;
-       outb(P4032_IXR0, p4032_ixr);
-       outb(P4032_IXR1, p4032_ixr >> 8);
-       outb(P4032_IXR2, p4032_ixr >> 16);



Home | Main Index | Thread Index | Old Index