Added prototypes.
This commit is contained in:
parent
f5733259c7
commit
570278ec01
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: com.c,v 1.6 1996/10/13 03:34:42 christos Exp $ */
|
||||
/* $NetBSD: com.c,v 1.7 1997/10/12 18:06:21 oki Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993, 1994, 1995, 1996
|
||||
@ -110,14 +110,23 @@ struct com_softc {
|
||||
|
||||
int comprobe __P((struct device *, void *, void *));
|
||||
void comattach __P((struct device *, struct device *, void *));
|
||||
int comprobe1 __P((int));
|
||||
int comopen __P((dev_t, int, int, struct proc *));
|
||||
int comclose __P((dev_t, int, int, struct proc *));
|
||||
int comread __P((dev_t, struct uio *, int));
|
||||
int comwrite __P((dev_t, struct uio *, int));
|
||||
int comioctl __P((dev_t, u_long, caddr_t, int, struct proc *));
|
||||
struct tty *comtty __P((dev_t));
|
||||
void comstop __P((struct tty *, int));
|
||||
void comdiag __P((void *));
|
||||
int comintr __P((void *));
|
||||
void compoll __P((void *));
|
||||
int comparam __P((struct tty *, struct termios *));
|
||||
void comstart __P((struct tty *));
|
||||
void cominit __P((int, int));
|
||||
int comspeed __P((long));
|
||||
|
||||
static u_char tiocm_xxx2mcr __P((int));
|
||||
|
||||
struct cfattach com_ca = {
|
||||
sizeof(struct com_softc), comprobe, comattach,
|
||||
@ -1111,6 +1120,12 @@ comintr(arg)
|
||||
*/
|
||||
#include <dev/cons.h>
|
||||
|
||||
void comcnprobe __P((struct consdev *));
|
||||
void comcninit __P((struct consdev *));
|
||||
int comcngetc __P((dev_t));
|
||||
void comcnputc __P((dev_t, int));
|
||||
void comcnpollc __P((dev_t, int));
|
||||
|
||||
void
|
||||
comcnprobe(cp)
|
||||
struct consdev *cp;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dmavar.h,v 1.1.1.1 1996/05/05 12:17:03 oki Exp $ */
|
||||
/* $NetBSD: dmavar.h,v 1.2 1997/10/12 18:06:23 oki Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Masanobu Saitoh. All rights reserved.
|
||||
@ -39,6 +39,7 @@
|
||||
#define DMA_BWR 0x02
|
||||
|
||||
int dmarangecheck __P((vm_offset_t, u_long));
|
||||
void x68k_dmastart __P((int, caddr_t, int, int));
|
||||
|
||||
extern caddr_t dma_dataaddr[4]; /* XXX */
|
||||
extern caddr_t dma_bouncebuf[4]; /* XXX */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: grf.c,v 1.5 1996/11/23 09:44:54 oki Exp $ */
|
||||
/* $NetBSD: grf.c,v 1.6 1997/10/12 18:06:23 oki Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -58,6 +58,7 @@
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/conf.h>
|
||||
|
||||
#include <x68k/dev/grfioctl.h>
|
||||
#include <x68k/dev/grfvar.h>
|
||||
@ -93,11 +94,19 @@ int grfdebug = 0;
|
||||
|
||||
struct cfdriver grf_cd;
|
||||
|
||||
cdev_decl(grf);
|
||||
int grfon __P((dev_t));
|
||||
int grfoff __P((dev_t));
|
||||
int grfaddr __P((struct grf_softc *, int));
|
||||
int grfmap __P((dev_t, caddr_t *, struct proc *));
|
||||
int grfunmap __P((dev_t, caddr_t, struct proc *));
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
grfopen(dev, flags)
|
||||
grfopen(dev, flags, mode, p)
|
||||
dev_t dev;
|
||||
int flags;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
{
|
||||
int unit = GRFUNIT(dev);
|
||||
register struct grf_softc *gp = grf_cd.cd_devs[unit];
|
||||
@ -136,9 +145,10 @@ grfopen(dev, flags)
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
grfclose(dev, flags)
|
||||
grfclose(dev, flags, mode, p)
|
||||
dev_t dev;
|
||||
int flags;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
{
|
||||
register struct grf_softc *gp = grf_cd.cd_devs[GRFUNIT(dev)];
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ite.c,v 1.7 1997/01/26 12:17:59 oki Exp $ */
|
||||
/* $NetBSD: ite.c,v 1.8 1997/10/12 18:06:24 oki Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -82,15 +82,36 @@
|
||||
|
||||
struct consdev;
|
||||
|
||||
__inline static void itesendch __P((int));
|
||||
__inline static void alignment_display __P((struct ite_softc *));
|
||||
__inline static void snap_cury __P((struct ite_softc *));
|
||||
__inline static void ite_dnchar __P((struct ite_softc *, int));
|
||||
static void ite_inchar __P((struct ite_softc *, int));
|
||||
__inline static void ite_clrtoeol __P((struct ite_softc *));
|
||||
__inline static void ite_clrtobol __P((struct ite_softc *));
|
||||
__inline static void ite_clrline __P((struct ite_softc *));
|
||||
__inline static void ite_clrtoeos __P((struct ite_softc *));
|
||||
__inline static void ite_clrtobos __P((struct ite_softc *));
|
||||
__inline static void ite_clrscreen __P((struct ite_softc *));
|
||||
__inline static void ite_dnline __P((struct ite_softc *, int));
|
||||
__inline static void ite_inline __P((struct ite_softc *, int));
|
||||
__inline static void ite_index __P((struct ite_softc *));
|
||||
__inline static void ite_lf __P((struct ite_softc *));
|
||||
__inline static void ite_crlf __P((struct ite_softc *));
|
||||
__inline static void ite_cr __P((struct ite_softc *));
|
||||
__inline static void ite_rlf __P((struct ite_softc *));
|
||||
static void iteprecheckwrap __P((struct ite_softc *ip));
|
||||
static void itecheckwrap __P((struct ite_softc *ip));
|
||||
static void repeat_handler __P((void *arg));
|
||||
static int ite_argnum __P((struct ite_softc *ip));
|
||||
static int ite_zargnum __P((struct ite_softc *ip));
|
||||
static void ite_sendstr __P((struct ite_softc *ip, char *str));
|
||||
inline static int atoi __P((const char *cp));
|
||||
inline static char *index __P((const char *cp, char ch));
|
||||
__inline static int atoi __P((const char *cp));
|
||||
__inline static char *index __P((const char *cp, char ch));
|
||||
void ite_reset __P((struct ite_softc *ip));
|
||||
struct ite_softc *getitesp __P((dev_t));
|
||||
int iteon __P((dev_t, int));
|
||||
void iteoff __P((dev_t, int));
|
||||
|
||||
struct itesw itesw[] = {
|
||||
0, tv_init, tv_deinit, 0,
|
||||
@ -120,6 +141,8 @@ u_char cons_tabs[MAX_TABS];
|
||||
|
||||
int kbd_init;
|
||||
|
||||
cdev_decl(ite);
|
||||
|
||||
void itestart __P((struct tty *tp));
|
||||
|
||||
void iteputchar __P((int c, struct ite_softc *ip));
|
||||
@ -596,7 +619,7 @@ ite_reset(ip)
|
||||
|
||||
/* Used in console at startup only */
|
||||
int
|
||||
itecnfilter(c, caller)
|
||||
ite_cnfilter(c, caller)
|
||||
u_char c;
|
||||
enum caller caller;
|
||||
{
|
||||
@ -725,7 +748,7 @@ repeat_handler (arg)
|
||||
add_sicallback(ite_filter, last_char, ITEFILT_REPEATER);
|
||||
}
|
||||
|
||||
inline static void
|
||||
__inline static void
|
||||
itesendch (ch)
|
||||
int ch;
|
||||
{
|
||||
@ -972,7 +995,7 @@ ite_filter(c, caller)
|
||||
}
|
||||
|
||||
/* helper functions, makes the code below more readable */
|
||||
inline static void
|
||||
__inline static void
|
||||
ite_sendstr (ip, str)
|
||||
struct ite_softc *ip;
|
||||
char *str;
|
||||
@ -981,7 +1004,7 @@ ite_sendstr (ip, str)
|
||||
itesendch (*str++);
|
||||
}
|
||||
|
||||
inline static void
|
||||
__inline static void
|
||||
alignment_display(ip)
|
||||
struct ite_softc *ip;
|
||||
{
|
||||
@ -993,7 +1016,7 @@ alignment_display(ip)
|
||||
attrclr(ip, 0, 0, ip->rows, ip->cols);
|
||||
}
|
||||
|
||||
inline static void
|
||||
__inline static void
|
||||
snap_cury(ip)
|
||||
struct ite_softc *ip;
|
||||
{
|
||||
@ -1005,7 +1028,7 @@ snap_cury(ip)
|
||||
}
|
||||
}
|
||||
|
||||
inline static void
|
||||
__inline static void
|
||||
ite_dnchar(ip, n)
|
||||
struct ite_softc *ip;
|
||||
int n;
|
||||
@ -1040,7 +1063,7 @@ ite_inchar(ip, n)
|
||||
ip->save_char = c;
|
||||
}
|
||||
|
||||
inline static void
|
||||
__inline static void
|
||||
ite_clrtoeol(ip)
|
||||
struct ite_softc *ip;
|
||||
{
|
||||
@ -1051,7 +1074,7 @@ ite_clrtoeol(ip)
|
||||
}
|
||||
}
|
||||
|
||||
inline static void
|
||||
__inline static void
|
||||
ite_clrtobol(ip)
|
||||
struct ite_softc *ip;
|
||||
{
|
||||
@ -1060,7 +1083,7 @@ ite_clrtobol(ip)
|
||||
attrclr(ip, y, 0, 1, x);
|
||||
}
|
||||
|
||||
inline static void
|
||||
__inline static void
|
||||
ite_clrline(ip)
|
||||
struct ite_softc *ip;
|
||||
{
|
||||
@ -1069,7 +1092,7 @@ ite_clrline(ip)
|
||||
attrclr(ip, y, 0, 1, ip->cols);
|
||||
}
|
||||
|
||||
inline static void
|
||||
__inline static void
|
||||
ite_clrtoeos(ip)
|
||||
struct ite_softc *ip;
|
||||
{
|
||||
@ -1080,7 +1103,7 @@ ite_clrtoeos(ip)
|
||||
}
|
||||
}
|
||||
|
||||
inline static void
|
||||
__inline static void
|
||||
ite_clrtobos(ip)
|
||||
struct ite_softc *ip;
|
||||
{
|
||||
@ -1091,7 +1114,7 @@ ite_clrtobos(ip)
|
||||
}
|
||||
}
|
||||
|
||||
inline static void
|
||||
__inline static void
|
||||
ite_clrscreen(ip)
|
||||
struct ite_softc *ip;
|
||||
{
|
||||
@ -1101,7 +1124,7 @@ ite_clrscreen(ip)
|
||||
|
||||
|
||||
|
||||
inline static void
|
||||
__inline static void
|
||||
ite_dnline(ip, n)
|
||||
struct ite_softc *ip;
|
||||
int n;
|
||||
@ -1123,7 +1146,7 @@ ite_dnline(ip, n)
|
||||
attrclr(ip, ip->bottom_margin - n + 1, 0, n, ip->cols);
|
||||
}
|
||||
|
||||
inline static void
|
||||
__inline static void
|
||||
ite_inline(ip, n)
|
||||
struct ite_softc *ip;
|
||||
int n;
|
||||
@ -1148,7 +1171,7 @@ ite_inline(ip, n)
|
||||
ip->curx = 0;
|
||||
}
|
||||
|
||||
inline static void
|
||||
__inline static void
|
||||
ite_index (ip)
|
||||
struct ite_softc *ip;
|
||||
{
|
||||
@ -1161,7 +1184,7 @@ ite_index (ip)
|
||||
/*clr_attr(ip, ATTR_INV);*/
|
||||
}
|
||||
|
||||
inline static void
|
||||
__inline static void
|
||||
ite_lf (ip)
|
||||
struct ite_softc *ip;
|
||||
{
|
||||
@ -1184,7 +1207,7 @@ ite_lf (ip)
|
||||
ip->save_char = 0;
|
||||
}
|
||||
|
||||
inline static void
|
||||
__inline static void
|
||||
ite_crlf (ip)
|
||||
struct ite_softc *ip;
|
||||
{
|
||||
@ -1192,7 +1215,7 @@ ite_crlf (ip)
|
||||
ite_lf (ip);
|
||||
}
|
||||
|
||||
inline static void
|
||||
__inline static void
|
||||
ite_cr (ip)
|
||||
struct ite_softc *ip;
|
||||
{
|
||||
@ -1201,7 +1224,7 @@ ite_cr (ip)
|
||||
}
|
||||
}
|
||||
|
||||
inline static void
|
||||
__inline static void
|
||||
ite_rlf (ip)
|
||||
struct ite_softc *ip;
|
||||
{
|
||||
@ -1214,7 +1237,7 @@ ite_rlf (ip)
|
||||
clr_attr(ip, ATTR_INV);
|
||||
}
|
||||
|
||||
inline static int
|
||||
__inline static int
|
||||
atoi (cp)
|
||||
const char *cp;
|
||||
{
|
||||
@ -1225,7 +1248,7 @@ atoi (cp)
|
||||
return n;
|
||||
}
|
||||
|
||||
inline static char *
|
||||
__inline static char *
|
||||
index(cp, ch)
|
||||
const char *cp;
|
||||
char ch;
|
||||
@ -1235,7 +1258,7 @@ index(cp, ch)
|
||||
return *cp ? (char *) cp : 0;
|
||||
}
|
||||
|
||||
inline static int
|
||||
__inline static int
|
||||
ite_argnum (ip)
|
||||
struct ite_softc *ip;
|
||||
{
|
||||
@ -1253,7 +1276,7 @@ ite_argnum (ip)
|
||||
return n;
|
||||
}
|
||||
|
||||
inline static int
|
||||
__inline static int
|
||||
ite_zargnum (ip)
|
||||
struct ite_softc *ip;
|
||||
{
|
||||
@ -2502,7 +2525,7 @@ itecngetc(dev)
|
||||
}
|
||||
do {
|
||||
c = kbdgetcn();
|
||||
c = itecnfilter(c, ITEFILT_CONSOLE);
|
||||
c = ite_cnfilter(c, ITEFILT_CONSOLE);
|
||||
} while (c == -1);
|
||||
return (c);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: opm.c,v 1.2 1996/05/21 15:32:34 oki Exp $ */
|
||||
/* $NetBSD: opm.c,v 1.3 1997/10/12 18:06:25 oki Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Masanobu Saitoh, Takuya Harakawa.
|
||||
@ -47,10 +47,18 @@
|
||||
static u_char opmreg[0x100];
|
||||
static struct opm_voice vdata[8];
|
||||
|
||||
void opm_set_voice(int, struct opm_voice *);
|
||||
void opm_set_voice_sub(int, struct opm_operator *);
|
||||
void opm_set_volume __P((int, int));
|
||||
void opm_set_key __P((int, int));
|
||||
void opm_set_voice __P((int, struct opm_voice *));
|
||||
void opm_set_voice_sub __P((int, struct opm_operator *));
|
||||
__inline static void writeopm __P((int, int));
|
||||
__inline static int readopm __P((int));
|
||||
void opm_key_on __P((u_char));
|
||||
void opm_key_off __P((u_char));
|
||||
int opmopen __P((dev_t, int, int));
|
||||
int opmclose __P((dev_t));
|
||||
|
||||
static inline void
|
||||
__inline static void
|
||||
writeopm(reg, dat)
|
||||
int reg, dat;
|
||||
{
|
||||
@ -60,7 +68,7 @@ writeopm(reg, dat)
|
||||
OPM.data = opmreg[reg] = dat;
|
||||
}
|
||||
|
||||
static inline int
|
||||
__inline static int
|
||||
readopm(reg)
|
||||
int reg;
|
||||
{
|
||||
@ -83,7 +91,7 @@ fdc_force_ready(rdy)
|
||||
|
||||
void
|
||||
opm_key_on(channel)
|
||||
u_char channel;
|
||||
u_char channel;
|
||||
{
|
||||
writeopm(0x08, vdata[channel].sm << 3 | channel);
|
||||
}
|
||||
@ -173,6 +181,7 @@ opm_set_key(channel, tone)
|
||||
int
|
||||
opmopen(dev, flag, mode)
|
||||
dev_t dev;
|
||||
int flag, mode;
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: zs.c,v 1.6 1996/10/13 03:35:10 christos Exp $ */
|
||||
/* $NetBSD: zs.c,v 1.7 1997/10/12 18:06:26 oki Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -134,6 +134,8 @@ int zssoft __P((void *));
|
||||
struct zs_chanstate *zslist;
|
||||
|
||||
/* Routines called from other code. */
|
||||
cdev_decl(zs);
|
||||
|
||||
static void zsiopen __P((struct tty *));
|
||||
static void zsiclose __P((struct tty *));
|
||||
static void zsstart __P((struct tty *));
|
||||
@ -149,6 +151,10 @@ static void zs_reset __P((volatile struct zschan *, int, int));
|
||||
static void zs_modem __P((struct zs_chanstate *, int));
|
||||
static void zs_loadchannelregs __P((volatile struct zschan *, u_char *));
|
||||
static void zsabort __P((void));
|
||||
static int zsrint __P((struct zs_chanstate *, volatile struct zschan *));
|
||||
static int zsxint __P((struct zs_chanstate *, volatile struct zschan *));
|
||||
static int zssint __P((struct zs_chanstate *, volatile struct zschan *));
|
||||
static void zsoverrun __P((int, long *, char *));
|
||||
|
||||
/* Console stuff. */
|
||||
static struct tty *zs_ctty; /* console `struct tty *' */
|
||||
@ -170,10 +176,13 @@ static volatile struct zsdevice *zsaddr[NZS]; /* XXX, but saves work */
|
||||
int zshardscope;
|
||||
int zsshortcuts; /* number of "shortcut" software interrupts */
|
||||
|
||||
static u_char
|
||||
static u_int zs_read __P((volatile struct zschan *, u_int reg));
|
||||
static u_int zs_write __P((volatile struct zschan *, u_int, u_int));
|
||||
|
||||
static u_int
|
||||
zs_read(zc, reg)
|
||||
volatile struct zschan *zc;
|
||||
u_char reg;
|
||||
u_int reg;
|
||||
{
|
||||
u_char val;
|
||||
|
||||
@ -184,10 +193,10 @@ zs_read(zc, reg)
|
||||
return val;
|
||||
}
|
||||
|
||||
static u_char
|
||||
static u_int
|
||||
zs_write(zc, reg, val)
|
||||
volatile struct zschan *zc;
|
||||
u_char reg, val;
|
||||
u_int reg, val;
|
||||
{
|
||||
zc->zc_csr = reg;
|
||||
ZS_DELAY();
|
||||
@ -362,40 +371,6 @@ zs_reset(zc, inten, speed)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Declare the given tty (which is in fact &cons) as a console input
|
||||
* or output. This happens before the zs chip is attached; the hookup
|
||||
* is finished later, in zs_setcons() below.
|
||||
*
|
||||
* This is used only for ports a and b. The console keyboard is decoded
|
||||
* independently (we always send unit-2 input to /dev/kbd, which will
|
||||
* direct it to /dev/console if appropriate).
|
||||
*/
|
||||
void
|
||||
zsconsole(tp, unit, out, fnstop)
|
||||
register struct tty *tp;
|
||||
register int unit;
|
||||
int out;
|
||||
void (**fnstop) __P((struct tty *, int));
|
||||
{
|
||||
int zs;
|
||||
volatile struct zsdevice *addr;
|
||||
|
||||
if (out) {
|
||||
zs_consout = unit;
|
||||
zs = unit >> 1;
|
||||
if ((addr = zsaddr[zs]) == NULL)
|
||||
addr = zsaddr[zs] = findzs(zs);
|
||||
zs_conschan = (unit & 1) == 0 ? &addr->zs_chan[ZS_CHAN_A] :
|
||||
&addr->zs_chan[ZS_CHAN_B];
|
||||
v_putc = zscnputc;
|
||||
} else
|
||||
zs_consin = unit;
|
||||
if (fnstop)
|
||||
*fnstop = &zsstop;
|
||||
zs_ctty = tp;
|
||||
}
|
||||
|
||||
/*
|
||||
* Polled console output putchar.
|
||||
*/
|
||||
@ -732,51 +707,46 @@ zshard(intrarg)
|
||||
#define b (a + 1)
|
||||
register volatile struct zschan *zc;
|
||||
register int rr3, intflags = 0, v, i;
|
||||
static int zsrint __P((struct zs_chanstate *, volatile struct zschan *));
|
||||
static int zsxint __P((struct zs_chanstate *, volatile struct zschan *));
|
||||
static int zssint __P((struct zs_chanstate *, volatile struct zschan *));
|
||||
|
||||
{
|
||||
a = &((struct zs_softc*)zs_cd.cd_devs[(intrarg >> 2) & 0x0f])->zi_cs[0];
|
||||
rr3 = ZS_READ(a->cs_zc, 3);
|
||||
if (rr3 & (ZSRR3_IP_A_RX|ZSRR3_IP_A_TX|ZSRR3_IP_A_STAT)) {
|
||||
intflags |= 2;
|
||||
zc = a->cs_zc;
|
||||
i = a->cs_rbput;
|
||||
if (rr3 & ZSRR3_IP_A_RX && (v = zsrint(a, zc)) != 0) {
|
||||
a->cs_rbuf[i++ & ZLRB_RING_MASK] = v;
|
||||
intflags |= 1;
|
||||
}
|
||||
if (rr3 & ZSRR3_IP_A_TX && (v = zsxint(a, zc)) != 0) {
|
||||
a->cs_rbuf[i++ & ZLRB_RING_MASK] = v;
|
||||
intflags |= 1;
|
||||
intflags |= 4;
|
||||
}
|
||||
if (rr3 & ZSRR3_IP_A_STAT && (v = zssint(a, zc)) != 0) {
|
||||
a->cs_rbuf[i++ & ZLRB_RING_MASK] = v;
|
||||
intflags |= 1;
|
||||
}
|
||||
a->cs_rbput = i;
|
||||
a = &((struct zs_softc*)zs_cd.cd_devs[(intrarg >> 2) & 0x0f])->zi_cs[0];
|
||||
rr3 = ZS_READ(a->cs_zc, 3);
|
||||
if (rr3 & (ZSRR3_IP_A_RX|ZSRR3_IP_A_TX|ZSRR3_IP_A_STAT)) {
|
||||
intflags |= 2;
|
||||
zc = a->cs_zc;
|
||||
i = a->cs_rbput;
|
||||
if (rr3 & ZSRR3_IP_A_RX && (v = zsrint(a, zc)) != 0) {
|
||||
a->cs_rbuf[i++ & ZLRB_RING_MASK] = v;
|
||||
intflags |= 1;
|
||||
}
|
||||
if (rr3 & (ZSRR3_IP_B_RX|ZSRR3_IP_B_TX|ZSRR3_IP_B_STAT)) {
|
||||
intflags |= 2;
|
||||
zc = b->cs_zc;
|
||||
i = b->cs_rbput;
|
||||
if (rr3 & ZSRR3_IP_B_RX && (v = zsrint(b, zc)) != 0) {
|
||||
b->cs_rbuf[i++ & ZLRB_RING_MASK] = v;
|
||||
intflags |= 1;
|
||||
}
|
||||
if (rr3 & ZSRR3_IP_B_TX && (v = zsxint(b, zc)) != 0) {
|
||||
b->cs_rbuf[i++ & ZLRB_RING_MASK] = v;
|
||||
intflags |= 1;
|
||||
intflags |= 4;
|
||||
}
|
||||
if (rr3 & ZSRR3_IP_B_STAT && (v = zssint(b, zc)) != 0) {
|
||||
b->cs_rbuf[i++ & ZLRB_RING_MASK] = v;
|
||||
intflags |= 1;
|
||||
}
|
||||
b->cs_rbput = i;
|
||||
if (rr3 & ZSRR3_IP_A_TX && (v = zsxint(a, zc)) != 0) {
|
||||
a->cs_rbuf[i++ & ZLRB_RING_MASK] = v;
|
||||
intflags |= 1;
|
||||
intflags |= 4;
|
||||
}
|
||||
if (rr3 & ZSRR3_IP_A_STAT && (v = zssint(a, zc)) != 0) {
|
||||
a->cs_rbuf[i++ & ZLRB_RING_MASK] = v;
|
||||
intflags |= 1;
|
||||
}
|
||||
a->cs_rbput = i;
|
||||
}
|
||||
if (rr3 & (ZSRR3_IP_B_RX|ZSRR3_IP_B_TX|ZSRR3_IP_B_STAT)) {
|
||||
intflags |= 2;
|
||||
zc = b->cs_zc;
|
||||
i = b->cs_rbput;
|
||||
if (rr3 & ZSRR3_IP_B_RX && (v = zsrint(b, zc)) != 0) {
|
||||
b->cs_rbuf[i++ & ZLRB_RING_MASK] = v;
|
||||
intflags |= 1;
|
||||
}
|
||||
if (rr3 & ZSRR3_IP_B_TX && (v = zsxint(b, zc)) != 0) {
|
||||
b->cs_rbuf[i++ & ZLRB_RING_MASK] = v;
|
||||
intflags |= 1;
|
||||
intflags |= 4;
|
||||
}
|
||||
if (rr3 & ZSRR3_IP_B_STAT && (v = zssint(b, zc)) != 0) {
|
||||
b->cs_rbuf[i++ & ZLRB_RING_MASK] = v;
|
||||
intflags |= 1;
|
||||
}
|
||||
b->cs_rbput = i;
|
||||
}
|
||||
#undef b
|
||||
if (intflags & 1) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.19 1997/10/10 17:43:25 oki Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.20 1997/10/12 18:12:51 oki Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -90,12 +90,15 @@
|
||||
#define MAXMEM 64*1024*CLSIZE /* XXX - from cmap.h */
|
||||
#include <vm/vm_kern.h>
|
||||
|
||||
#include <sys/device.h>
|
||||
#include <x68k/x68k/iodevice.h>
|
||||
|
||||
void initcpu __P((void));
|
||||
void identifycpu __P((void));
|
||||
void doboot __P((void))
|
||||
__attribute__((__noreturn__));
|
||||
int badaddr __P((caddr_t));
|
||||
int badbaddr __P((caddr_t));
|
||||
|
||||
/* the following is used externally (sysctl_hw) */
|
||||
char machine[] = MACHINE; /* from <machine/param.h> */
|
||||
@ -139,6 +142,16 @@ extern short exframesize[];
|
||||
extern struct emul emul_hpux;
|
||||
#endif
|
||||
|
||||
/* prototypes for local functions */
|
||||
void identifycpu __P((void));
|
||||
void initcpu __P((void));
|
||||
|
||||
/* functions called from locore.s */
|
||||
void dumpsys __P((void));
|
||||
void straytrap __P((int, u_short));
|
||||
void nmihand __P((struct frame));
|
||||
void intrhand __P((int));
|
||||
|
||||
/*
|
||||
* Console initialization: called early on from main,
|
||||
* before vm init or startup. Do enough configuration
|
||||
@ -1059,6 +1072,8 @@ cpu_dumpconf()
|
||||
#define BYTES_PER_DUMP NBPG /* Must be a multiple of pagesize XXX small */
|
||||
static vm_offset_t dumpspace;
|
||||
|
||||
vm_offset_t reserve_dumppages __P((vm_offset_t));
|
||||
|
||||
vm_offset_t
|
||||
reserve_dumppages(p)
|
||||
vm_offset_t p;
|
||||
@ -1068,6 +1083,9 @@ reserve_dumppages(p)
|
||||
}
|
||||
|
||||
#ifdef MACHINE_NONCONTIG
|
||||
static int find_range __P((vm_offset_t));
|
||||
static int find_next_range __P((vm_offset_t));
|
||||
|
||||
static int
|
||||
find_range(pa)
|
||||
vm_offset_t pa;
|
||||
@ -1312,17 +1330,23 @@ badbaddr(addr)
|
||||
/*
|
||||
* XXX Why on earth isn't this in a common file?!
|
||||
*/
|
||||
void netintr __P((void));
|
||||
void arpintr __P((void));
|
||||
void atintr __P((void));
|
||||
void ipintr __P((void));
|
||||
void nsintr __P((void));
|
||||
void clnintr __P((void));
|
||||
void ccittintr __P((void));
|
||||
void pppintr __P((void));
|
||||
|
||||
void
|
||||
netintr()
|
||||
{
|
||||
#ifdef INET
|
||||
#include "ether.h"
|
||||
#if NETHER > 0
|
||||
if (netisr & (1 << NETISR_ARP)) {
|
||||
netisr &= ~(1 << NETISR_ARP);
|
||||
arpintr();
|
||||
}
|
||||
#endif
|
||||
if (netisr & (1 << NETISR_IP)) {
|
||||
netisr &= ~(1 << NETISR_IP);
|
||||
ipintr();
|
||||
@ -1379,6 +1403,9 @@ struct si_callback {
|
||||
|
||||
static struct si_callback *si_callbacks = 0;
|
||||
|
||||
void add_sicallback __P((void (*)(void *, void *), void *, void *));
|
||||
void rem_sicallback __P((void (*)(void *, void *)));
|
||||
|
||||
void
|
||||
add_sicallback (function, rock1, rock2)
|
||||
void (*function) __P((void *rock1, void *rock2));
|
||||
@ -1445,6 +1472,7 @@ intrhand(sr)
|
||||
int panicbutton = 1; /* non-zero if panic buttons are enabled */
|
||||
int crashandburn = 0;
|
||||
int candbdelay = 50; /* give em half a second */
|
||||
void candbtimer __P((void *));
|
||||
|
||||
void
|
||||
candbtimer(arg)
|
||||
|
Loading…
Reference in New Issue
Block a user