summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/mvme88k/ddb/db_disasm.c68
-rw-r--r--sys/arch/mvme88k/ddb/db_interface.c22
-rw-r--r--sys/arch/mvme88k/dev/cl.c14
-rw-r--r--sys/arch/mvme88k/dev/dart.c15
-rw-r--r--sys/arch/mvme88k/dev/if_ie.c87
-rw-r--r--sys/arch/mvme88k/dev/if_ve.c45
-rw-r--r--sys/arch/mvme88k/dev/if_vevar.h10
-rw-r--r--sys/arch/mvme88k/dev/mainbus.c5
-rw-r--r--sys/arch/mvme88k/dev/nvram.c6
-rw-r--r--sys/arch/mvme88k/dev/sclock.c9
-rw-r--r--sys/arch/mvme88k/dev/ssh.c4
-rw-r--r--sys/arch/mvme88k/dev/sshdma.c4
-rw-r--r--sys/arch/mvme88k/dev/vme.c26
-rw-r--r--sys/arch/mvme88k/dev/vmel.c10
-rw-r--r--sys/arch/mvme88k/dev/vmes.c10
-rw-r--r--sys/arch/mvme88k/dev/vs.c28
-rw-r--r--sys/arch/mvme88k/dev/vsvar.h4
-rw-r--r--sys/arch/mvme88k/dev/vx.c49
18 files changed, 266 insertions, 150 deletions
diff --git a/sys/arch/mvme88k/ddb/db_disasm.c b/sys/arch/mvme88k/ddb/db_disasm.c
index 1d9c5820afa..343433dfd45 100644
--- a/sys/arch/mvme88k/ddb/db_disasm.c
+++ b/sys/arch/mvme88k/ddb/db_disasm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_disasm.c,v 1.5 2001/03/08 00:02:17 miod Exp $ */
+/* $OpenBSD: db_disasm.c,v 1.6 2001/08/26 02:37:00 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -30,10 +30,14 @@
* m88k disassembler for use in ddb
*/
+#include <sys/types.h>
+
#include <machine/db_machdep.h>
+
#include <ddb/db_sym.h> /* DB_STGY_PROC, db_printsym() */
#include <ddb/db_access.h> /* db_get_value() */
#include <ddb/db_output.h> /* db_printf() */
+#include <ddb/db_interface.h>
static char *instwidth[4] = {
".d", " ", ".h", ".b"
@@ -87,9 +91,27 @@ static char *ctrlreg[64] = {
db_printf("0x%X", (x)); \
} while (0)
+/* prototypes */
+void oimmed __P((int, char *, long));
+void ctrlregs __P((int, char *, long));
+void printsod __P((int));
+void sindou __P((int, char *, long));
+void jump __P((int, char *, long));
+void instset __P((int, char *, long));
+void symofset __P((int, int, int));
+void obranch __P((int, char *, long));
+void brcond __P((int, char *, long));
+void otrap __P((int, char *, long));
+void obit __P((int, char *, long));
+void bitman __P((int, char *, long));
+void immem __P((int, char *, long));
+void nimmem __P((int, char *, long));
+void lognim __P((int, char *, long));
+void onimmed __P((int, char *, long));
+
/* Handlers immediate integer arithmetic instructions */
-static void
-oimmed(long inst, char *opcode, long iadr)
+void
+oimmed(int inst, char *opcode, long iadr)
{
register int Linst = inst & 0177777;
register int Hinst = inst >> 16;
@@ -109,8 +131,8 @@ oimmed(long inst, char *opcode, long iadr)
/* Handles instructions dealing with control registers */
-static void
-ctrlregs(long inst, char *opcode, long iadr)
+void
+ctrlregs(int inst, char *opcode, long iadr)
{
register int L6inst = (inst >> 11) & 037;
register int creg = (inst >> 5) & 077;
@@ -128,7 +150,7 @@ ctrlregs(long inst, char *opcode, long iadr)
}
-static void
+void
printsod(int t)
{
if ( t == 0 )
@@ -138,7 +160,7 @@ printsod(int t)
}
/* Handles floating point instructions */
-static void
+void
sindou(int inst, char *opcode, long iadr)
{
register int rs2 = inst & 037;
@@ -166,8 +188,8 @@ sindou(int inst, char *opcode, long iadr)
}
-static void
-jump(long inst, char *opcode, long iadr)
+void
+jump(int inst, char *opcode, long iadr)
{
register int rs2 = inst & 037;
register int Nbit = ( inst >> 10 ) & 01;
@@ -182,8 +204,8 @@ jump(long inst, char *opcode, long iadr)
/* Handles ff1, ff0, tbnd and rte instructions */
-static void
-instset(long inst, char *opcode, long iadr)
+void
+instset(int inst, char *opcode, long iadr)
{
register int rs2 = inst & 037;
register int rs1 = ( inst >> 16 ) & 037;
@@ -202,7 +224,7 @@ instset(long inst, char *opcode, long iadr)
db_printf("\t\tr%-3d,r%-3d",rs1,rs2);
}
-static void
+void
symofset(int disp, int bit, int iadr)
{
long addr;
@@ -218,7 +240,7 @@ symofset(int disp, int bit, int iadr)
return;
}
-static void
+void
obranch(int inst, char *opcode, long iadr)
{
int cond = ( inst >> 26 ) & 01;
@@ -236,7 +258,7 @@ obranch(int inst, char *opcode, long iadr)
/* Handles branch on conditions instructions */
-static void
+void
brcond(int inst, char *opcode, long iadr)
{
int cond = ( inst >> 26 ) & 1;
@@ -265,11 +287,11 @@ brcond(int inst, char *opcode, long iadr)
}
db_printf("r%-3d,", rs);
- symofset(disp,16, iadr);
+ symofset(disp, 16, iadr);
}
-static void
+void
otrap(int inst, char *opcode, long iadr)
{
int vecno = inst & 0777;
@@ -298,7 +320,7 @@ otrap(int inst, char *opcode, long iadr)
/* Handles 10 bit immediate bit field operations */
-static void
+void
obit(int inst, char *opcode, long iadr)
{
int rs = ( inst >> 16 ) & 037;
@@ -323,7 +345,7 @@ obit(int inst, char *opcode, long iadr)
/* Handles triadic mode bit field instructions */
-static void
+void
bitman(int inst, char *opcode, long iadr)
{
@@ -336,7 +358,7 @@ bitman(int inst, char *opcode, long iadr)
/* Handles immediate load/store/exchange instructions */
-static void
+void
immem(int inst, char *opcode, long iadr)
{
register int immed = inst & 0xFFFF;
@@ -367,7 +389,7 @@ immem(int inst, char *opcode, long iadr)
/* Handles triadic mode load/store/exchange instructions */
-static void
+void
nimmem(int inst, char *opcode, long iadr)
{
register int scaled = (inst >> 9) & 01;
@@ -427,7 +449,7 @@ nimmem(int inst, char *opcode, long iadr)
/* Handles triadic mode logical instructions */
-static void
+void
lognim(int inst, char *opcode, long iadr)
{
register int rd = (inst >> 21) & 037;
@@ -444,7 +466,7 @@ lognim(int inst, char *opcode, long iadr)
/* Handles triadic mode arithmetic instructions */
-static void
+void
onimmed(int inst, char *opcode, long iadr)
{
register int rd = (inst >> 21) & 037;
@@ -481,7 +503,7 @@ onimmed(int inst, char *opcode, long iadr)
static struct opdesc {
unsigned mask, match;
- void (*opfun) ();
+ void (*opfun) __P((int, char *, long));
char *farg;
} opdecode[] = {
diff --git a/sys/arch/mvme88k/ddb/db_interface.c b/sys/arch/mvme88k/ddb/db_interface.c
index 659e9d1acfc..88b5c18737e 100644
--- a/sys/arch/mvme88k/ddb/db_interface.c
+++ b/sys/arch/mvme88k/ddb/db_interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_interface.c,v 1.11 2001/08/24 22:45:42 miod Exp $ */
+/* $OpenBSD: db_interface.c,v 1.12 2001/08/26 02:37:00 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -67,6 +67,18 @@ void db_putc __P((int c));
int db_getc __P((void));
void cpu_interrupt_to_db __P((int cpu_no));
char *db_task_name __P((void));
+int m88k_dmx_print __P((unsigned, unsigned, unsigned, unsigned));
+void m88k_db_pause __P((unsigned));
+void m88k_db_print_frame __P((db_expr_t, int, db_expr_t, char *));
+void m88k_db_where __P((db_expr_t, int, db_expr_t, char *));
+void m88k_db_frame_search __P((db_expr_t, int, db_expr_t, char *));
+void m88k_db_iflush __P((db_expr_t, int, db_expr_t, char *));
+void m88k_db_dflush __P((db_expr_t, int, db_expr_t, char *));
+void m88k_db_peek __P((db_expr_t, int, db_expr_t, char *));
+void m88k_db_noise __P((db_expr_t, int, db_expr_t, char *));
+void m88k_db_translate __P((db_expr_t, int, db_expr_t, char *));
+void m88k_db_cmmucfg __P((db_expr_t, int, db_expr_t, char *));
+void m88k_db_prom_cmd __P((db_expr_t, int, db_expr_t, char *));
int db_active = 0;
int db_noisy = 0;
@@ -174,7 +186,7 @@ void
m88k_db_print_frame(addr, have_addr, count, modif)
db_expr_t addr;
int have_addr;
- int count;
+ db_expr_t count;
char *modif;
{
struct m88100_saved_state *s = (struct m88100_saved_state *)addr;
@@ -784,7 +796,11 @@ void cpu_interrupt_to_db(cpu_no)
}
void
-m88k_db_prom_cmd(void)
+m88k_db_prom_cmd(addr, have_addr, count, modif)
+ db_expr_t addr;
+ int have_addr;
+ db_expr_t count;
+ char *modif;
{
doboot();
}
diff --git a/sys/arch/mvme88k/dev/cl.c b/sys/arch/mvme88k/dev/cl.c
index 0fb12aab481..92e8c46f7fc 100644
--- a/sys/arch/mvme88k/dev/cl.c
+++ b/sys/arch/mvme88k/dev/cl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cl.c,v 1.12 2001/08/24 22:46:57 miod Exp $ */
+/* $OpenBSD: cl.c,v 1.13 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1995 Dale Rahn. All rights reserved.
@@ -65,6 +65,8 @@
#define CL_TXINTR 0x02
#define CL_RXINTR 0x02
+#define CLCD_DO_POLLED_INPUT
+
#ifdef DEBUG
#undef DEBUG
#endif
@@ -148,8 +150,10 @@ struct {
/* prototypes */
int clcnprobe __P((struct consdev *cp));
int clcninit __P((struct consdev *cp));
+int cl_instat __P((struct clsoftc *sc));
int clcngetc __P((dev_t dev));
int clcnputc __P((dev_t dev, u_char c));
+void clcnpollc __P((dev_t, int));
u_char cl_clkdiv __P((int speed));
u_char cl_clknum __P((int speed));
u_char cl_clkrxtimeout __P((int speed));
@@ -166,7 +170,9 @@ void cl_parity __P((struct clsoftc *sc, int channel));
void cl_frame __P((struct clsoftc *sc, int channel));
void cl_break __P(( struct clsoftc *sc, int channel));
int clmctl __P((dev_t dev, int bits, int how));
+#ifdef DEBUG
void cl_dumpport __P((int channel));
+#endif
int clprobe __P((struct device *parent, void *self, void *aux));
void clattach __P((struct device *parent, struct device *self, void *aux));
@@ -184,6 +190,9 @@ u_char clgetc __P((struct clsoftc *sc, int *channel));
#if 0
void cloutput __P( (struct tty *tp));
#endif
+#ifdef CLCD_DO_POLLED_INPUT
+void cl_chkinput __P((void));
+#endif
struct cfattach cl_ca = {
sizeof(struct clsoftc), clprobe, clattach
@@ -1128,10 +1137,7 @@ if (unit == 0) {
return;
}
-/*
#ifdef CLCD_DO_POLLED_INPUT
-*/
-#if 1
void
cl_chkinput()
{
diff --git a/sys/arch/mvme88k/dev/dart.c b/sys/arch/mvme88k/dev/dart.c
index 3c9cfee53d6..1e6dae463e8 100644
--- a/sys/arch/mvme88k/dev/dart.c
+++ b/sys/arch/mvme88k/dev/dart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dart.c,v 1.9 2001/08/24 19:32:06 miod Exp $ */
+/* $OpenBSD: dart.c,v 1.10 2001/08/26 02:37:07 miod Exp $ */
/*
* Mach Operating System
@@ -98,6 +98,14 @@ int dartcnprobe __P((struct consdev *cp));
int dartcninit __P((struct consdev *cp));
int dartcngetc __P((dev_t dev));
void dartcnputc __P((dev_t dev, char c));
+int dart_speed __P((int));
+struct tty* darttty __P((dev_t));
+void dartstart __P((struct tty *));
+int dartmctl __P((dev_t, int, int));
+int dartparam __P((struct tty *, struct termios *));
+void dartmodemtrans __P((struct dartsoftc *, unsigned int, unsigned int));
+void dartrint __P((struct dartsoftc *, int));
+void dartxint __P((struct dartsoftc *, int));
int dartopen __P((dev_t dev, int flag, int mode, struct proc *p));
int dartclose __P((dev_t dev, int flag, int mode, struct proc *p));
@@ -180,7 +188,7 @@ dartmatch(parent, vcf, args)
if (cputyp != CPU_188) return (0);
ca->ca_vaddr = ca->ca_paddr; /* 1:1 */
addr = (union dartreg *)ca->ca_vaddr;
- if (badvaddr(addr, 2) <= 0) {
+ if (badvaddr((vaddr_t)addr, 2) <= 0) {
printf("==> dart: failed address check.\n");
return (0);
}
@@ -1233,7 +1241,10 @@ dartcngetc(dev)
int c; /* received character */
int s;
int port;
+#if 1
+#else
m88k_psr_type psr;
+#endif
char buf[] = "char x";
port = DART_PORT(dev);
diff --git a/sys/arch/mvme88k/dev/if_ie.c b/sys/arch/mvme88k/dev/if_ie.c
index 7468d49a94b..d7be5a50e8a 100644
--- a/sys/arch/mvme88k/dev/if_ie.c
+++ b/sys/arch/mvme88k/dev/if_ie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ie.c,v 1.13 2001/08/24 19:26:12 miod Exp $ */
+/* $OpenBSD: if_ie.c,v 1.14 2001/08/26 02:37:07 miod Exp $ */
/*-
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -135,6 +135,7 @@ Mode of operation:
#include <machine/pmap.h>
#include "pcctwo.h"
#include <mvme88k/dev/pcctworeg.h>
+#include <mvme88k/dev/pcctwofunc.h>
#include <mvme88k/dev/if_ie.h>
#include <mvme88k/dev/i82596.h>
#include <machine/board.h>
@@ -174,9 +175,12 @@ struct ie_softc {
struct arpcom sc_arpcom;/* system arpcom structure */
- void (*reset_596)(); /* card dependent reset function */
- void (*chan_attn)(); /* card dependent attn function */
- void (*run_596)(); /* card depenent "go on-line" function */
+ void (*reset_596) __P((struct ie_softc *));
+ /* card dependent reset function */
+ void (*chan_attn) __P((struct ie_softc *));
+ /* card dependent attn function */
+ void (*run_596) __P((struct ie_softc *));
+ /* card depenent "go on-line" function */
void (*memcopy) __P((const void *, void *, u_int));
/* card dependent memory copy function */
void (*memzero) __P((void *, u_int));
@@ -233,9 +237,9 @@ struct ie_softc {
#endif
};
-static void ie_obreset __P((struct ie_softc *));
-static void ie_obattend __P((struct ie_softc *));
-static void ie_obrun __P((struct ie_softc *));
+void ie_obreset __P((struct ie_softc *));
+void ie_obattend __P((struct ie_softc *));
+void ie_obrun __P((struct ie_softc *));
int ie_setupram __P((struct ie_softc *sc));
void iewatchdog __P((struct ifnet *));
@@ -245,17 +249,31 @@ int ieinit __P((struct ie_softc *));
int ieioctl __P((struct ifnet *, u_long, caddr_t));
void iestart __P((struct ifnet *));
void iereset __P((struct ie_softc *));
-static void ie_readframe __P((struct ie_softc *, int));
-static void ie_drop_packet_buffer __P((struct ie_softc *));
-static int command_and_wait __P((struct ie_softc *, int,
+void ie_readframe __P((struct ie_softc *, int));
+void ie_drop_packet_buffer __P((struct ie_softc *));
+int command_and_wait __P((struct ie_softc *, int,
void volatile *, int));
-/*static*/ void ierint __P((struct ie_softc *));
-/*static*/ void ietint __P((struct ie_softc *));
-static int ieget __P((struct ie_softc *, struct mbuf **,
+void ierint __P((struct ie_softc *));
+void ietint __P((struct ie_softc *));
+int ieget __P((struct ie_softc *, struct mbuf **,
struct ether_header *, int *));
-static void setup_bufs __P((struct ie_softc *));
-static int mc_setup __P((struct ie_softc *, void *));
-static void mc_reset __P((struct ie_softc *));
+void setup_bufs __P((struct ie_softc *));
+int mc_setup __P((struct ie_softc *, void *));
+void mc_reset __P((struct ie_softc *));
+static __inline int ether_equal __P((u_char *, u_char *));
+static __inline void ie_ack __P((struct ie_softc *, u_int));
+static __inline void ie_setup_config __P((volatile struct ie_config_cmd *,
+ int, int));
+static __inline int check_eh __P((struct ie_softc *, struct ether_header *,
+ int *));
+static __inline int ie_buflen __P((struct ie_softc *, int));
+static __inline int ie_packet_len __P((struct ie_softc *));
+static __inline void iexmit __P((struct ie_softc *));
+static __inline caddr_t Align __P((caddr_t));
+
+void chan_attn_timeout __P((void *));
+void run_tdr __P((struct ie_softc *, struct ie_tdr_cmd *));
+void iestop __P((struct ie_softc *));
#ifdef IEDEBUG
void print_rbd __P((volatile struct ie_recv_buf_desc *));
@@ -264,9 +282,8 @@ int in_ierint = 0;
int in_ietint = 0;
#endif
-int iematch();
-void ieattach();
-extern void pcctwointr_establish();
+int iematch __P((struct device *, void *, void *));
+void ieattach __P((struct device *, struct device *, void *));
struct cfattach ie_ca = {
sizeof(struct ie_softc), iematch, ieattach
@@ -360,7 +377,7 @@ ie_obreset(sc)
ieo->portlow = a >> 16;
delay(1000);
- pmap_extract(pmap_kernel(), sc->scp, &a);
+ pmap_extract(pmap_kernel(), (vaddr_t)sc->scp, &a);
a |= IE_PORT_NEWSCPADDR;
ieo->porthigh = a & 0xffff;
t = 0; t = 1;
@@ -415,7 +432,7 @@ ieattach(parent, self, aux)
/* get the first avaliable etherbuf */
sc->sc_maddr = etherbuf; /* maddr = vaddr */
if (sc->sc_maddr == NULL) panic("ie: too many ethernet boards");
- if (pmap_extract(pmap_kernel(), sc->sc_maddr, &pa) == FALSE)
+ if (pmap_extract(pmap_kernel(), (vaddr_t)sc->sc_maddr, &pa) == FALSE)
panic("ie: pmap_extract");
sc->sc_iobase = (caddr_t)pa; /* iobase = paddr (24 bit) */
@@ -431,7 +448,7 @@ ieattach(parent, self, aux)
/*printf("scpV %x iscpV %x scbV %x\n", sc->scp, sc->iscp, sc->scb);*/
sc->scp->ie_bus_use = 0x44;
- pmap_extract(pmap_kernel(), sc->iscp, &pa);
+ pmap_extract(pmap_kernel(), (vaddr_t)sc->iscp, &pa);
SWT_32(sc->scp->ie_iscp_ptr, pa);
/*
* rest of first page is unused (wasted!), rest of ram
@@ -910,7 +927,7 @@ sc->xmit_cbuffs[sc->xctail]);
* chain of partially-full mbufs. This should help to speed up the
* operation considerably. (Provided that it works, of course.)
*/
-static inline int
+int
ieget(sc, mp, ehp, to_bpf)
struct ie_softc *sc;
struct mbuf **mp;
@@ -1086,7 +1103,7 @@ ieget(sc, mp, ehp, to_bpf)
* on confusing code to deal with them. Hopefully, this machine will never ARP
* for trailers anyway.
*/
-static void
+void
ie_readframe(sc, num)
struct ie_softc *sc;
int num; /* frame number to read */
@@ -1176,7 +1193,7 @@ ie_readframe(sc, num)
ether_input(&sc->sc_arpcom.ac_if, &eh, m);
}
-static void
+void
ie_drop_packet_buffer(sc)
struct ie_softc *sc;
{
@@ -1359,7 +1376,7 @@ chan_attn_timeout(rock)
* ((volatile struct ie_cmd_common *)pcmd)->ie_cmd_status & MASK
* to become true.
*/
-static int
+int
command_and_wait(sc, cmd, pcmd, mask)
struct ie_softc *sc;
int cmd;
@@ -1426,7 +1443,7 @@ command_and_wait(sc, cmd, pcmd, mask)
/*
* Run the time-domain reflectometer.
*/
-static void
+void
run_tdr(sc, cmd)
struct ie_softc *sc;
struct ie_tdr_cmd *cmd;
@@ -1495,7 +1512,7 @@ Align(ptr)
* note: this function was written to be easy to understand, rather than
* highly efficient (it isn't in the critical path).
*/
-static void
+void
setup_bufs(sc)
struct ie_softc *sc;
{
@@ -1509,14 +1526,14 @@ setup_bufs(sc)
(sc->memzero)(ptr, sc->buf_area_sz);
ptr = Align(ptr); /* set alignment and stick with it */
- n = (int)Align(sizeof(struct ie_xmit_cmd)) +
- (int)Align(sizeof(struct ie_xmit_buf)) + IE_TBUF_SIZE;
+ n = (int)Align((caddr_t)sizeof(struct ie_xmit_cmd)) +
+ (int)Align((caddr_t)sizeof(struct ie_xmit_buf)) + IE_TBUF_SIZE;
n *= NTXBUF; /* n = total size of xmit area */
n = sc->buf_area_sz - n;/* n = free space for recv stuff */
- r = (int)Align(sizeof(struct ie_recv_frame_desc)) +
- (((int)Align(sizeof(struct ie_recv_buf_desc)) + IE_RBUF_SIZE) * B_PER_F);
+ r = (int)Align((caddr_t)sizeof(struct ie_recv_frame_desc)) +
+ (((int)Align((caddr_t)sizeof(struct ie_recv_buf_desc)) + IE_RBUF_SIZE) * B_PER_F);
/* r = size of one R frame */
@@ -1624,7 +1641,7 @@ setup_bufs(sc)
* Run the multicast setup command.
* Called at splnet().
*/
-static int
+int
mc_setup(sc, ptr)
struct ie_softc *sc;
void *ptr;
@@ -1751,7 +1768,7 @@ ieinit(sc)
return 0;
}
-static void
+void
iestop(sc)
struct ie_softc *sc;
{
@@ -1851,7 +1868,7 @@ ieioctl(ifp, cmd, data)
return error;
}
-static void
+void
mc_reset(sc)
struct ie_softc *sc;
{
diff --git a/sys/arch/mvme88k/dev/if_ve.c b/sys/arch/mvme88k/dev/if_ve.c
index f0be73cd82a..ae9300c2e5f 100644
--- a/sys/arch/mvme88k/dev/if_ve.c
+++ b/sys/arch/mvme88k/dev/if_ve.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ve.c,v 1.8 2001/08/11 23:21:13 art Exp $ */
+/* $OpenBSD: if_ve.c,v 1.9 2001/08/26 02:37:07 miod Exp $ */
/*-
* Copyright (c) 1999 Steve Murphree, Jr.
* Copyright (c) 1982, 1992, 1993
@@ -87,14 +87,14 @@ void ve_recv_print __P((struct vam7990_softc *, int));
void ve_xmit_print __P((struct vam7990_softc *, int));
#endif
-integrate void ve_rint __P((struct vam7990_softc *));
-integrate void ve_tint __P((struct vam7990_softc *));
+void ve_rint __P((struct vam7990_softc *));
+void ve_tint __P((struct vam7990_softc *));
-integrate int ve_put __P((struct vam7990_softc *, int, struct mbuf *));
-integrate struct mbuf *ve_get __P((struct vam7990_softc *, int, int));
-integrate void ve_read __P((struct vam7990_softc *, int, int));
+int ve_put __P((struct vam7990_softc *, int, struct mbuf *));
+struct mbuf *ve_get __P((struct vam7990_softc *, int, int));
+void ve_read __P((struct vam7990_softc *, int, int));
-hide void ve_shutdown __P((void *));
+void ve_shutdown __P((void *));
#define ifp (&sc->sc_arpcom.ac_if)
#ifndef ETHER_CMP
@@ -136,12 +136,16 @@ struct cfattach ve_ca = {
sizeof(struct ve_softc), vematch, veattach
};
-hide void vewrcsr __P((struct vam7990_softc *, u_int16_t, u_int16_t));
-hide u_int16_t verdcsr __P((struct vam7990_softc *, u_int16_t));
+void vewrcsr __P((struct vam7990_softc *, u_int16_t, u_int16_t));
+u_int16_t verdcsr __P((struct vam7990_softc *, u_int16_t));
+void nvram_cmd __P((struct vam7990_softc *, u_char, u_short));
+u_int16_t nvram_read __P((struct vam7990_softc *, u_char));
+void vereset __P((struct vam7990_softc *));
+void ve_ackint __P((struct vam7990_softc *));
/* send command to the nvram controller */
void
-nvram_cmd(sc, cmd, addr )
+nvram_cmd(sc, cmd, addr)
struct vam7990_softc *sc;
u_char cmd;
u_short addr;
@@ -189,7 +193,7 @@ nvram_read(sc, nvram_addr)
return (val);
}
-hide void
+void
vewrcsr(sc, port, val)
struct vam7990_softc *sc;
u_int16_t port, val;
@@ -200,7 +204,7 @@ vewrcsr(sc, port, val)
ve1->ver1_rdp = val;
}
-hide u_int16_t
+u_int16_t
verdcsr(sc, port)
struct vam7990_softc *sc;
u_int16_t port;
@@ -305,7 +309,7 @@ veattach(parent, self, aux)
if (sc->sc_mem == NULL) panic("ve: no more memory in external I/O map");
sc->sc_memsize = LEMEMSIZE;
sc->sc_conf3 = LE_C3_BSWP;
- sc->sc_addr = kvtop(sc->sc_mem);
+ sc->sc_addr = kvtop((vm_offset_t)sc->sc_mem);
/* get ether address via bug call */
veetheraddr(sc);
@@ -576,7 +580,7 @@ ve_init(sc)
* Routine to copy from mbuf chain to transmit buffer in
* network buffer memory.
*/
-integrate int
+int
ve_put(sc, boff, m)
struct vam7990_softc *sc;
int boff;
@@ -609,7 +613,7 @@ ve_put(sc, boff, m)
* We copy the data into mbufs. When full cluster sized units are present
* we copy into clusters.
*/
-integrate struct mbuf *
+struct mbuf *
ve_get(sc, boff, totlen)
struct vam7990_softc *sc;
int boff, totlen;
@@ -657,7 +661,7 @@ ve_get(sc, boff, totlen)
/*
* Pass a packet to the higher levels.
*/
-integrate void
+void
ve_read(sc, boff, len)
register struct vam7990_softc *sc;
int boff, len;
@@ -703,6 +707,7 @@ ve_read(sc, boff, len)
* destination address (garbage will usually not match).
* Of course, this precludes multicast support...
*/
+ eh = mtod(m, struct ether_header *);
if (ETHER_CMP(eh->ether_dhost, sc->sc_arpcom.ac_enaddr) &&
ETHER_CMP(eh->ether_dhost, etherbroadcastaddr)) {
m_freem(m);
@@ -714,7 +719,7 @@ ve_read(sc, boff, len)
ether_input_mbuf(ifp, m);
}
-integrate void
+void
ve_rint(sc)
struct vam7990_softc *sc;
{
@@ -789,7 +794,7 @@ ve_rint(sc)
sc->sc_last_rd = bix;
}
-integrate void
+void
ve_tint(sc)
register struct vam7990_softc *sc;
{
@@ -1142,7 +1147,7 @@ ve_ioctl(ifp, cmd, data)
return (error);
}
-hide void
+void
ve_shutdown(arg)
void *arg;
{
@@ -1341,5 +1346,3 @@ ve_zerobuf_contig(sc, boff, len)
*/
bzero(buf + boff, len);
}
-
-
diff --git a/sys/arch/mvme88k/dev/if_vevar.h b/sys/arch/mvme88k/dev/if_vevar.h
index 4c7de6d0571..344e7fc53ac 100644
--- a/sys/arch/mvme88k/dev/if_vevar.h
+++ b/sys/arch/mvme88k/dev/if_vevar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vevar.h,v 1.1 1999/05/29 04:41:43 smurph Exp $ */
+/* $OpenBSD: if_vevar.h,v 1.2 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
@@ -31,14 +31,6 @@
#define LEDEBUG 1
-#ifdef DDB
-#define integrate
-#define hide
-#else
-#define integrate static __inline
-#define hide static
-#endif
-
/*
* Ethernet software status per device.
*
diff --git a/sys/arch/mvme88k/dev/mainbus.c b/sys/arch/mvme88k/dev/mainbus.c
index 2892a076d48..ccda4910b1a 100644
--- a/sys/arch/mvme88k/dev/mainbus.c
+++ b/sys/arch/mvme88k/dev/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.3 1999/05/29 04:41:44 smurph Exp $ */
+/* $OpenBSD: mainbus.c,v 1.4 2001/08/26 02:37:07 miod Exp $ */
/* Copyright (c) 1998 Steve Murphree, Jr. */
#include <sys/param.h>
#include <sys/systm.h>
@@ -12,6 +12,8 @@
void mainbus_attach __P((struct device *, struct device *, void *));
int mainbus_match __P((struct device *, void *, void *));
+int mainbus_print __P((void *, const char *));
+int mainbus_scan __P((struct device *, void *, void *));
struct cfattach mainbus_ca = {
sizeof(struct device), mainbus_match, mainbus_attach
@@ -77,4 +79,3 @@ mainbus_attach(parent, self, args)
(void)config_search(mainbus_scan, self, args);
}
-
diff --git a/sys/arch/mvme88k/dev/nvram.c b/sys/arch/mvme88k/dev/nvram.c
index c43013944c3..a2a54b3eac0 100644
--- a/sys/arch/mvme88k/dev/nvram.c
+++ b/sys/arch/mvme88k/dev/nvram.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvram.c,v 1.10 2001/06/14 21:30:34 miod Exp $ */
+/* $OpenBSD: nvram.c,v 1.11 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -84,6 +84,8 @@ int nvramread __P((dev_t dev, struct uio *uio, int flags));
int nvramwrite __P((dev_t dev, struct uio *uio, int flags));
int nvrammmap __P((dev_t dev, int off, int prot));
+u_long chiptotime __P((int, int, int, int, int, int));
+
int
nvrammatch(parent, vcf, args)
struct device *parent;
@@ -199,7 +201,7 @@ microtime(tvp)
const short dayyr[12] =
{ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
-static u_long
+u_long
chiptotime(sec, min, hour, day, mon, year)
register int sec, min, hour, day, mon, year;
{
diff --git a/sys/arch/mvme88k/dev/sclock.c b/sys/arch/mvme88k/dev/sclock.c
index 30feb7d3e0d..1611102b33a 100644
--- a/sys/arch/mvme88k/dev/sclock.c
+++ b/sys/arch/mvme88k/dev/sclock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sclock.c,v 1.5 2001/03/09 05:44:39 smurph Exp $ */
+/* $OpenBSD: sclock.c,v 1.6 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
*
@@ -117,12 +117,13 @@ struct simplelock cio_lock;
int statvar = 8192;
int statmin; /* statclock interval - 1/2*variance */
-static int sclockmatch __P((struct device *, void *, void *));
-static void sclockattach __P((struct device *, struct device *, void *));
+int sclockmatch __P((struct device *, void *, void *));
+void sclockattach __P((struct device *, struct device *, void *));
void sbc_initstatclock __P((void));
void m188_initstatclock __P((void));
void m188_cio_init __P((unsigned));
+u_char read_cio __P((unsigned));
void write_cio __P((unsigned, unsigned));
struct sclocksoftc {
@@ -369,7 +370,7 @@ write_cio(reg, val)
}
/* Read CIO register */
-static u_char
+u_char
read_cio(reg)
unsigned reg;
{
diff --git a/sys/arch/mvme88k/dev/ssh.c b/sys/arch/mvme88k/dev/ssh.c
index cdf1665a7b6..ab98884198e 100644
--- a/sys/arch/mvme88k/dev/ssh.c
+++ b/sys/arch/mvme88k/dev/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.4 2001/06/14 21:30:35 miod Exp $ */
+/* $OpenBSD: ssh.c,v 1.5 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@@ -51,7 +51,9 @@
#include <sys/buf.h>
#include <sys/malloc.h>
+#include <vm/vm.h>
#include <vm/pmap.h>
+#include <uvm/uvm_extern.h>
#include <machine/autoconf.h>
#include <machine/mmu.h>
diff --git a/sys/arch/mvme88k/dev/sshdma.c b/sys/arch/mvme88k/dev/sshdma.c
index 42b50ee43a8..167b3babb1d 100644
--- a/sys/arch/mvme88k/dev/sshdma.c
+++ b/sys/arch/mvme88k/dev/sshdma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshdma.c,v 1.4 2001/06/14 21:30:35 miod Exp $ */
+/* $OpenBSD: sshdma.c,v 1.5 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1996 Nivas Madhur
@@ -43,7 +43,9 @@
#include <sys/kernel.h>
#include <sys/device.h>
+#include <vm/vm.h>
#include <vm/pmap.h>
+#include <uvm/uvm_extern.h>
#include <machine/autoconf.h>
#include <machine/board.h>
diff --git a/sys/arch/mvme88k/dev/vme.c b/sys/arch/mvme88k/dev/vme.c
index 1aacc02f30b..670ecf6c831 100644
--- a/sys/arch/mvme88k/dev/vme.c
+++ b/sys/arch/mvme88k/dev/vme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vme.c,v 1.11 2001/08/24 19:34:21 miod Exp $ */
+/* $OpenBSD: vme.c,v 1.12 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* Copyright (c) 1995 Theo de Raadt
@@ -44,10 +44,12 @@
#include <sys/device.h>
#include <vm/vm.h>
#include <vm/vm_kern.h>
-#include "machine/autoconf.h"
-#include "machine/cpu.h"
-#include "machine/frame.h"
-#include "machine/pmap.h"
+
+#include <machine/autoconf.h>
+#include <machine/cpu.h>
+#include <machine/frame.h>
+#include <machine/locore.h>
+#include <machine/pmap.h>
#include "pcctwo.h"
#include "syscon.h"
@@ -60,14 +62,18 @@
int vmematch __P((struct device *, void *, void *));
void vmeattach __P((struct device *, struct device *, void *));
-void vme2chip_init __P((struct vmesoftc *sc));
-u_long vme2chip_map __P((u_long base, int len, int dwidth));
+void vme2chip_init __P((struct vmesoftc *));
+u_long vme2chip_map __P((u_long, int, int));
int vme2abort __P((void *));
int sysconabort __P((void *));
-int intr_findvec __P((int start, int end));
+void * vmemap __P((struct vmesoftc *, void *, int, int));
+void vmeunmap __P((void *, int));
+int vmeprint __P((void *, const char *));
+
+void vmesyscon_init __P((struct vmesoftc *));
-static int vmebustype;
-static int vmevecbase;
+int vmebustype;
+int vmevecbase;
struct vme2reg *sys_vme2 = NULL;
diff --git a/sys/arch/mvme88k/dev/vmel.c b/sys/arch/mvme88k/dev/vmel.c
index cc70108b3d4..8c91db1892b 100644
--- a/sys/arch/mvme88k/dev/vmel.c
+++ b/sys/arch/mvme88k/dev/vmel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmel.c,v 1.4 2001/06/14 21:30:35 miod Exp $ */
+/* $OpenBSD: vmel.c,v 1.5 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -59,6 +59,14 @@ struct cfdriver vmel_cd = {
NULL, "vmel", DV_DULL, 0
};
+int vmelscan __P((struct device *, void *, void*));
+int vmelopen __P((dev_t, int, int));
+int vmelclose __P((dev_t, int, int));
+int vmelioctl __P((dev_t, int, caddr_t, int, struct proc *));
+int vmelread __P((dev_t, struct uio *, int));
+int vmelwrite __P((dev_t, struct uio *, int));
+int vmelmmap __P((dev_t, int, int));
+
int
vmelmatch(parent, cf, args)
struct device *parent;
diff --git a/sys/arch/mvme88k/dev/vmes.c b/sys/arch/mvme88k/dev/vmes.c
index 180f6ef6c8b..4832d7f73cc 100644
--- a/sys/arch/mvme88k/dev/vmes.c
+++ b/sys/arch/mvme88k/dev/vmes.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmes.c,v 1.4 2001/06/14 21:30:35 miod Exp $ */
+/* $OpenBSD: vmes.c,v 1.5 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -59,6 +59,14 @@ struct cfdriver vmes_cd = {
NULL, "vmes", DV_DULL, 0
};
+int vmesscan __P((struct device *, void *, void*));
+int vmesopen __P((dev_t, int, int));
+int vmesclose __P((dev_t, int, int));
+int vmesioctl __P((dev_t, int, caddr_t, int, struct proc *));
+int vmesread __P((dev_t, struct uio *, int));
+int vmeswrite __P((dev_t, struct uio *, int));
+int vmesmmap __P((dev_t, int, int));
+
int
vmesmatch(parent, cf, args)
struct device *parent;
diff --git a/sys/arch/mvme88k/dev/vs.c b/sys/arch/mvme88k/dev/vs.c
index 5271a7ff0a1..de33a9e745f 100644
--- a/sys/arch/mvme88k/dev/vs.c
+++ b/sys/arch/mvme88k/dev/vs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vs.c,v 1.8 2001/06/25 00:43:14 mickey Exp $ */
+/* $OpenBSD: vs.c,v 1.9 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
@@ -58,14 +58,14 @@
#include <machine/param.h>
#if defined(mvme88k)
- #include <mvme88k/dev/vsreg.h>
- #include <mvme88k/dev/vsvar.h>
- #include <mvme88k/dev/vme.h> /* vme_findvec() */
- #include <machine/mmu.h> /* DMA_CACHE_SYNC, etc... */
+#include <mvme88k/dev/vsreg.h>
+#include <mvme88k/dev/vsvar.h>
+#include <mvme88k/dev/vme.h> /* vme_findvec() */
+#include <machine/mmu.h> /* DMA_CACHE_SYNC, etc... */
#else
- #include <mvme68k/dev/vsreg.h>
- #include <mvme68k/dev/vsvar.h>
- #include <mvme68k/dev/vme.h> /* vme_findvec() */
+#include <mvme68k/dev/vsreg.h>
+#include <mvme68k/dev/vsvar.h>
+#include <mvme68k/dev/vme.h> /* vme_findvec() */
#endif /* mvme88k */
int vs_checkintr __P((struct vs_softc *, struct scsi_xfer *, int *));
@@ -79,11 +79,15 @@ int vs_poll __P((struct vs_softc *, struct scsi_xfer *));
void vs_scsidone __P((struct vs_softc *, struct scsi_xfer *, int));
M328_CQE * vs_getcqe __P((struct vs_softc *));
M328_IOPB * vs_getiopb __P((struct vs_softc *));
+void vs_copy __P((void *, void *, unsigned short));
+void vs_zero __P((void *, u_long));
+int do_vspoll __P((struct vs_softc *, int));
+void thaw_queue __P((struct vs_softc *, u_int8_t));
+void vs_link_sg_element __P((sg_list_element_t *, vm_offset_t, int));
+void vs_link_sg_list __P((sg_list_element_t *, vm_offset_t, int));
static __inline__ void vs_clear_return_info __P((struct vs_softc *));
-extern u_int kvtop();
-
/*
* 16 bit 's' memory functions. MVME328 is a D16 board.
* We must program with that in mind or else...
@@ -425,7 +429,7 @@ vs_chksense(xs)
miopb->iopb_EVCT = (u_char)sc->sc_evec;
miopb->iopb_LEVEL = 0; /*sc->sc_ipl;*/
miopb->iopb_ADDR = ADDR_MOD;
- LV(miopb->iopb_BUFF, kvtop(&xs->sense));
+ LV(miopb->iopb_BUFF, kvtop((vm_offset_t)&xs->sense));
LV(miopb->iopb_LENGTH, sizeof(struct scsi_sense_data));
vs_zero(mc, sizeof(M328_CQE));
@@ -999,7 +1003,7 @@ vs_build_memory_structure(xs, iopb)
level = 0;
virt = starting_point_virt = (vm_offset_t)xs->data;
- point1_phys = starting_point_phys = kvtop(xs->data);
+ point1_phys = starting_point_phys = kvtop((vm_offset_t)xs->data);
len = xs->datalen;
/*
* Check if we need scatter/gather
diff --git a/sys/arch/mvme88k/dev/vsvar.h b/sys/arch/mvme88k/dev/vsvar.h
index 367719b7295..1b1022d5b51 100644
--- a/sys/arch/mvme88k/dev/vsvar.h
+++ b/sys/arch/mvme88k/dev/vsvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vsvar.h,v 1.3 2001/03/07 01:57:56 miod Exp $ */
+/* $OpenBSD: vsvar.h,v 1.4 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* Copyright (c) 1990 The Regents of the University of California.
@@ -47,7 +47,7 @@
#define DMAMAXIO (MAXPHYS/NBPG+1)
#define LO(x) (u_short)((unsigned long)x & 0x0000FFFF)
#define HI(x) (u_short)((unsigned long)x >> 16)
-#define OFF(x) (u_short)((long)kvtop(x) - (long)kvtop(sc->sc_vsreg))
+#define OFF(x) (u_short)((long)kvtop((vm_offset_t)x) - (long)kvtop((vm_offset_t)sc->sc_vsreg))
#define vs_name(sc) (sc)->sc_dev.dv_xname
/**************** Scater/Gather Stuff *******************/
diff --git a/sys/arch/mvme88k/dev/vx.c b/sys/arch/mvme88k/dev/vx.c
index 9d277fbd0d7..1cd64de6b72 100644
--- a/sys/arch/mvme88k/dev/vx.c
+++ b/sys/arch/mvme88k/dev/vx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vx.c,v 1.8 2001/06/27 05:44:49 nate Exp $ */
+/* $OpenBSD: vx.c,v 1.9 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* All rights reserved.
@@ -39,22 +39,26 @@
#include <sys/systm.h>
#include <sys/time.h>
#include <sys/device.h>
+#include <sys/syslog.h>
+
#include <machine/cpu.h>
#include <machine/autoconf.h>
+
#include <dev/cons.h>
+
#include <mvme88k/dev/vxreg.h>
-#include <sys/syslog.h>
+
#include "pcctwo.h"
#if NPCCTWO > 0
- #include <mvme88k/dev/pcctworeg.h>
- #include <mvme88k/dev/vme.h>
+#include <mvme88k/dev/pcctworeg.h>
+#include <mvme88k/dev/vme.h>
#endif
#include <machine/psl.h>
#define splvx() spltty()
#ifdef DEBUG
- #undef DEBUG
+#undef DEBUG
#endif
#define DEBUG_KERN 1
@@ -139,7 +143,19 @@ int vxioctl __P((dev_t dev, int cmd, caddr_t data, int flag, struct proc *p));
void vxstart __P((struct tty *tp));
int vxstop __P((struct tty *tp, int flag));
-static void vxputc __P((struct vxsoftc *sc, int port, u_char c));
+void vxputc __P((struct vxsoftc *sc, int port, u_char c));
+
+struct tty * vxtty __P((dev_t));
+short dtr_ctl __P((struct vxsoftc *, int, int));
+short rts_ctl __P((struct vxsoftc *, int, int));
+short flush_ctl __P((struct vxsoftc *, int, int));
+u_short vxtspeed __P((int));
+void read_chars __P((struct vxsoftc *, int));
+void ccode __P((struct vxsoftc *, int, char));
+void wzero __P((void *, size_t));
+int create_free_queue __P((struct vxsoftc *));
+void print_dump __P((struct vxsoftc *));
+struct envelope *get_cmd_tail __P((struct vxsoftc *));
struct cfattach vx_ca = {
sizeof(struct vxsoftc), vxmatch, vxattach
@@ -152,7 +168,6 @@ struct cfdriver vx_cd = {
#define VX_UNIT(x) (int)(minor(x) / 9)
#define VX_PORT(x) (int)(minor(x) % 9)
-extern int cputyp;
struct envelope *bpp_wait;
unsigned int board_addr;
@@ -267,9 +282,9 @@ dtr_ctl(sc, port, on)
short
rts_ctl(sc, port, on)
-struct vxsoftc *sc;
-int port;
-int on;
+ struct vxsoftc *sc;
+ int port;
+ int on;
{
struct packet pkt;
bzero(&pkt, sizeof(struct packet));
@@ -289,9 +304,9 @@ int on;
short
flush_ctl(sc, port, which)
-struct vxsoftc *sc;
-int port;
-int which;
+ struct vxsoftc *sc;
+ int port;
+ int which;
{
struct packet pkt;
bzero(&pkt, sizeof(struct packet));
@@ -809,7 +824,7 @@ vxstop(tp, flag)
return 0;
}
-static void
+void
vxputc(sc, port, c)
struct vxsoftc *sc;
int port;
@@ -823,7 +838,8 @@ vxputc(sc, port, c)
return;
}
-u_short vxtspeed(speed)
+u_short
+vxtspeed(speed)
int speed;
{
switch (speed) {
@@ -1323,7 +1339,7 @@ wzero(void *addr, size_t size)
int
create_free_queue(sc)
-struct vxsoftc *sc;
+ struct vxsoftc *sc;
{
int i;
struct envelope *envp;
@@ -1711,4 +1727,3 @@ vx_init(sc)
return 0;
}
}
-