summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorPer Fogelstrom <pefo@cvs.openbsd.org>1996-05-02 07:59:44 +0000
committerPer Fogelstrom <pefo@cvs.openbsd.org>1996-05-02 07:59:44 +0000
commit9f342a263a034240260660e71be9f97f04d140a5 (patch)
treec46311670c407c3ab07d401f7b5d827d6482614b /sys/arch
parentb5041247fa98bb177ddcc3858525941d29794c1f (diff)
Updated for new config etc.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/pica/TODO10
-rw-r--r--sys/arch/pica/conf/GENERIC10
-rw-r--r--sys/arch/pica/conf/Makefile.pica47
-rw-r--r--sys/arch/pica/conf/files.pica92
-rw-r--r--sys/arch/pica/dev/dma.c16
-rw-r--r--sys/arch/pica/dev/dma.h4
-rw-r--r--sys/arch/pica/include/param.h4
-rw-r--r--sys/arch/pica/include/pte.h8
-rw-r--r--sys/arch/pica/pica/clock.c4
-rw-r--r--sys/arch/pica/pica/conf.c12
-rw-r--r--sys/arch/pica/pica/pmap.c4
11 files changed, 107 insertions, 104 deletions
diff --git a/sys/arch/pica/TODO b/sys/arch/pica/TODO
index 826c198f5a0..e6d2936665c 100644
--- a/sys/arch/pica/TODO
+++ b/sys/arch/pica/TODO
@@ -9,10 +9,6 @@ InWork: Have a test version. The system hangs after a while. Not solved yet.
o Update MAKEDEV to create all devices correctly.
- o Add dos disklabel functionality so disks can be shared with NT.
-InWork: mformat needs to be hacked to handle disk labels. Need to figure
- out what method to use (offseting?).
-
o Boot. Standalone boot program instead of booting the kernel directly?
o Create boot package for distribution.
@@ -22,8 +18,6 @@ InWork: mformat needs to be hacked to handle disk labels. Need to figure
o Add more videomodes to pccons driver. 50kHz and 64kHz monitors?
InWork: This seems to be hard. Need more info on the chip.
- o SONIC driver. Use the one from Theo as a start?
-
o Find out why bitmap load to S3-928 flashes screen.
Know why (enable linear mode). Need S3 info.
@@ -31,14 +25,10 @@ Know why (enable linear mode). Need S3 info.
o ELF shared libraries......
- o Recompile ghostscript to have X driver as well as Cannon BJ200.
-
o GDB. The current one does not work correctly with current toolchain.
o ISA driver. ISA dma, interrupt etc.
- o SONY cd-rom driver + sound driver. Uses ISA dma.
-
o Can we have 32 double registers?
diff --git a/sys/arch/pica/conf/GENERIC b/sys/arch/pica/conf/GENERIC
index df6b7810081..b7117683508 100644
--- a/sys/arch/pica/conf/GENERIC
+++ b/sys/arch/pica/conf/GENERIC
@@ -1,4 +1,8 @@
-include "std.pica"
+#
+# Generic configuration file for MIPS R4400 PICA system
+#
+
+machine pica
maxusers 8
@@ -36,6 +40,7 @@ options NFSCLIENT # Sun NFS-compatible filesystem (client)
options NFSSERVER # Sun NFS-compatible filesystem (server)
options KERNFS # kernel data-structure filesystem
options MSDOSFS # Ability to read write MS-Dos filsystem
+options CD9660 # ISO 9660 + Rock Ridge file system
options FDESC # user file descriptor filesystem
#options UMAPFS # uid/gid remapping filesystem
#options NULLFS # null layer filesystem
@@ -76,7 +81,8 @@ sd* at scsibus? target ? lun ?
st* at scsibus? target ? lun ?
cd* at scsibus? target ? lun ?
-pseudo-device sl 4 # serial-line IP ports
+pseudo-device sl 2 # serial-line IP ports
+pseudo-device ppp 2 # serial-line PPP ports
pseudo-device pty 64 # pseudo ptys
pseudo-device bpfilter 16 # packet filter ports
pseudo-device loop
diff --git a/sys/arch/pica/conf/Makefile.pica b/sys/arch/pica/conf/Makefile.pica
index f56ea3f13e6..3675b9f7fda 100644
--- a/sys/arch/pica/conf/Makefile.pica
+++ b/sys/arch/pica/conf/Makefile.pica
@@ -29,17 +29,13 @@ TOUCH= touch -f -c
S= ../../../..
PICA= ../..
-LD=ld.kern
-
-INCLUDES= -I. -I$S/arch -I$S -I$S/sys
-COPTS= ${INCLUDES} ${IDENT} -D_KERNEL -Dpica -D__NetBSD__ ${GP} \
- -mips2 -mcpu=r4000
-CPPOPTS=${INCLUDES} ${IDENT} -D_KERNEL -Dpica -D__NetBSD__
-.ifdef DEBUG
-CFLAGS= ${DEBUG} ${COPTS}
-.else
-CFLAGS= -O2 ${COPTS}
-.endif
+LD=ld.ok
+
+INCLUDES= -I. -I$S/arch -I$S
+CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -Dpica -D__NetBSD__ ${GP} \
+ -mips2 -mcpu=r4000
+CFLAGS= ${DEBUG} -O2 -Werror
+AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
### find out what to use for libkern
.include "$S/lib/libkern/Makefile.inc"
@@ -62,15 +58,13 @@ LIBCOMPAT= ${COMPATLIB_PROF}
# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
# is marked as config-dependent.
-NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $<
-NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
-
-DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $<
-DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
+NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
+NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
-PROFILE_C= ${CC} -p -c ${COPTS} $<
+DRIVER_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
+DRIVER_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
-NORMAL_S= ${AS} ${COPTS} $< -o $@
+NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@
%OBJS
@@ -82,6 +76,7 @@ NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@
# ${SYSTEM_LD_HEAD}
# ${SYSTEM_LD} swapxxx.o
# ${SYSTEM_LD_TAIL}
+
SYSTEM_OBJ= locore.o fp.o ${OBJS} param.o ioconf.o ${LIBKERN} \
${LIBCOMPAT}
#SYSTEM_DEP= Makefile symbols.sort ${SYSTEM_OBJ} ${LIBKERN}
@@ -127,11 +122,11 @@ symbols.sort: ${PICA}/pica/symbols.raw
locore.o: ${PICA}/pica/locore.S ${PICA}/include/machAsmDefs.h \
${PICA}/include/machConst.h ${PICA}/include/reg.h assym.h
- ${CC} -c ${COPTS} ${PARAM} -DLOCORE -mips3 ${PICA}/pica/locore.S
+ ${NORMAL_S} -mips3 ${PICA}/pica/locore.S
fp.o: ${PICA}/pica/fp.S ${PICA}/include/machAsmDefs.h \
${PICA}/include/machConst.h ${PICA}/include/reg.h assym.h
- ${CC} -c ${COPTS} ${PARAM} -DLOCORE ${PICA}/pica/fp.S
+ ${NORMAL_S} -mips3 ${PICA}/pica/fp.S
# the following is necessary because autoconf.o depends on #if GENERIC
autoconf.o: Makefile
@@ -149,7 +144,7 @@ assym.h: genassym
./genassym >assym.h
genassym: ${PICA}/pica/genassym.c
- ${CC} ${INCLUDES} ${IDENT} ${PARAM} -o genassym ${PICA}/pica/genassym.c
+ ${NORMAL_C_C}
depend: assym.h param.c
mkdep ${COPTS} ${CFILES} ioconf.c param.c
@@ -167,20 +162,18 @@ tags:
@echo "see $S/kern/Makefile for tags"
ioconf.o: ioconf.c
- ${CC} -c ${CFLAGS} ioconf.c
+ ${NORMAL_C}
param.c: $S/conf/param.c
rm -f param.c
cp $S/conf/param.c .
param.o: param.c Makefile
- ${CC} -c ${CFLAGS} ${PARAM} param.c
+ ${NORMAL_C_C}
-vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
+newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
sh $S/conf/newvers.sh
- ${CC} ${CFLAGS} -c vers.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
%RULES
-
-
diff --git a/sys/arch/pica/conf/files.pica b/sys/arch/pica/conf/files.pica
index 8162762ea00..f3522a83add 100644
--- a/sys/arch/pica/conf/files.pica
+++ b/sys/arch/pica/conf/files.pica
@@ -1,75 +1,99 @@
+# $OpenBSD: files.pica,v 1.3 1996/05/02 07:59:36 pefo Exp $
# $NetBSD: files.pica,v 1.16 1995/04/30 10:11:00 cgd Exp $
+#
+# maxpartitions must be first item in files.${ARCH}
+#
maxpartitions 8
+
maxusers 2 8 64
-device mainbus at root { } # no locators
+# Required files
+
+file arch/pica/isa/isa.c
+
+file arch/pica/pica/autoconf.c
+file arch/pica/pica/conf.c
+file arch/pica/pica/cpu_exec.c
+file arch/pica/pica/disksubr.c
+file arch/pica/dev/dma.c
+file arch/pica/pica/exec_elf.c
+file arch/pica/pica/machdep.c
+file arch/pica/pica/mainbus.c
+file arch/pica/pica/minidebug.c
+file arch/pica/pica/mem.c
+file arch/pica/pica/pmap.c
+file arch/pica/pica/process_machdep.c
+file arch/pica/pica/sys_machdep.c
+file arch/pica/pica/trap.c
+file arch/pica/pica/vm_machdep.c
+
+#
+# System bus types
+#
+
+device mainbus {}
+attach mainbus at root
# Our CPU configurator
-device cpu at mainbus # not optional
+device cpu
+attach cpu at mainbus # not optional
file arch/pica/pica/cpu.c cpu
#
# PICA bus autoconfiguration devices
#
-device pica at mainbus { } # { slot = -1, offset = -1 }
+device pica {}
+attach pica at mainbus # { slot = -1, offset = -1 }
file arch/pica/pica/pica.c pica needs-flag
# Real time clock, must have one..
-device clock at pica
+device clock
+attach clock at pica
file arch/pica/pica/clock.c clock
file arch/pica/pica/clock_mc.c clock
# Ethernet chip
-device sn at pica: ifnet, ether
+device sn
+attach sn at pica: ifnet, ether
file arch/pica/dev/if_sn.c sn needs-count
# Use machine independent SCSI driver routines
include "../../../scsi/files.scsi"
+major {sd = 0}
+major {cd = 3}
# Machine dependent SCSI interface driver
-device asc at pica: scsi
+device asc: scsi
+attach asc at pica
file arch/pica/dev/asc.c asc needs-count
# NS16450/16550 Serial line driver
-device com at pica
+device com
+attach com at pica
file arch/pica/dev/com.c com needs-count
# Paralell printer port driver
-device lpt at pica
+device lpt
+attach lpt at pica
file arch/pica/dev/lpt.c lpt needs-count
# Console driver on PC-style graphics
-device pc at pica
-device pms at pica
-file arch/pica/dev/pccons.c pc pms needs-count
+device pc: tty
+attach pc at pica
+device pms
+attach pms at pica
+file arch/pica/dev/pccons.c pms needs-count
# PS2 type mouse driver.
# Floppy disk controller
-device fdc at pica {drive = -1}
-device fd at fdc
-file arch/pica/dev/fd.c fdc needs-flag
+device fdc {drive = -1}
+attach fdc at pica
+device fd: disk
+attach fd at fdc
+file arch/pica/dev/fd.c fdc needs-flag
major {fd = 7}
-# Required files
-
-file arch/pica/isa/isa.c
-
-file arch/pica/pica/autoconf.c
-file arch/pica/pica/conf.c
-file arch/pica/pica/cpu_exec.c
-file arch/pica/pica/disksubr.c
-file arch/pica/dev/dma.c
-file arch/pica/pica/elf.c
-file arch/pica/pica/machdep.c
-file arch/pica/pica/mainbus.c
-file arch/pica/pica/minidebug.c
-file arch/pica/pica/mem.c
-file arch/pica/pica/pmap.c
-file arch/pica/pica/process_machdep.c
-file arch/pica/pica/sys_machdep.c
-file arch/pica/pica/trap.c
-file arch/pica/pica/vm_machdep.c
#
# This is a dummy - don't try to use it:
@@ -83,5 +107,3 @@ file compat/ultrix/ultrix_misc.c compat_ultrix
file compat/ultrix/ultrix_syscalls.c compat_ultrix
file compat/ultrix/ultrix_sysent.c compat_ultrix
-
-# Configs
diff --git a/sys/arch/pica/dev/dma.c b/sys/arch/pica/dev/dma.c
index cb3dfb3d2f0..4c897db593f 100644
--- a/sys/arch/pica/dev/dma.c
+++ b/sys/arch/pica/dev/dma.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)rz.c 8.1 (Berkeley) 7/29/93
- * $Id: dma.c,v 1.3 1996/05/01 16:59:32 pefo Exp $
+ * $Id: dma.c,v 1.4 1996/05/02 07:59:37 pefo Exp $
*/
/*
@@ -343,8 +343,8 @@ asc_dma_init(dma_softc_t *sc)
sc->enintr = picaDmaNull;
sc->start = picaDmaStart;
sc->map = picaDmaMap;
- sc->isintr = picaDmaNull;
- sc->intr = picaDmaNull;
+ sc->isintr = (int(*)())picaDmaNull;
+ sc->intr = (int(*)())picaDmaNull;
sc->end = picaDmaEnd;
sc->dma_reg = (pDmaReg)PICA_SYS_DMA0_REGS;
@@ -363,8 +363,8 @@ fdc_dma_init(dma_softc_t *sc)
sc->enintr = picaDmaNull;
sc->start = picaDmaStart;
sc->map = picaDmaMap;
- sc->isintr = picaDmaNull;
- sc->intr = picaDmaNull;
+ sc->isintr = (int(*)())picaDmaNull;
+ sc->intr = (int(*)())picaDmaNull;
sc->end = picaDmaEnd;
sc->dma_reg = (pDmaReg)PICA_SYS_DMA1_REGS;
@@ -383,9 +383,9 @@ sn_dma_init(dma_softc_t *sc, int pages)
sc->enintr = picaDmaNull;
sc->start = picaDmaFlush;
sc->map = picaDmaMap;
- sc->isintr = picaDmaNull;
- sc->intr = picaDmaNull;
- sc->end = picaDmaNull;
+ sc->isintr = (int(*)())picaDmaNull;
+ sc->intr = (int(*)())picaDmaNull;
+ sc->end = (int(*)())picaDmaNull;
sc->dma_reg = (pDmaReg)NULL;
sc->pte_size = pages;
diff --git a/sys/arch/pica/dev/dma.h b/sys/arch/pica/dev/dma.h
index 92f6a9436c9..6961b654741 100644
--- a/sys/arch/pica/dev/dma.h
+++ b/sys/arch/pica/dev/dma.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)dma.h 8.1 (Berkeley) 6/10/93
- * $Id: dma.h,v 1.3 1996/05/01 16:59:35 pefo Exp $
+ * $Id: dma.h,v 1.4 1996/05/02 07:59:38 pefo Exp $
*/
/*
@@ -127,7 +127,7 @@ typedef struct dma_softc {
int *sc_dmalen; /* Pointer to len counter in dev */
void (*reset)(struct dma_softc *); /* Reset routine pointer */
void (*enintr)(struct dma_softc *); /* Int enab routine pointer */
- void (*map)(struct dma_softc *, caddr_t, size_t, int);
+ void (*map)(struct dma_softc *, char *, size_t, int);
/* Map a dma viritual area */
void (*start)(struct dma_softc *, caddr_t, size_t, int);
/* Start routine pointer */
diff --git a/sys/arch/pica/include/param.h b/sys/arch/pica/include/param.h
index 60773bc1eb0..10f068449c1 100644
--- a/sys/arch/pica/include/param.h
+++ b/sys/arch/pica/include/param.h
@@ -39,7 +39,7 @@
*
*
* from: @(#)param.h 8.1 (Berkeley) 6/10/93
- * $Id: param.h,v 1.2 1995/10/22 06:26:07 deraadt Exp $
+ * $Id: param.h,v 1.3 1996/05/02 07:59:39 pefo Exp $
*/
/*
@@ -144,7 +144,7 @@
#define pica_ptob(x) ((unsigned)(x) << PGSHIFT)
#ifdef _KERNEL
-#ifndef LOCORE
+#ifndef _LOCORE
extern int (*Mach_splnet)(), (*Mach_splbio)(), (*Mach_splimp)(),
(*Mach_spltty)(), (*Mach_splclock)(), (*Mach_splstatclock)();
#define splnet() ((*Mach_splnet)())
diff --git a/sys/arch/pica/include/pte.h b/sys/arch/pica/include/pte.h
index bf73a1f6974..898b653b7ec 100644
--- a/sys/arch/pica/include/pte.h
+++ b/sys/arch/pica/include/pte.h
@@ -38,14 +38,14 @@
* from: Utah Hdr: pte.h 1.11 89/09/03
*
* from: @(#)pte.h 8.1 (Berkeley) 6/10/93
- * $Id: pte.h,v 1.1 1995/10/18 10:39:13 deraadt Exp $
+ * $Id: pte.h,v 1.2 1996/05/02 07:59:40 pefo Exp $
*/
/*
* R4000 hardware page table entry
*/
-#ifndef LOCORE
+#ifndef _LOCORE
struct pte {
#if BYTE_ORDER == BIG_ENDIAN
unsigned int pg_prot:2, /* SW: access control */
@@ -80,7 +80,7 @@ typedef union pt_entry {
unsigned int pt_entry; /* for copying, etc. */
struct pte pt_pte; /* for getting to bits by name */
} pt_entry_t; /* Mach page table entry */
-#endif /* LOCORE */
+#endif /* _LOCORE */
#define PT_ENTRY_NULL ((pt_entry_t *) 0)
@@ -120,7 +120,7 @@ typedef union pt_entry {
#define PG_SIZE_4M 0x007fe000
#define PG_SIZE_16M 0x01ffe000
-#if defined(_KERNEL) && !defined(LOCORE)
+#if defined(_KERNEL) && !defined(_LOCORE)
/*
* Kernel virtual address to page table entry and visa versa.
*/
diff --git a/sys/arch/pica/pica/clock.c b/sys/arch/pica/pica/clock.c
index 2ed953d09f8..081bd49e367 100644
--- a/sys/arch/pica/pica/clock.c
+++ b/sys/arch/pica/pica/clock.c
@@ -38,7 +38,7 @@
* from: Utah Hdr: clock.c 1.18 91/01/21
*
* from: @(#)clock.c 8.1 (Berkeley) 6/10/93
- * $Id: clock.c,v 1.2 1996/05/01 18:15:51 pefo Exp $
+ * $Id: clock.c,v 1.3 1996/05/02 07:59:42 pefo Exp $
*/
#include <sys/param.h>
@@ -124,7 +124,7 @@ clockattach(parent, self, aux)
/*
* establish the clock interrupt; it's a special case
*/
- BUS_INTR_ESTABLISH((struct confargs *)aux, hardclock, self);
+ BUS_INTR_ESTABLISH((struct confargs *)aux, (intr_handler_t)hardclock, self);
printf("\n");
}
diff --git a/sys/arch/pica/pica/conf.c b/sys/arch/pica/pica/conf.c
index 3b6842d35d6..95236cf4b74 100644
--- a/sys/arch/pica/pica/conf.c
+++ b/sys/arch/pica/pica/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.4 1996/05/01 18:15:55 pefo Exp $ */
+/* $OpenBSD: conf.c,v 1.5 1996/05/02 07:59:42 pefo Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)conf.c 8.2 (Berkeley) 11/14/93
- * $Id: conf.c,v 1.4 1996/05/01 18:15:55 pefo Exp $
+ * $Id: conf.c,v 1.5 1996/05/02 07:59:42 pefo Exp $
*/
#include <sys/param.h>
@@ -143,14 +143,6 @@ cdev_decl(cd);
/* open, close, read, ioctl */
cdev_decl(ipl);
-<<<<<<< 1.2
-#define cdev_gen_ipf(c,n) { \
- dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
- (dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
- (dev_type_stop((*))) nullop, 0, (dev_type_select((*))) enodev, \
- (dev_type_mmap((*))) enodev, 0 }
-=======
->>>>>>> 1.3
#ifdef IPFILTER
#define NIPF 1
#else
diff --git a/sys/arch/pica/pica/pmap.c b/sys/arch/pica/pica/pmap.c
index 9336cc4e16c..f4fdc2f71ea 100644
--- a/sys/arch/pica/pica/pmap.c
+++ b/sys/arch/pica/pica/pmap.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 8.4 (Berkeley) 1/26/94
- * $Id: pmap.c,v 1.2 1996/05/01 18:16:17 pefo Exp $
+ * $Id: pmap.c,v 1.3 1996/05/02 07:59:43 pefo Exp $
*/
/*
@@ -931,7 +931,7 @@ pmap_enter(pmap, va, pa, prot, wired)
* Check cache aliasing incompatibility
*/
if((npv->pv_va & machCacheAliasMask) != (va & machCacheAliasMask)) {
- printf("pmap_enter: creating uncached mapping.\n");
+ printf("pmap_enter: creating uncached mapping 0x%x, 0x%x.\n",npv->pv_va, va);
pmap_page_cache(pa,PV_UNCACHED);
MachFlushDCache(pv->pv_va, PAGE_SIZE);
npte = (npte & ~PG_CACHEMODE) | PG_UNCACHED;