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 to NetBSD-current (DeskStation and Algor ...
details: https://anonhg.NetBSD.org/src/rev/4c141cdfe5c6
branches: trunk
changeset: 481133:4c141cdfe5c6
user: soda <soda%NetBSD.org@localhost>
date: Sun Jan 23 21:01:48 2000 +0000
description:
merge to NetBSD-current (DeskStation and Algor support is currently broken)
diffstat:
sys/arch/arc/Makefile | 29 +-
sys/arch/arc/TODO | 60 +-
sys/arch/arc/algor/algor.h | 1 +
sys/arch/arc/algor/algorbus.c | 25 +-
sys/arch/arc/arc/arc_trap.c | 89 +-
sys/arch/arc/arc/arcbios.c | 301 ++++---
sys/arch/arc/arc/arcbios.h | 18 +-
sys/arch/arc/arc/arctype.h | 43 +-
sys/arch/arc/arc/autoconf.c | 76 +-
sys/arch/arc/arc/clock.c | 111 ++-
sys/arch/arc/arc/clock_mc.c | 160 +++-
sys/arch/arc/arc/clockvar.h | 3 +-
sys/arch/arc/arc/conf.c | 103 +-
sys/arch/arc/arc/cpu.c | 72 +-
sys/arch/arc/arc/disksubr.c | 625 +++++++++++-----
sys/arch/arc/arc/locore_machdep.S | 403 ++++++++++-
sys/arch/arc/arc/machdep.c | 1032 ++++++++++++++++++----------
sys/arch/arc/arc/mainbus.c | 46 +-
sys/arch/arc/arc/minidebug.c | 324 ++------
sys/arch/arc/conf/ARCTIC | 176 +++-
sys/arch/arc/conf/GENERIC | 183 ++++-
sys/arch/arc/conf/M403 | 147 ++++
sys/arch/arc/conf/Makefile.arc | 72 +-
sys/arch/arc/conf/P4032 | 91 +-
sys/arch/arc/conf/PICA | 105 ++-
sys/arch/arc/conf/RAMDISK | 147 ++-
sys/arch/arc/conf/files.arc | 191 +++-
sys/arch/arc/conf/std.arc | 15 +-
sys/arch/arc/dev/asc.c | 194 +++--
sys/arch/arc/dev/ascreg.h | 24 +-
sys/arch/arc/dev/com_lbus.c | 979 +--------------------------
sys/arch/arc/dev/dma.c | 97 +-
sys/arch/arc/dev/dma.h | 116 +-
sys/arch/arc/dev/fd.c | 72 +-
sys/arch/arc/dev/fdreg.h | 3 +-
sys/arch/arc/dev/if_sn.c | 266 +++----
sys/arch/arc/dev/if_snreg.h | 3 +-
sys/arch/arc/dev/lpt_lbus.c | 419 +----------
sys/arch/arc/dev/pccons.c | 1175 +++++++++++++++++---------------
sys/arch/arc/dev/rd_root.c | 2 +-
sys/arch/arc/dev/scsi.h | 11 +-
sys/arch/arc/dti/btl.c | 196 ++--
sys/arch/arc/dti/btlreg.h | 4 +-
sys/arch/arc/dti/desktech.h | 1 +
sys/arch/arc/include/Makefile | 6 +-
sys/arch/arc/include/ansi.h | 4 +-
sys/arch/arc/include/aout_machdep.h | 2 +-
sys/arch/arc/include/asm.h | 2 +-
sys/arch/arc/include/autoconf.h | 16 +-
sys/arch/arc/include/bsd-aout.h | 2 +-
sys/arch/arc/include/bswap.h | 2 +-
sys/arch/arc/include/bus.h | 198 ++++-
sys/arch/arc/include/cdefs.h | 4 +-
sys/arch/arc/include/cpu.h | 23 +-
sys/arch/arc/include/cpuregs.h | 4 +
sys/arch/arc/include/disklabel.h | 46 +-
sys/arch/arc/include/display.h | 4 +-
sys/arch/arc/include/ecoff_machdep.h | 3 +-
sys/arch/arc/include/elf_machdep.h | 2 +-
sys/arch/arc/include/endian.h | 3 +-
sys/arch/arc/include/float.h | 4 +-
sys/arch/arc/include/ieeefp.h | 8 +-
sys/arch/arc/include/intr.h | 207 ++---
sys/arch/arc/include/isa_machdep.h | 86 ++
sys/arch/arc/include/isapnp_machdep.h | 47 +
sys/arch/arc/include/kbdreg.h | 41 +-
sys/arch/arc/include/kcore.h | 2 +-
sys/arch/arc/include/kdbparam.h | 4 +-
sys/arch/arc/include/limits.h | 4 +-
sys/arch/arc/include/mips_opcode.h | 262 +-------
sys/arch/arc/include/mouse.h | 7 +-
sys/arch/arc/include/param.h | 106 +-
sys/arch/arc/include/pcb.h | 3 +-
sys/arch/arc/include/pccons.h | 30 +-
sys/arch/arc/include/pio.h | 1 +
sys/arch/arc/include/pmap.h | 9 +-
sys/arch/arc/include/proc.h | 4 +-
sys/arch/arc/include/profile.h | 3 +-
sys/arch/arc/include/psl.h | 2 +-
sys/arch/arc/include/pte.h | 3 +-
sys/arch/arc/include/ptrace.h | 5 +-
sys/arch/arc/include/reg.h | 4 +-
sys/arch/arc/include/regdef.h | 4 +-
sys/arch/arc/include/regnum.h | 4 +-
sys/arch/arc/include/reloc.h | 40 +-
sys/arch/arc/include/setjmp.h | 4 +-
sys/arch/arc/include/signal.h | 4 +-
sys/arch/arc/include/stdarg.h | 4 +-
sys/arch/arc/include/trap.h | 8 +-
sys/arch/arc/include/types.h | 4 +-
sys/arch/arc/include/varargs.h | 4 +-
sys/arch/arc/include/vmparam.h | 24 +-
sys/arch/arc/isa/isabus.c | 415 +++++++++++-
sys/arch/arc/isa/isadma.c | 72 +-
sys/arch/arc/isa/isadmareg.h | 3 +-
sys/arch/arc/isa/spkrreg.h | 3 +-
sys/arch/arc/isa/timerreg.h | 11 +-
sys/arch/arc/pci/pbcpcibus.c | 9 +-
sys/arch/arc/pci/pci_machdep.h | 1 +
sys/arch/arc/pci/pcibrvar.h | 1 +
sys/arch/arc/pci/v962pcbreg.h | 1 +
sys/arch/arc/pica/pica.h | 98 +-
sys/arch/arc/pica/picabus.c | 91 +-
sys/arch/arc/stand/libsa/Makefile | 2 +-
sys/arch/arc/stand/libsa/devopen.c | 2 +-
sys/arch/arc/stand/libsa/getenv.c | 2 +-
sys/arch/arc/stand/libsa/getputchar.c | 2 +-
107 files changed, 5620 insertions(+), 4566 deletions(-)
diffs (truncated from 15292 to 300 lines):
diff -r 19f3585f0dd5 -r 4c141cdfe5c6 sys/arch/arc/Makefile
--- a/sys/arch/arc/Makefile Sun Jan 23 20:59:11 2000 +0000
+++ b/sys/arch/arc/Makefile Sun Jan 23 21:01:48 2000 +0000
@@ -1,32 +1,35 @@
-# $NetBSD: Makefile,v 1.5 2000/01/23 20:07:59 soda Exp $
+# $NetBSD: Makefile,v 1.6 2000/01/23 21:01:48 soda Exp $
+# $OpenBSD: Makefile,v 1.5 1997/05/19 10:34:53 pefo Exp $
+# from: @(#)Makefile 8.1 (Berkeley) 6/16/93
-# Makefile for pica tags file and boot blocks
+# Makefile for arc tags file and boot blocks
# Find where mips source files are for inclusion in tags
.include <../mips/Makefile.inc>
-TPICA= ../pica/tags
-SPICA= ../pica/pica/*.[ch] ../pica/include/*.[ch] \
- ../pica/dev/*.[ch] ../pica/ultrix/*.[ch]
-APICA= ../pica/pica/*.s
+TARC= ../arc/tags
+SARC= ../arc/algor/*.[ch] ../arc/arc/*.[ch] ../arc/dev/*.[ch] \
+ ../arc/dti/*.[ch] ../arc/include/*.h ../arc/isa/*.[ch] \
+ ../arc/pci/*.[ch] ../arc/pica/*.[ch]
+AARC= ../arc/arc/*.S
# Directories in which to place tags links
-DPICA= dev dist include pica
+DARC= algor arc dev dti include isa pci pica
.include "../../kern/Make.tags.inc"
tags:
- -ctags -wdtf ${TPICA} ${SPICA} ${SMIPS} ${COMM}
- egrep "^LEAF(.*)|^[AN]LEAF(.*)|^NON_LEAF(.*)" ${APICA} ${AMIPS} | \
+ -ctags -wdtf ${TARC} ${SARC} ${SMIPS} ${COMM}
+ egrep "^LEAF(.*)|^[AN]LEAF(.*)|^NON_LEAF(.*)" ${AARC} ${AMIPS} | \
sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
- >> ${TPICA}
- sort -o ${TPICA} ${TPICA}
+ >> ${TARC}
+ sort -o ${TARC} ${TARC}
links:
- -for i in ${DPICA}; do \
+ -for i in ${DARC}; do \
cd $$i && rm -f tags; ln -s ../tags tags; done
-SUBDIR= include
+SUBDIR= include stand
.include <bsd.subdir.mk>
diff -r 19f3585f0dd5 -r 4c141cdfe5c6 sys/arch/arc/TODO
--- a/sys/arch/arc/TODO Sun Jan 23 20:59:11 2000 +0000
+++ b/sys/arch/arc/TODO Sun Jan 23 21:01:48 2000 +0000
@@ -1,37 +1,59 @@
-$NetBSD: TODO,v 1.3 2000/01/23 20:08:00 soda Exp $
+$NetBSD: TODO,v 1.4 2000/01/23 21:01:48 soda Exp $
To do list (not in any particular order).
- o Improve pmap_zero_page and pmap_copy_page. Speed and flushing.
-
o Move the RO and WIRED attribute from the pte to the pv table.
This saves four instructions in the tlb miss handler.
-InWork: Have a test version. The system hangs after a while. Not solved yet.
- Also, is it worth the effort to remove 4 instr. in TLB-miss handler?
-
- o Update MAKEDEV to create all devices correctly.
o Boot. Standalone boot program instead of booting the kernel directly?
- o Create boot package for distribution.
-
o sigsetjmp/siglongjmp missing....
o Add more videomodes to pccons driver. 50kHz and 64kHz monitors?
-InWork: This seems to be hard. Need more info on the chip.
+ This seems to be hard. Need more info on the chip.
o Find out why bitmap load to S3-928 flashes screen.
-Know why (enable linear mode). Need S3 info.
-
- o Would be nice to have Motif...
-
- o ELF shared libraries......
-
- o GDB. The current one does not work correctly with current toolchain.
-
- o ISA driver. ISA dma, interrupt etc.
+ Know why (enable linear mode). Need S3 info.
o Can we have 32 double registers?
+ o 64bit kernel/userland
+
+ o source code structure is quite obsolete,
+ general clean up is needed as nisimura-san suggested.
+ especially:
+
+ - introduce struct platform and remove ugly ``switch (cputype)''
+ in many places.
+
+ - implement and use bus_dma
+
+ - 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 fix implementation of DELAY(), clean up clock implementation
+
+ o if_sn.c ether address handling clean up
+
+ o use MI driver
+
+ - use MI ncr53c9x driver instead of home grown asc
+
+ - use MI bha driver instead of home grown btl
+
+ - make sonic driver MI, and share it with mac68k, newsmips/apbus
+
+ - make fd driver MI, and share it with i386
+ (contact christos about MI fd driver)
+
+ - make pccons MI, and share it with i386,
+ or simply eliminate pccons
Lots of other things.....
diff -r 19f3585f0dd5 -r 4c141cdfe5c6 sys/arch/arc/algor/algor.h
--- a/sys/arch/arc/algor/algor.h Sun Jan 23 20:59:11 2000 +0000
+++ b/sys/arch/arc/algor/algor.h Sun Jan 23 21:01:48 2000 +0000
@@ -1,3 +1,4 @@
+/* $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 $ */
/*
diff -r 19f3585f0dd5 -r 4c141cdfe5c6 sys/arch/arc/algor/algorbus.c
--- a/sys/arch/arc/algor/algorbus.c Sun Jan 23 20:59:11 2000 +0000
+++ b/sys/arch/arc/algor/algorbus.c Sun Jan 23 21:01:48 2000 +0000
@@ -1,3 +1,4 @@
+/* $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 $ */
/*
@@ -38,7 +39,6 @@
#include <sys/user.h>
#include <sys/device.h>
-#include <machine/pte.h>
#include <machine/cpu.h>
#include <machine/pio.h>
#include <machine/intr.h>
@@ -56,7 +56,7 @@
};
/* Definition of the driver for autoconfig. */
-int algormatch(struct device *, void *, void *);
+int algormatch(struct device *, struct cfdata *, void *);
void algorattach(struct device *, struct device *, void *);
int algorprint(void *, const char *);
@@ -148,12 +148,11 @@
int nalgor_cpu_devs = sizeof algor_cpu_devs / sizeof algor_cpu_devs[0];
int
-algormatch(parent, cfdata, aux)
+algormatch(parent, match, aux)
struct device *parent;
- void *cfdata;
+ struct cfdata *match;
void *aux;
{
- struct cfdata *cf = cfdata;
struct confargs *ca = aux;
/* Make sure that we're looking for a ALGORITHMICS BUS */
@@ -161,7 +160,7 @@
return (0);
/* Make sure that unit exists. */
- if (cf->cf_unit != 0 ||
+ if (match->cf_unit != 0 ||
cputype > nalgor_cpu_devs || algor_cpu_devs[cputype] == NULL)
return (0);
@@ -184,8 +183,8 @@
sc->sc_devs = algor_cpu_devs[cputype];
/* set up interrupt handlers */
- set_intr(INT_MASK_1, algor_iointr, 2);
- set_intr(INT_MASK_4, algor_errintr, 0);
+ set_intr(MIPS_INT_MASK_1, algor_iointr, 2);
+ set_intr(MIPS_INT_MASK_4, algor_errintr, 0);
sc->sc_bus.ab_dv = (struct device *)sc;
sc->sc_bus.ab_type = BUS_ALGOR;
@@ -256,10 +255,10 @@
outb(P4032_IXR2, p4032_ixr >> 16);
if(slot == 0) { /* Slot 0 is special, clock */
- set_intr(INT_MASK_0 << ipl, algor_clkintr, ipl + 1);
+ set_intr(MIPS_INT_MASK_0 << ipl, algor_clkintr, ipl + 1);
}
else {
- set_intr(INT_MASK_0 << ipl, algor_iointr, ipl + 1);
+ set_intr(MIPS_INT_MASK_0 << ipl, algor_iointr, ipl + 1);
}
p4032_imask |= dev->ps_mask;
@@ -308,7 +307,7 @@
outb(P4032_IXR1, p4032_ixr >> 8);
outb(P4032_IXR2, p4032_ixr >> 16);
- set_intr(INT_MASK_0 << level, algor_iointr, level + 1);
+ set_intr(MIPS_INT_MASK_0 << level, algor_iointr, level + 1);
p4032_imask |= imask;
outb(P4032_IMR, p4032_imask);
@@ -403,9 +402,9 @@
hardclock(cf);
/* Re-enable clock interrupts */
- splx(INT_MASK_0 << IPL_CLOCK | SR_INT_ENAB);
+ splx(MIPS_INT_MASK_0 << IPL_CLOCK | MIPS_SR_INT_IE);
- return(~(INT_MASK_0 << IPL_CLOCK)); /* Keep clock interrupts enabled */
+ return(~(MIPS_INT_MASK_0 << IPL_CLOCK)); /* Keep clock interrupts enabled */
}
/*
diff -r 19f3585f0dd5 -r 4c141cdfe5c6 sys/arch/arc/arc/arc_trap.c
--- a/sys/arch/arc/arc/arc_trap.c Sun Jan 23 20:59:11 2000 +0000
+++ b/sys/arch/arc/arc/arc_trap.c Sun Jan 23 21:01:48 2000 +0000
@@ -1,4 +1,5 @@
-/* $NetBSD: arc_trap.c,v 1.7 2000/01/23 20:08:51 soda Exp $ */
+/* $NetBSD: arc_trap.c,v 1.8 2000/01/23 21:01:49 soda Exp $ */
+/* $OpenBSD: trap.c,v 1.5 1996/09/02 11:33:24 pefo Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -42,86 +43,94 @@
* @(#)trap.c 8.5 (Berkeley) 1/11/94
*/
-#include "opt_ktrace.h"
-
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/device.h>
#include <sys/proc.h>
#include <sys/kernel.h>
#include <sys/signalvar.h>
#include <sys/syscall.h>
#include <sys/user.h>
#include <sys/buf.h>
-#include <sys/device.h>
#ifdef KTRACE
#include <sys/ktrace.h>
#endif
#include <net/netisr.h>
+#include <vm/vm.h>
+#include <vm/vm_kern.h>
+#include <vm/vm_page.h>
+
#include <machine/trap.h>
#include <machine/psl.h>
#include <machine/reg.h>
#include <machine/cpu.h>
#include <machine/pio.h>
#include <machine/autoconf.h>
-#include <machine/pte.h>
-#include <machine/pmap.h>
#include <machine/mips_opcode.h>
-#include <vm/vm.h>
-#include <vm/vm_kern.h>
-#include <vm/vm_page.h>
-
-#include <pica/pica/pica.h>
+#include <arc/pica/pica.h>
+#include <arc/arc/arctype.h>
+extern u_int cputype;
#include <sys/cdefs.h>
#include <sys/syslog.h>
-struct proc *machFPCurProcPtr; /* pointer to last proc to use FP */
-
struct {
int int_mask;
- int (*int_hand)();
+ int (*int_hand)(u_int, struct clockframe *);
} cpu_int_tab[8];
Home |
Main Index |
Thread Index |
Old Index