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