summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k/include/bugio.h
blob: 0bb026958dc32f17d052bbef5da57d1b96016247 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#include "sys/cdefs.h"

struct bugdisk_io {
	char	clun;
	char	dlun;
	short	status;
	void	*addr;
	int	blkno;
#define	fileno	blkno
	short	nblks;
	char	flag;
#define	FILEMARKFLAG	0x80
#define	IGNOREFILENO	0x02
#define	ENDOFFILE	0x01
	char	am;
};	

/* values are in BCD {upper nibble+lower nibble} */

struct bugrtc {
	unsigned char	Y;
	unsigned char	M;
	unsigned char	D;
	unsigned char	d;
	unsigned char	H;
	unsigned char	m;
	unsigned char	s;
	unsigned char	c;
};

/* Board ID - lots of info */

struct bugbrdid {
	unsigned char	eye[4];
	char	rev;
	char	month;
	char	day;
	char	year;
	short	packetsize;
	short	dummy;
	short	brdno;
	unsigned char	brdsuf[2];
	char	options[3];
	char	family:4;
	char	cpu:4;
	short	clun;
	short	dlun;
	short	type;
	short	dev;
	int	option;
};

struct bugniocall {
	unsigned char clun;
	unsigned char dlun;
	unsigned char ci;
	unsigned char cd;
#define	NETCTRL_INITDEVICE	0
#define	NETCTRL_GETHDW		1
#define	NETCTRL_TX		2
#define	NETCTRL_RX		3
#define	NETCTRL_FLUSH		4
#define	NETCTRL_RESET		5
	unsigned int  cid;
	unsigned int  memaddr;
	unsigned int  nbytes;
	unsigned int  csword;
};

char buginchr	__P((void));
int buginstat	__P((void));
int bugoutchr	__P((unsigned char));
int bugoutstr	__P((char *, char *));
int bugpcrlf	__P((void));
int bugdskrd	__P((struct bugdisk_io *));
int bugdskwr	__P((struct bugdisk_io *));
int bugrtcrd	__P((struct bugrtc *));
int bugreturn	__P((void));
int bugbrdid	__P((struct bugbrdid *));
int bugnetctrl	__P((struct bugniocall *));