xref: /csrg-svn/sys/vax/uba/npreg.h (revision 26267)
126200Ssklower /*
2*26267Ssklower  * Copyright (c) 1986 MICOM-Interlan, Inc., Boxborough Mass
3*26267Ssklower  * All rights reserved.  The Berkeley software License Agreement
4*26267Ssklower  * specifies the terms and conditions for redistribution.
526200Ssklower  *
6*26267Ssklower  *	@(#)npreg.h	6.2 (Berkeley) 02/20/86
726200Ssklower  */
826200Ssklower 
926200Ssklower /*
1026200Ssklower  *			NPREG.H
1126200Ssklower  *
1226200Ssklower  * This file contain definitions of specific hardware interest
1326200Ssklower  * to be used when communicating with the NI1510 Network Processor
1426200Ssklower  * Board. More complete information can be found in the NI1510
1526200Ssklower  * Multibus compatible Ethernet Communications Processor Hardware
1626200Ssklower  * Specification.
1726200Ssklower  */
1826200Ssklower 
1926200Ssklower 
2026200Ssklower #define NNPCNN		4	/* Number of connections per board */
2126200Ssklower #define NPUNIT(a)	((minor(a) >> 4) & 0x0F)
2226200Ssklower #define NPCONN(a)	((minor(a)) & 0x03)
2326200Ssklower 
2426200Ssklower #define TRUE		1
2526200Ssklower #define FALSE		0
2626200Ssklower 
2726200Ssklower #define IBOOTADDR	0xF8000l	/* Addr of 80186 Boot ROM */
2826200Ssklower #define	INETBOOT	0xF8087l
2926200Ssklower #define IXEQADDR	0x400		/* Where to begin Board image XEQ */
3026200Ssklower #define DIAGTIME	1200		/* Time for timeout /HZ seconds */
3126200Ssklower 
3226200Ssklower #define	DELAYTIME	1000000L		/* delay count */
3326200Ssklower #define NPDELAY(N)	{register int n = (N) >> 1; while(--n > 0); }
3426200Ssklower 
3526200Ssklower /* Handy macros for talking to the Board */
3626200Ssklower 
3726200Ssklower #define RESET(x) 	(WCSR3(x->iobase,0xff))
3826200Ssklower #define CLEARINT(x)	{unsign16 y; y = RCSR2(x->iobase); }
3926200Ssklower #define INTNI(x)	(WCSR1(x->iobase,0xFF))
4026200Ssklower 
4126200Ssklower /* Command and Status Register (CSR) Definitions */
4226200Ssklower 
4326200Ssklower /*
4426200Ssklower  * CSR0 is the only direct means for data transfer between the host processor
4526200Ssklower  * and the 3510. Access is controlled by the 80186 who sets the CSR1 Enable and
4626200Ssklower  * Ready bits to allow writing here. Writing to this register will always
4726200Ssklower  * result in an interrupt to the 80186.
4826200Ssklower  */
4926200Ssklower 
5026200Ssklower /*
5126200Ssklower  * Bit definitions for CSR1.
5226200Ssklower  */
5326200Ssklower 
5426200Ssklower #define NPRFU	0x01		/* Reserved for Future Use */
5526200Ssklower #define NPHOK	0x02		/* Hardware OK */
5626200Ssklower #define NPLAN	0x04		/* Logic 0 indicates operational LAN exists */
5726200Ssklower #define NP_IP	0x08		/* Interrupt pending from this board */
5826200Ssklower #define NP_IE	0x10		/* Interrupts enabled for this board */
5926200Ssklower #define NPRDR	0x20		/* Set when 80186 writes data into CSR0 */
6026200Ssklower #define NPRDY	0x40		/* CSR0 ready to accept data */
6126200Ssklower #define NPENB	0x80		/* CSR0 available for use by the host */
6226200Ssklower 
6326200Ssklower /*
6426200Ssklower  * Bit defintions for CSR0 Command Block
6526200Ssklower  */
6626200Ssklower 
6726200Ssklower #define NPLST	0x20		/* Last Command */
6826200Ssklower #define NPCMD	0x80		/* Shared Memory Address */
6926200Ssklower #define NPBGN	0x200		/* Begin Execution in On-Board Memory */
7026200Ssklower #define NPCBI	0x800		/* Interrupt at completion of Command Block */
7126200Ssklower #define NPDMP	0x2000		/* Dump 80186 On-Board Memory to Multibus */
7226200Ssklower #define NPLD	0x8000		/* Load 80186 On-board Memory from Multibus */
7326200Ssklower 
7426200Ssklower /*
7526200Ssklower  * CSR0 Count definitions. These are the lengths of the Command Blocks for the
7626200Ssklower  * CSR0 commands above (not counting the Command Word itself).
7726200Ssklower  */
7826200Ssklower 
7926200Ssklower #define LSTCNT	0
8026200Ssklower #define CMDCNT	2
8126200Ssklower #define BGNCNT	2
8226200Ssklower #define CBICNT	1
8326200Ssklower #define DMPCNT	5
8426200Ssklower #define LDCNT	5
8526200Ssklower #define IOCNT	5
8626200Ssklower 
8726200Ssklower /* Macros for reading and writing CSR's (Control and Status Registers) */
8826200Ssklower 
8926200Ssklower #define	WCSR0(x,y)	((x)->CSR0 = y)
9026200Ssklower #define	WCSR1(x,y)	((x)->CSR1 = y)
9126200Ssklower #define	WCSR2(x,y)	((x)->CSR2 = y)
9226200Ssklower #define	WCSR3(x,y)	((x)->CSR3 = y)
9326200Ssklower 
9426200Ssklower #define	RCSR0(x)	((x)->CSR0)
9526200Ssklower #define	RCSR1(x)	((x)->CSR1)
9626200Ssklower #define	RCSR2(x)	((x)->CSR2)
9726200Ssklower #define	RCSR3(x)	((x)->CSR3)
9826200Ssklower 
9926200Ssklower #define NPRESET		0x01		/* reset the board */
10026200Ssklower #define	NPSTART		0x04		/* start board execution */
10126200Ssklower #define	NPGPANIC	0x05		/* Get panic message */
10226200Ssklower #define	NPINIT		0x06		/* initialize software on board */
10326200Ssklower #define NPSTATS 	0x07
10426200Ssklower #define	NPRCSR0		0x08		/* read CSR0 */
10526200Ssklower #define	NPRCSR1		0x09		/* read CSR1 */
10626200Ssklower #define	NPRCSR2		0x0a		/* read CSR2 */
10726200Ssklower #define	NPRCSR3		0x0b		/* read CSR3 */
10826200Ssklower #define	NPWCSR0		0x0c		/* write CSR0 */
10926200Ssklower #define	NPWCSR1		0x0d		/* write CSR1 */
11026200Ssklower #define	NPWCSR2		0x0e		/* write CSR2 */
11126200Ssklower #define	NPWCSR3		0x0f		/* write CSR3 */
11226200Ssklower #define NPPOLL  	0x10
11326200Ssklower #define NPKILL  	0x11
11426200Ssklower #define	NPSETPROT	0x12		/* set the protocol to use */
11526200Ssklower #define	NPSETBOARD	0x13		/* set board to use */
11626200Ssklower #define	NPSETNPDEB	0x14		/* set nc debuging level */
11726200Ssklower #define	NPSETADDR	0x15		/* set host address */
11826200Ssklower #define	NPNETBOOT	0x16		/* boot from the network */
11926200Ssklower 
12026200Ssklower /* ICP Board Requests */
12126200Ssklower 
12226200Ssklower #define ICPLOAD  0x02
12326200Ssklower #define ICPDUMP  0x03
12426200Ssklower #define ICPPANIC 0x05
12526200Ssklower #define ICPPOLL  0x10
12626200Ssklower 
12726200Ssklower /*
12826200Ssklower  * Typedefs for the VAX
12926200Ssklower  */
13026200Ssklower 
13126200Ssklower typedef short	sign16;			/* 16 bit signed value */
13226200Ssklower typedef unsigned short unsign16;	/* 16 bit unsigned value */
13326200Ssklower typedef unsigned unsign32;		/* 32 bit unsigned value */
13426200Ssklower typedef long paddr_t;			/* Physical addresses */
13526200Ssklower 
13626200Ssklower 
13726200Ssklower /*
13826200Ssklower  * Tunables
13926200Ssklower  */
14026200Ssklower 
14126200Ssklower 
14226200Ssklower #define NUMCQE		40		/* Number of CQE's per board */
14326200Ssklower 
14426200Ssklower /* Host configuration word in Status Block */
14526200Ssklower 
14626200Ssklower /*
14726200Ssklower  * To disable the lock/unlock internal function calls clear the 0x8000
14826200Ssklower  * bit in the host configuration word (HOSTCONF)
14926200Ssklower  */
15026200Ssklower 
15126200Ssklower #define	HOSTCONF	0x0109	/* See above */
15226200Ssklower #define	LOWBYTE		1
15326200Ssklower #define	HIGHBYTE	0
15426200Ssklower #define BUFFMAPPED	0
15526200Ssklower 
15626200Ssklower /*
15726200Ssklower  * Memory mapping definintions for PM68DUAL hardware.
15826200Ssklower  */
15926200Ssklower 
16026200Ssklower #ifdef PM68DUAL
16126200Ssklower #define	PISHMEM		0x200000
16226200Ssklower #define PISHMEMSIZE	2
16326200Ssklower #define PIOFF		0x8000		/* change this to unique mem add. */
16426200Ssklower #define PIWINDOW	MBUSBUFR + PIOFF
16526200Ssklower #define WINDOWSIZE	2
16626200Ssklower #endif
16726200Ssklower #define	NPMAXXFR	32768		/* Maximum number of bytes / read */
16826200Ssklower 
16926200Ssklower /*
17026200Ssklower  * Define the protocols supported by the NP Driver.
17126200Ssklower  */
17226200Ssklower 
17326200Ssklower #define NONE		0x00	/* No protocols active for a process */
17426200Ssklower #define NPMAINT		0x01	/* Maintenance protocol, superusers only */
17526200Ssklower #define NPNTS		0x02	/* NTS Terminal Server */
17626200Ssklower #define NPDLA		0x04	/* Direct Datalink Access */
17726200Ssklower #define NPXNS		0x06	/* Xerox NS ITP */
17826200Ssklower #define NPTCP		0x08	/* TCP/IP */
17926200Ssklower #define NPISO		0x0A	/* ISO */
18026200Ssklower #define NPCLCONN	0xFF	/* Closed connection, i.e. no protocol */
18126200Ssklower 
18226200Ssklower /*
18326200Ssklower  * Convert the protocol to a value used in the Device Protocol Mask field
18426200Ssklower  * of the Shared Memory Status Block.
18526200Ssklower  */
18626200Ssklower 
18726200Ssklower #define PROTOMASK(x)	( 1 << (x) )
18826200Ssklower 
18926200Ssklower /*
19026200Ssklower  * Special requests handled by the NP Driver
19126200Ssklower  */
19226200Ssklower 
19326200Ssklower #define OS_STP		03400	/* Shut down connection on I Board */
19426200Ssklower #define NPSTOP		3	/* Conversion from above (OS_STP) */
19526200Ssklower #define NPCHNGP		50	/* Change the protocol on a connection */
19626200Ssklower #define NPCHNGB		51	/* Change the Board number */
19726200Ssklower 
19826200Ssklower /*
19926200Ssklower  * Miscellaneous
20026200Ssklower  */
20126200Ssklower 
20226200Ssklower #define ON		0x8000  /* Used for Command Q's scan and change flag */
20326200Ssklower #define UBADDRMASK	0x3FFFF /* 18 bit UNIBUS address */
20426200Ssklower #define INTMASK		0xFFFFFFFC /* Used for address validation */
20526200Ssklower #define CMDMASK		0xFFFF	/* Mask ioctl cmd field (see ioctl.h) */
20626200Ssklower #define NPPSADDR	0x324	/* Pointer to addr of on-board panic string */
20726200Ssklower #define	PANLEN		133		/* length of the panic buffer */
20826200Ssklower 
20926200Ssklower /*
21026200Ssklower  * Map function code from user to I-Board format
21126200Ssklower  */
21226200Ssklower 
21326200Ssklower #define FUNCTMAP(x)	(((x) << 6) | 077) /* Maps user function to NP funcs */
21426200Ssklower 
21526200Ssklower /*
21626200Ssklower  * Round up to a 16 byte boundary
21726200Ssklower  */
21826200Ssklower 
21926200Ssklower #define ROUND16(x)	(((x) + 15) & (~0x0F)) /* Round to 16 byte boundary */
22026200Ssklower #define ADDR24		1 /* Used by iomalloc() to specify 24 bit address */
22126200Ssklower 
22226200Ssklower #define NPERRSHIFT	8	/* Used in function ReqDone() */
22326200Ssklower #define NPOK		0
22426200Ssklower 
22526200Ssklower #define LOWORD(X)	(((ushort *)&(X))[0])
22626200Ssklower #define HIWORD(X)	(((ushort *)&(X))[1])
22726200Ssklower 
22826200Ssklower /* Everyday flag settings */
22926200Ssklower 
23026200Ssklower #define NPSET		1
23126200Ssklower #define NPCLEAR		0
23226200Ssklower 
23326200Ssklower /*
23426200Ssklower  * Command Queue Elements are the primary data structure for passing data
23526200Ssklower  * between the driver and the device.
23626200Ssklower  */
23726200Ssklower 
23826200Ssklower struct CQE {
23926200Ssklower 
24026200Ssklower 	struct npreq *cqe_reqid;/* Address of asssociated npreq */
24126200Ssklower 	unsign32 cqe_famid;	/* Family ID (Process ID) */
24226200Ssklower 	unsign16 cqe_func;	/* I/O function to be performed */
24326200Ssklower #ifdef mc68000
24426200Ssklower 	char cqe_prot;		/* Protocol type for I/O request */
24526200Ssklower 	char cqe_lenrpb;	/* Length of the RPB in bytes */
24626200Ssklower #else
24726200Ssklower 	char cqe_lenrpb;	/* Length of the RPB in bytes */
24826200Ssklower 	char cqe_prot;		/* Protocol type for I/O request */
24926200Ssklower #endif
25026200Ssklower 	unsign16 cqe_ust0;	/* Protocol status return */
25126200Ssklower 	unsign16 cqe_ust1;	/* Protocol status return */
25226200Ssklower 	unsign16 cqe_devrsv;	/* Reserved for use by device only! */
25326200Ssklower #ifdef mc68000
25426200Ssklower 	char cqe_char;		/* CQE characteristics */
25526200Ssklower 	char cqe_sts;		/* Status return from device to user */
25626200Ssklower 	char cqe_wind;		/* Buffer mapping window size (page units) */
25726200Ssklower 	char cqe_nbuf;		/* Number of data buffers for I/O */
25826200Ssklower #else
25926200Ssklower 	char cqe_sts;		/* Status return from device to user */
26026200Ssklower 	char cqe_char;		/* CQE characteristics */
26126200Ssklower 	char cqe_nbuf;		/* Number of data buffers for I/O */
26226200Ssklower 	char cqe_wind;		/* Buffer mapping window size (page units) */
26326200Ssklower #endif
26426200Ssklower 	unsign16 cqe_bcnt;	/* Total number of bytes in the data buffer */
26526200Ssklower 	unsign16 cqe_unused;	/* Unused */
26626200Ssklower 	unsign16 cqe_dma[2];	/* Address of the MULTIBUS data buffer */
26726200Ssklower 	unsign16 rpb1;		/* Word 1 of protocol parameters */
26826200Ssklower 	unsign16 rpb2;		/* Word 2 of protocol parameters */
26926200Ssklower 	unsign16 rpb3;		/* Word 3 of protocol parameters */
27026200Ssklower 	unsign16 rpb4;		/* Word 4 of protocol parameters */
27126200Ssklower 	unsign16 rpb5;		/* Word 5 of protocol parameters */
27226200Ssklower 	unsign16 rpb6;		/* Word 6 of protocol parameters */
27326200Ssklower 	unsign16 rpb7;		/* Word 7 of protocol parameters */
27426200Ssklower 	unsign16 rpb8;		/* Word 8 of protocol parameters */
27526200Ssklower 	unsign16 rpb9;		/* Word 9 of protocol parameters */
27626200Ssklower 	unsign16 rpb10;		/* Word 10 of protocol parameters */
27726200Ssklower 	unsign16 rpb11;		/* Word 11 of protocol parameters */
27826200Ssklower 	unsign16 rpb12;		/* Word 12 of protocol parameters */
27926200Ssklower 
28026200Ssklower };
28126200Ssklower 
28226200Ssklower /*
28326200Ssklower  * NP Driver Request structure contains information about a request
28426200Ssklower  * maintained solely by the driver. One per CQE, plus a header.
28526200Ssklower  */
28626200Ssklower 
28726200Ssklower struct npreq {
28826200Ssklower 
28926200Ssklower 	struct npreq *forw;	/* Forward pointer for active list */
29026200Ssklower 	struct npreq *back;	/* Backward pointer for active list */
29126200Ssklower 	struct npreq *free;	/* Next member on free list */
29226200Ssklower 	struct CQE *element;	/* CQE associated with this request */
29326200Ssklower 	int flags;		/* Always useful */
29426200Ssklower 	int reqcnt;		/* Request count for reqtab */
29526200Ssklower 	int bufoffset;		/* Offset into buffer for turns */
29626200Ssklower 	int	bytecnt;	/* Number of bytes to transfer */
29726200Ssklower 	caddr_t	virtmem;	/* Virtual address of buffer */
29826200Ssklower 	int	mapbase;	/* Address of the mapping register */
29926200Ssklower 	int 	mapsize;	/* Size of mapped area */
30026200Ssklower 	caddr_t	bufaddr;	/* Address of the user buffer */
30126200Ssklower 	struct buf buf;		/* Buf structure needed for mem. mgmt */
30226200Ssklower 	struct proc *procp;	/* Pointer to process of requestor */
30326200Ssklower 	caddr_t user;		/* Structure passed by user from itpuser.h */
30426200Ssklower 	int	(*intr)();	/* Ptr to routine to call at interrupt time */
30526200Ssklower };
30626200Ssklower 
30726200Ssklower /*
30826200Ssklower  * Npmaster structure, one per device, is used for boardwise centralization
30926200Ssklower  * of relevant information including queues, I/O addresses and request pools.
31026200Ssklower  */
31126200Ssklower 
31226200Ssklower struct npmaster {
31326200Ssklower 
31426200Ssklower 	struct npmaster *next; 	/* Linked list of these, NULL terminator */
31526200Ssklower 	struct npspace *shmemp;	/* Shared memory address (driver <-> device) */
31626200Ssklower 	struct uba_device *devp; /* UBA Device for this unit */
31726200Ssklower 	struct NPREG   *iobase;	/* I/O base address for this board */
31826200Ssklower 	struct npreq   *reqtab;	/* Header for pool of CQE requests */
31926200Ssklower 	int	iomapbase;	/* Base index of I/O map reg's allocated */
32026200Ssklower 	int flags;		/* State of the Board */
32126200Ssklower 	int unit;		/* Unit number of this device */
32226200Ssklower 	int vector;		/* Interrupt vector for this unit */
32326200Ssklower };
32426200Ssklower 
32526200Ssklower struct npconn {
32626200Ssklower 
32726200Ssklower 	struct npmaster *unit;	/* Unit number (board) of this connection */
32826200Ssklower 	unsign16 protocol;	/* Protocol used on this connection */
32926200Ssklower 	struct buf np_wbuf;	/* write buf structure for raw access */
33026200Ssklower 	struct buf np_rbuf;	/* read buf structure for raw access */
33126200Ssklower };
33226200Ssklower 
33326200Ssklower struct NPREG {
33426200Ssklower 	unsign16 CSR0;		/* Control Status Register 0 */
33526200Ssklower 	unsign16 CSR1;		/* Control Status Register 1 */
33626200Ssklower 	unsign16 CSR2;		/* Control Status Register 2 */
33726200Ssklower 	unsign16 CSR3;		/* Control Status Register 3 */
33826200Ssklower 
33926200Ssklower };
34026200Ssklower 
34126200Ssklower /*
34226200Ssklower  * The following structures are used for communicating with the
34326200Ssklower  * Intelligent Board and are located in Shared Memory.
34426200Ssklower  */
34526200Ssklower 
34626200Ssklower /*
34726200Ssklower  * Status Block
34826200Ssklower  */
34926200Ssklower 
35026200Ssklower struct NpStat{
35126200Ssklower 
35226200Ssklower 	unsign16 sb_drw;	/* Device Request Word */
35326200Ssklower 	unsign16 sb_hcw;	/* Host Configuration Word */
35426200Ssklower 	unsign16 sb_dcw;	/* Device Configuration Word */
35526200Ssklower 	unsign16 sb_dpm;	/* Device Protocol Mask */
35626200Ssklower 	unsign16 sb_dcq;	/* Offset to Device CQ */
35726200Ssklower 	unsign16 sb_hcq;	/* Offset to Host CQ */
35826200Ssklower };
35926200Ssklower 
36026200Ssklower /*
36126200Ssklower  * Command Queue, two per device. One is owned by the driver and the other
36226200Ssklower  * is owned by the device.
36326200Ssklower  */
36426200Ssklower 
36526200Ssklower struct CmdQue {
36626200Ssklower 
36726200Ssklower 	unsign16 scanflag;	/* Scan Flag, MSB set if being scanned */
36826200Ssklower 	unsign16 chngflag;	/* Change Flag, MSB set by initiator */
36926200Ssklower 	unsign16 cq_wrap;	/* Offset to last CQE entry +2 */
37026200Ssklower 	unsign16 cq_add;	/* Offset to add a CQE to the queue */
37126200Ssklower 	unsign16 cq_rem;	/* Offset to remove a CQE from the queue */
37226200Ssklower 	unsign16 cq_cqe[NUMCQE]; /* Command Queue Element Offsets */
37326200Ssklower };
37426200Ssklower 
37526200Ssklower /*
37626200Ssklower  * Structure of the shared memory area per board. Declared this way to avoid
37726200Ssklower  * compiler word alignment vagaries when computing offsets.
37826200Ssklower  */
37926200Ssklower 
38026200Ssklower struct npspace {
38126200Ssklower 
38226200Ssklower 	struct NpStat statblock;	/* Status Block */
38326200Ssklower 	struct CmdQue devcq;		/* Device's Command Queue */
38426200Ssklower 	struct CmdQue hostcq;		/* Host's Command Queue */
38526200Ssklower 	struct CQE elements[NUMCQE];	/* Shared Command Queue Elements */
38626200Ssklower 	unsign16 filler[8];		/* Here for 16 byte alignment */
38726200Ssklower };
38826200Ssklower 
38926200Ssklower /*
39026200Ssklower  * Structure of array of base addresses of I-Board controllers
39126200Ssklower  * (See global data definitions in np.c)
39226200Ssklower  */
39326200Ssklower 
39426200Ssklower struct npbase {
39526200Ssklower 	caddr_t baseaddr;
39626200Ssklower };
39726200Ssklower 
39826200Ssklower /* State of the NP Driver as kept in NpState */
39926200Ssklower 
40026200Ssklower #define ICPAVAIL	0x01 	/* ICP is waiting for a request */
40126200Ssklower 
40226200Ssklower /* Tells ICP Process that there are no more requests for this board */
40326200Ssklower 
40426200Ssklower #define BRDDONE 1
40526200Ssklower 
40626200Ssklower /* Flags used by the driver (npreq structure) to monitor status of requests */
40726200Ssklower 
40826200Ssklower #define REQDONE 0x01		/* Request completed */
40926200Ssklower #define IOIFC   0x02		/* Internal Function Code Request */
41026200Ssklower #define IOERR	0x04		/* Error on Request */
41126200Ssklower #define NPPEND	0x08		/* Unused at this time */
41226200Ssklower #define IOABORT 0x10		/* Request aborted by ICP */
41326200Ssklower #define KERNREQ	0x20		/* Request was from the kernel */
41426200Ssklower #define WANTREQ 0x40		/* Process is waiting for a npreq structure */
41526200Ssklower #define NPUIO	0x80		/* Process doing physio */
41626200Ssklower 
41726200Ssklower /* Service Request Commands from the Intelligent Board */
41826200Ssklower 
41926200Ssklower #define NOREQ	0x00		/* No service requested */
42026200Ssklower #define NPLOAD  0x01		/* Dump request */
42126200Ssklower #define NPDUMP	0x02		/* Load request */
42226200Ssklower #define NPPANIC	0x100		/* Panic request */
42326200Ssklower 
42426200Ssklower /* Definitions of Status returned from the I-Board */
42526200Ssklower 
42626200Ssklower #define NPDONE	0x01		/* Normal completion */
42726200Ssklower #define NPIFC	0x00		/* Internal Function Code request */
42826200Ssklower #define NPPERR  0x80		/* Protocol error */
42926200Ssklower #define NPMERR	0x82		/* Memory allocation failure on I-Board */
43026200Ssklower 
43126200Ssklower /* Definitions of IFC type requests from I-Board */
43226200Ssklower 
43326200Ssklower #define NPLOCK	0x64		/* Lock the process's data area */
43426200Ssklower #define NPUNLOCK 0xA4		/* Unlock the process */
43526200Ssklower #define NPREMAP	0x124		/* Window turn */
43626200Ssklower 
43726200Ssklower /* Definition of flags for the Npmaster structure */
43826200Ssklower 
43926200Ssklower #define CSRPEND		0x01		/* CSR0 command pending */
44026200Ssklower #define PANICREQ	0x02		/* Panic request */
44126200Ssklower #define DUMPREQ		0x04		/* Dump request */
44226200Ssklower #define LOADREQ		0x08		/* Load request */
44326200Ssklower #define BOARDREQ	0x10		/* Any request by the board */
44426200Ssklower #define BADBOARD	0x20		/* Board disabled */
44526200Ssklower #define AVAILABLE	0x40		/* Board available */
44626200Ssklower #define BRDRESET	0x80		/* Board is being reset */
44726200Ssklower #define	PANIC1	 	0x100		/* Driver wants panic address */
44826200Ssklower #define	PANIC2		0x200		/* Driver wants panic string */
44926200Ssklower #define PANIC3		0x400		/* Clear first byte of panic string */
45026200Ssklower 
45126200Ssklower /*
45226200Ssklower  * Debugging Constants
45326200Ssklower  */
45426200Ssklower 
45526200Ssklower #define	DEBENTRY	0x0001		/* debug entry points */
45626200Ssklower #define	DEBMEM		0x0002		/* debug memory */
45726200Ssklower #define	DEBREQ		0x0004		/* debug requests */
45826200Ssklower #define	DEBCQE		0x0008		/* debug cqe's */
45926200Ssklower #define	DEBCQ		0x0010		/* debug cq's */
46026200Ssklower #define	DEBMAINT	0x0020		/* debug maintainance requests */
46126200Ssklower #define	DEBINTR		0x0040		/* debug interrupt routines */
46226200Ssklower #define	DEBINIT		0x0080		/* debug initialization routines */
46326200Ssklower #define	DEBIFC		0x0100		/* debug Internal function codes */
46426200Ssklower #define	DEBIOCTL	0x0200		/* debug ioctl calls */
46526200Ssklower #define	DEBOPEN		0x0400		/* debug open calls */
46626200Ssklower #define	DEBIO		0x0800		/* debug read & write calls */
46726200Ssklower #define	DEBCSR		0x1000		/* debug CSR commands */
46826200Ssklower #define	DEBLOCK		0x2000		/* debug lock / unlock calls */
46926200Ssklower #define NOBOARD		0x4000		/* debug user/host interface */
470