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