xref: /openbsd-src/sys/arch/alpha/include/pal.h (revision 22a031d6759974b43c6470ec4b62cf7220c62636)
1*22a031d6Sericj /* $OpenBSD: pal.h,v 1.2 2000/11/08 21:27:20 ericj Exp $ */
2aed035abSart /* $NetBSD: pal.h,v 1.1 1997/09/06 01:23:53 thorpej Exp $ */
3aed035abSart 
4aed035abSart /*
5aed035abSart  * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
6aed035abSart  * All Rights Reserved.
7aed035abSart  *
8aed035abSart  * Permission to use, copy, modify and distribute this software and its
9aed035abSart  * documentation is hereby granted, provided that both the copyright
10aed035abSart  * notice and this permission notice appear in all copies of the
11aed035abSart  * software, derivative works or modified versions, and any portions
12aed035abSart  * thereof, and that both notices appear in supporting documentation.
13aed035abSart  *
14aed035abSart  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
15aed035abSart  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
16aed035abSart  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
17aed035abSart  *
18aed035abSart  * Carnegie Mellon requests users of this software to return to
19aed035abSart  *
20aed035abSart  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
21aed035abSart  *  School of Computer Science
22aed035abSart  *  Carnegie Mellon University
23aed035abSart  *  Pittsburgh PA 15213-3890
24aed035abSart  *
25aed035abSart  * any improvements or extensions that they make and grant Carnegie Mellon
26aed035abSart  * the rights to redistribute these changes.
27aed035abSart  */
28aed035abSart 
29aed035abSart /*
30aed035abSart  * PAL "function" codes (used as arguments to call_pal instructions).
31aed035abSart  *
32aed035abSart  * Those marked with "P" are privileged, and those marked with "U"
33aed035abSart  * are unprivileged.
34aed035abSart  */
35aed035abSart 
36aed035abSart /* Common PAL function codes. */
37aed035abSart #define	PAL_halt		0x0000			/* P */
38aed035abSart #define	PAL_cflush		0x0001			/* P */
39aed035abSart #define	PAL_draina		0x0002			/* P */
40aed035abSart #define	PAL_cserve		0x0009			/* P */
41aed035abSart #define	PAL_swppal		0x000a			/* P */
42aed035abSart #define	PAL_ipir		0x000d			/* P */
43aed035abSart #define	PAL_bpt			0x0080			/* U */
44aed035abSart #define	PAL_bugchk		0x0081			/* U */
45aed035abSart #define	PAL_imb			0x0086			/* U */
46aed035abSart #define	PAL_rdunique		0x009e			/* U */
47aed035abSart #define	PAL_wrunique		0x009f			/* U */
48aed035abSart #define	PAL_gentrap		0x00aa			/* U */
49aed035abSart 
50aed035abSart /* VMS PAL function codes. */
51aed035abSart #define	PAL_VMS_ldqp		0x0003			/* P */
52aed035abSart #define	PAL_VMS_stqp		0x0004			/* P */
53aed035abSart #define	PAL_VMS_mtpr_fen	0x000c			/* P */
54aed035abSart #define	PAL_VMS_mtpr_ipir	0x000d			/* P */
55aed035abSart #define	PAL_VMS_mfpr_ipl	0x000e			/* P */
56aed035abSart #define	PAL_VMS_mtpr_ipl	0x000f			/* P */
57aed035abSart #define	PAL_VMS_mfpr_mces	0x0010			/* P */
58aed035abSart #define	PAL_VMS_mtpr_mces	0x0011			/* P */
59aed035abSart #define	PAL_VMS_mfpr_prbr	0x0013			/* P */
60aed035abSart #define	PAL_VMS_mtpr_prbr	0x0014			/* P */
61aed035abSart #define	PAL_VMS_mfpr_ptbr	0x0015			/* P */
62aed035abSart #define	PAL_VMS_mtpr_scbb	0x0017			/* P */
63aed035abSart #define	PAL_VMS_mtpr_sirr	0x0018			/* P */
64aed035abSart #define	PAL_VMS_mtpr_tbia	0x001b			/* P */
65aed035abSart #define	PAL_VMS_mtpr_tbiap	0x001c			/* P */
66aed035abSart #define	PAL_VMS_mtpr_tbis	0x001d			/* P */
67aed035abSart #define	PAL_VMS_mfpr_usp	0x0022			/* P */
68aed035abSart #define	PAL_VMS_mtpr_usp	0x0023			/* P */
69aed035abSart #define	PAL_VMS_mfpr_vptb	0x0029			/* P */
70aed035abSart #define	PAL_VMS_mfpr_whami	0x003f			/* P */
71aed035abSart #define	PAL_VMS_rei		0x0092			/* U */
72aed035abSart 
73aed035abSart /* OSF/1 PAL function codes. */
74aed035abSart #define	PAL_OSF1_rdmces		0x0010			/* P */
75aed035abSart #define	PAL_OSF1_wrmces		0x0011			/* P */
76aed035abSart #define	PAL_OSF1_wrfen		0x002b			/* P */
77aed035abSart #define	PAL_OSF1_wrvptptr	0x002d			/* P */
78aed035abSart #define	PAL_OSF1_swpctx		0x0030			/* P */
79aed035abSart #define	PAL_OSF1_wrval		0x0031			/* P */
80aed035abSart #define	PAL_OSF1_rdval		0x0032			/* P */
81aed035abSart #define	PAL_OSF1_tbi		0x0033			/* P */
82aed035abSart #define	PAL_OSF1_wrent		0x0034			/* P */
83aed035abSart #define	PAL_OSF1_swpipl		0x0035			/* P */
84aed035abSart #define	PAL_OSF1_rdps		0x0036			/* P */
85aed035abSart #define	PAL_OSF1_wrkgp		0x0037			/* P */
86aed035abSart #define	PAL_OSF1_wrusp		0x0038			/* P */
87aed035abSart #define	PAL_OSF1_wrperfmon	0x0039			/* P */
88aed035abSart #define	PAL_OSF1_rdusp		0x003a			/* P */
89aed035abSart #define	PAL_OSF1_whami		0x003c			/* P */
90aed035abSart #define	PAL_OSF1_retsys		0x003d			/* P */
91aed035abSart #define	PAL_OSF1_rti		0x003f			/* P */
92aed035abSart #define	PAL_OSF1_callsys	0x0083			/* U */
93aed035abSart #define	PAL_OSF1_imb		0x0086			/* U */
94