xref: /original-bsd/sys/tahoe/vba/psreg.h (revision 0dce6c9d)
1 /*
2  * Copyright (c) 1986 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)psreg.h	7.5 (Berkeley) 12/16/90
8  */
9 
10 #ifndef _PSREG_
11 #define _PSREG_
12 /*
13  * PS300 definitions.
14  */
15 #include <sys/ioctl.h>
16 
17 struct  pslookup {
18         int     pl_len;                 /* length of name string */
19         char    *pl_name;               /* address of name string */
20         u_long  pl_addr;                /* symbol's address */
21 };
22 
23 /*
24  * Maximum string which may be supplied for lookup.
25  */
26 #define PS_MAXNAMELEN   256             /* must be <= PSMAXDMA */
27 
28 /*
29  * When doing physical i/o, one may specify the address
30  * and whether or not refresh sync should is required with
31  * a null iovec descriptor (iov_len = 0).
32  */
33 #define PSIO_SYNC       1               /* do physical write w/ refresh sync */
34 
35 /*
36  * Ioctl requests.
37  */
38 #define PSIOGETERROR    _IOR('p', 0, int)                 /* get last error */
39 #define PSIOLOOKUP      _IOWR('p', 1, struct pslookup)    /* do name lookup */
40 #define PSIORWLOGICAL   _IOWR('p', 2, int)                /* set i/o mode */
41 
42 /*
43  * Error codes returned by PSIOGETERROR are either
44  * returned by the PS300 or, from the list below,
45  * generated by the device driver.
46  */
47 #define PSERROR_DIOTIMO         1       /* timeout during dioread/diowrite */
48 #define PSERROR_INVALBC         2       /* invalid byte count for read/write */
49 #define PSERROR_BADADDR         3       /* invalid address for read/write */
50 #define PSERROR_BADCMD          4       /* invalid command in ikstart */
51 #define PSERROR_NAMETIMO        5       /* timeout during nameaddr dioread */
52 #define PSERROR_CMDTIMO         6       /* operation timed out */
53 #endif
54