xref: /original-bsd/sys/stand.att/saio.h (revision b3b53e97)
1 /*	saio.h	4.6	03/30/82	*/
2 
3 /*
4  * header file for standalone package
5  */
6 
7 /*
8  * io block: includes an
9  * inode, cells for the use of seek, etc,
10  * and a buffer.
11  */
12 struct	iob {
13 	char	i_flgs;
14 	struct	inode i_ino;
15 	int	i_unit;
16 	daddr_t	i_boff;
17 	daddr_t	i_cyloff;
18 	off_t	i_offset;
19 	daddr_t	i_bn;
20 	char	*i_ma;
21 	int	i_cc;
22 	char	i_buf[MAXBSIZE];
23 	union {
24 		struct fs ui_fs;
25 		char dummy[SBSIZE];
26 	} i_un;
27 };
28 #define i_fs i_un.ui_fs
29 
30 #define F_READ	01
31 #define F_WRITE	02
32 #define F_ALLOC	04
33 #define F_FILE	010
34 
35 /*
36  * dev switch
37  */
38 struct devsw {
39 	char	*dv_name;
40 	int	(*dv_strategy)();
41 	int	(*dv_open)();
42 	int	(*dv_close)();
43 };
44 
45 struct devsw devsw[];
46 
47 /*
48  * request codes. Must be the same a F_XXX above
49  */
50 #define	READ	1
51 #define	WRITE	2
52 
53 #define	NBUFS	4
54 
55 char	b[NBUFS][MAXBSIZE];
56 daddr_t	blknos[NBUFS];
57 
58 #define NFILES	4
59 struct	iob iob[NFILES];
60 
61 #define	PHYSUBA0	0x20006000
62 #define	PHYSMBA0	0x20010000
63 #define	PHYSMBA1	0x20012000
64 #define	PHYSUMEM	0x2013e000
65