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