1*34406Skarels /* 2*34406Skarels * @(#)psreg.h 7.1 (Berkeley) 05/21/88 3*34406Skarels */ 430224Ssam 530224Ssam #ifndef _PSREG_ 630224Ssam #define _PSREG_ 730224Ssam /* 830224Ssam * PS300 definitions. 930224Ssam */ 1030224Ssam #ifndef KERNEL 1130224Ssam #include <sys/ioctl.h> 1230224Ssam #else 1330224Ssam #include "../h/ioctl.h" 1430224Ssam #endif 1530224Ssam 1630224Ssam struct pslookup { 1730224Ssam int pl_len; /* length of name string */ 1830224Ssam char *pl_name; /* address of name string */ 1930224Ssam u_long pl_addr; /* symbol's address */ 2030224Ssam }; 2130224Ssam 2230224Ssam /* 2330224Ssam * Maximum string which may be supplied for lookup. 2430224Ssam */ 2530224Ssam #define PS_MAXNAMELEN 256 /* must be <= PSMAXDMA */ 2630224Ssam 2730224Ssam /* 2830224Ssam * When doing physical i/o, one may specify the address 2930224Ssam * and whether or not refresh sync should is required with 3030224Ssam * a null iovec descriptor (iov_len = 0). 3130224Ssam */ 3230224Ssam #define PSIO_SYNC 1 /* do physical write w/ refresh sync */ 3330224Ssam 3430224Ssam /* 3530224Ssam * Ioctl requests. 3630224Ssam */ 3733094Sbostic #define PSIOGETERROR _IOR('p', 0, int) /* get last error */ 3833094Sbostic #define PSIOLOOKUP _IOWR('p', 1, struct pslookup) /* do name lookup */ 3933094Sbostic #define PSIORWLOGICAL _IOWR('p', 2, int) /* set i/o mode */ 4030224Ssam 4130224Ssam /* 4230224Ssam * Error codes returned by PSIOGETERROR are either 4330224Ssam * returned by the PS300 or, from the list below, 4430224Ssam * generated by the device driver. 4530224Ssam */ 4630224Ssam #define PSERROR_DIOTIMO 1 /* timeout during dioread/diowrite */ 4730224Ssam #define PSERROR_INVALBC 2 /* invalid byte count for read/write */ 4830224Ssam #define PSERROR_BADADDR 3 /* invalid address for read/write */ 4930224Ssam #define PSERROR_BADCMD 4 /* invalid command in ikstart */ 5030224Ssam #define PSERROR_NAMETIMO 5 /* timeout during nameaddr dioread */ 5130224Ssam #define PSERROR_CMDTIMO 6 /* operation timed out */ 5230224Ssam #endif 53