xref: /csrg-svn/sys/tahoe/vba/psreg.h (revision 44534)
134406Skarels /*
235514Sbostic  * Copyright (c) 1986 The Regents of the University of California.
335514Sbostic  * All rights reserved.
435514Sbostic  *
5*44534Sbostic  * %sccs.include.redist.c%
635514Sbostic  *
7*44534Sbostic  *	@(#)psreg.h	7.4 (Berkeley) 06/28/90
834406Skarels  */
930224Ssam 
1030224Ssam #ifndef _PSREG_
1130224Ssam #define _PSREG_
1230224Ssam /*
1330224Ssam  * PS300 definitions.
1430224Ssam  */
1530224Ssam #ifndef KERNEL
1630224Ssam #include <sys/ioctl.h>
1730224Ssam #else
1837752Smckusick #include "ioctl.h"
1930224Ssam #endif
2030224Ssam 
2130224Ssam struct  pslookup {
2230224Ssam         int     pl_len;                 /* length of name string */
2330224Ssam         char    *pl_name;               /* address of name string */
2430224Ssam         u_long  pl_addr;                /* symbol's address */
2530224Ssam };
2630224Ssam 
2730224Ssam /*
2830224Ssam  * Maximum string which may be supplied for lookup.
2930224Ssam  */
3030224Ssam #define PS_MAXNAMELEN   256             /* must be <= PSMAXDMA */
3130224Ssam 
3230224Ssam /*
3330224Ssam  * When doing physical i/o, one may specify the address
3430224Ssam  * and whether or not refresh sync should is required with
3530224Ssam  * a null iovec descriptor (iov_len = 0).
3630224Ssam  */
3730224Ssam #define PSIO_SYNC       1               /* do physical write w/ refresh sync */
3830224Ssam 
3930224Ssam /*
4030224Ssam  * Ioctl requests.
4130224Ssam  */
4233094Sbostic #define PSIOGETERROR    _IOR('p', 0, int)                 /* get last error */
4333094Sbostic #define PSIOLOOKUP      _IOWR('p', 1, struct pslookup)    /* do name lookup */
4433094Sbostic #define PSIORWLOGICAL   _IOWR('p', 2, int)                /* set i/o mode */
4530224Ssam 
4630224Ssam /*
4730224Ssam  * Error codes returned by PSIOGETERROR are either
4830224Ssam  * returned by the PS300 or, from the list below,
4930224Ssam  * generated by the device driver.
5030224Ssam  */
5130224Ssam #define PSERROR_DIOTIMO         1       /* timeout during dioread/diowrite */
5230224Ssam #define PSERROR_INVALBC         2       /* invalid byte count for read/write */
5330224Ssam #define PSERROR_BADADDR         3       /* invalid address for read/write */
5430224Ssam #define PSERROR_BADCMD          4       /* invalid command in ikstart */
5530224Ssam #define PSERROR_NAMETIMO        5       /* timeout during nameaddr dioread */
5630224Ssam #define PSERROR_CMDTIMO         6       /* operation timed out */
5730224Ssam #endif
58