add CCI credit, rm unneeded wakup; how can 2 closes
[unix-history] / usr / src / sys / tahoe / vba / psreg.h
CommitLineData
430f81c3
MK
1/*
2 * @(#)psreg.h 7.1 (Berkeley) %G%
3 */
a994cc4f
SL
4
5#ifndef _PSREG_
6#define _PSREG_
7/*
8 * PS300 definitions.
9 */
10#ifndef KERNEL
11#include <sys/ioctl.h>
12#else
13#include "../h/ioctl.h"
14#endif
15
16struct pslookup {
17 int pl_len; /* length of name string */
18 char *pl_name; /* address of name string */
19 u_long pl_addr; /* symbol's address */
20};
21
22/*
23 * Maximum string which may be supplied for lookup.
24 */
25#define PS_MAXNAMELEN 256 /* must be <= PSMAXDMA */
26
27/*
28 * When doing physical i/o, one may specify the address
29 * and whether or not refresh sync should is required with
30 * a null iovec descriptor (iov_len = 0).
31 */
32#define PSIO_SYNC 1 /* do physical write w/ refresh sync */
33
34/*
35 * Ioctl requests.
36 */
11c1813d
KB
37#define PSIOGETERROR _IOR('p', 0, int) /* get last error */
38#define PSIOLOOKUP _IOWR('p', 1, struct pslookup) /* do name lookup */
39#define PSIORWLOGICAL _IOWR('p', 2, int) /* set i/o mode */
a994cc4f
SL
40
41/*
42 * Error codes returned by PSIOGETERROR are either
43 * returned by the PS300 or, from the list below,
44 * generated by the device driver.
45 */
46#define PSERROR_DIOTIMO 1 /* timeout during dioread/diowrite */
47#define PSERROR_INVALBC 2 /* invalid byte count for read/write */
48#define PSERROR_BADADDR 3 /* invalid address for read/write */
49#define PSERROR_BADCMD 4 /* invalid command in ikstart */
50#define PSERROR_NAMETIMO 5 /* timeout during nameaddr dioread */
51#define PSERROR_CMDTIMO 6 /* operation timed out */
52#endif