xref: /netbsd-src/sys/arch/alpha/include/pal.h (revision eacc5f97c950c6d7d4f75a36e7874d813724ae95)
1*eacc5f97Smatt /* $NetBSD: pal.h,v 1.3 2012/02/06 02:14:13 matt Exp $ */
236f209b7Sthorpej 
336f209b7Sthorpej /*
436f209b7Sthorpej  * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
536f209b7Sthorpej  * All Rights Reserved.
636f209b7Sthorpej  *
736f209b7Sthorpej  * Permission to use, copy, modify and distribute this software and its
836f209b7Sthorpej  * documentation is hereby granted, provided that both the copyright
936f209b7Sthorpej  * notice and this permission notice appear in all copies of the
1036f209b7Sthorpej  * software, derivative works or modified versions, and any portions
1136f209b7Sthorpej  * thereof, and that both notices appear in supporting documentation.
1236f209b7Sthorpej  *
1336f209b7Sthorpej  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
1436f209b7Sthorpej  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
1536f209b7Sthorpej  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
1636f209b7Sthorpej  *
1736f209b7Sthorpej  * Carnegie Mellon requests users of this software to return to
1836f209b7Sthorpej  *
1936f209b7Sthorpej  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
2036f209b7Sthorpej  *  School of Computer Science
2136f209b7Sthorpej  *  Carnegie Mellon University
2236f209b7Sthorpej  *  Pittsburgh PA 15213-3890
2336f209b7Sthorpej  *
2436f209b7Sthorpej  * any improvements or extensions that they make and grant Carnegie Mellon
2536f209b7Sthorpej  * the rights to redistribute these changes.
2636f209b7Sthorpej  */
2736f209b7Sthorpej 
2836f209b7Sthorpej /*
2936f209b7Sthorpej  * PAL "function" codes (used as arguments to call_pal instructions).
3036f209b7Sthorpej  *
3136f209b7Sthorpej  * Those marked with "P" are privileged, and those marked with "U"
3236f209b7Sthorpej  * are unprivileged.
3336f209b7Sthorpej  */
3436f209b7Sthorpej 
3536f209b7Sthorpej /* Common PAL function codes. */
3636f209b7Sthorpej #define	PAL_halt		0x0000			/* P */
3736f209b7Sthorpej #define	PAL_cflush		0x0001			/* P */
3836f209b7Sthorpej #define	PAL_draina		0x0002			/* P */
3936f209b7Sthorpej #define	PAL_cserve		0x0009			/* P */
4036f209b7Sthorpej #define	PAL_swppal		0x000a			/* P */
4136f209b7Sthorpej #define	PAL_ipir		0x000d			/* P */
426b65b300Snathanw #define	PAL_wtint		0x003e			/* P */
4336f209b7Sthorpej #define	PAL_bpt			0x0080			/* U */
4436f209b7Sthorpej #define	PAL_bugchk		0x0081			/* U */
4536f209b7Sthorpej #define	PAL_imb			0x0086			/* U */
4636f209b7Sthorpej #define	PAL_rdunique		0x009e			/* U */
4736f209b7Sthorpej #define	PAL_wrunique		0x009f			/* U */
4836f209b7Sthorpej #define	PAL_gentrap		0x00aa			/* U */
496b65b300Snathanw #define	PAL_clrfen		0x00ae			/* U */
5036f209b7Sthorpej 
5136f209b7Sthorpej /* VMS PAL function codes. */
5236f209b7Sthorpej #define	PAL_VMS_ldqp		0x0003			/* P */
5336f209b7Sthorpej #define	PAL_VMS_stqp		0x0004			/* P */
5436f209b7Sthorpej #define	PAL_VMS_mtpr_fen	0x000c			/* P */
5536f209b7Sthorpej #define	PAL_VMS_mtpr_ipir	0x000d			/* P */
5636f209b7Sthorpej #define	PAL_VMS_mfpr_ipl	0x000e			/* P */
5736f209b7Sthorpej #define	PAL_VMS_mtpr_ipl	0x000f			/* P */
5836f209b7Sthorpej #define	PAL_VMS_mfpr_mces	0x0010			/* P */
5936f209b7Sthorpej #define	PAL_VMS_mtpr_mces	0x0011			/* P */
6036f209b7Sthorpej #define	PAL_VMS_mfpr_prbr	0x0013			/* P */
6136f209b7Sthorpej #define	PAL_VMS_mtpr_prbr	0x0014			/* P */
6236f209b7Sthorpej #define	PAL_VMS_mfpr_ptbr	0x0015			/* P */
6336f209b7Sthorpej #define	PAL_VMS_mtpr_scbb	0x0017			/* P */
6436f209b7Sthorpej #define	PAL_VMS_mtpr_sirr	0x0018			/* P */
6536f209b7Sthorpej #define	PAL_VMS_mtpr_tbia	0x001b			/* P */
6636f209b7Sthorpej #define	PAL_VMS_mtpr_tbiap	0x001c			/* P */
6736f209b7Sthorpej #define	PAL_VMS_mtpr_tbis	0x001d			/* P */
6836f209b7Sthorpej #define	PAL_VMS_mfpr_usp	0x0022			/* P */
6936f209b7Sthorpej #define	PAL_VMS_mtpr_usp	0x0023			/* P */
7036f209b7Sthorpej #define	PAL_VMS_mfpr_vptb	0x0029			/* P */
7136f209b7Sthorpej #define	PAL_VMS_mfpr_whami	0x003f			/* P */
7236f209b7Sthorpej #define	PAL_VMS_rei		0x0092			/* U */
7336f209b7Sthorpej 
7436f209b7Sthorpej /* OSF/1 PAL function codes. */
7536f209b7Sthorpej #define	PAL_OSF1_rdmces		0x0010			/* P */
7636f209b7Sthorpej #define	PAL_OSF1_wrmces		0x0011			/* P */
7736f209b7Sthorpej #define	PAL_OSF1_wrfen		0x002b			/* P */
7836f209b7Sthorpej #define	PAL_OSF1_wrvptptr	0x002d			/* P */
7936f209b7Sthorpej #define	PAL_OSF1_swpctx		0x0030			/* P */
8036f209b7Sthorpej #define	PAL_OSF1_wrval		0x0031			/* P */
8136f209b7Sthorpej #define	PAL_OSF1_rdval		0x0032			/* P */
8236f209b7Sthorpej #define	PAL_OSF1_tbi		0x0033			/* P */
8336f209b7Sthorpej #define	PAL_OSF1_wrent		0x0034			/* P */
8436f209b7Sthorpej #define	PAL_OSF1_swpipl		0x0035			/* P */
8536f209b7Sthorpej #define	PAL_OSF1_rdps		0x0036			/* P */
8636f209b7Sthorpej #define	PAL_OSF1_wrkgp		0x0037			/* P */
8736f209b7Sthorpej #define	PAL_OSF1_wrusp		0x0038			/* P */
8836f209b7Sthorpej #define	PAL_OSF1_wrperfmon	0x0039			/* P */
8936f209b7Sthorpej #define	PAL_OSF1_rdusp		0x003a			/* P */
9036f209b7Sthorpej #define	PAL_OSF1_whami		0x003c			/* P */
9136f209b7Sthorpej #define	PAL_OSF1_retsys		0x003d			/* P */
9236f209b7Sthorpej #define	PAL_OSF1_rti		0x003f			/* P */
9336f209b7Sthorpej #define	PAL_OSF1_callsys	0x0083			/* U */
9436f209b7Sthorpej #define	PAL_OSF1_imb		0x0086			/* U */
956b65b300Snathanw #define	PAL_OSF1_urti		0x0092			/* U */
96