osfpal.hh revision 5569
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
9 * redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution;
12 * neither the name of the copyright holders nor the names of its
13 * contributors may be used to endorse or promote products derived from
14 * this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * Authors: Nathan Binkert
29 */
30
31#ifndef __ARCH_ALPHA_OSFPAL_HH__
32#define __ARCH_ALPHA_OSFPAL_HH__
33
34struct PAL
35{
36    enum {
37        // Privileged PAL functions
38        halt = 0x00,
39        cflush = 0x01,
40        draina = 0x02,
41        cserve = 0x09,
42        swppal = 0x0a,
43        wripir = 0x0d,
44        rdmces = 0x10,
45        wrmces = 0x11,
46        wrfen = 0x2b,
47        wrvptptr = 0x2d,
48        swpctx = 0x30,
49        wrval = 0x31,
50        rdval = 0x32,
51        tbi = 0x33,
52        wrent = 0x34,
53        swpipl = 0x35,
54        rdps = 0x36,
55        wrkgp = 0x37,
56        wrusp = 0x38,
57        wrperfmon = 0x39,
58        rdusp = 0x3a,
59        whami = 0x3c,
60        retsys = 0x3d,
61        wtint = 0x3e,
62        rti = 0x3f,
63
64        // unprivileged pal functions
65        bpt = 0x80,
66        bugchk = 0x81,
67        callsys = 0x83,
68        imb = 0x86,
69        urti = 0x92,
70        rdunique = 0x9e,
71        wrunique = 0x9f,
72        gentrap = 0xaa,
73        clrfen = 0xae,
74        nphalt = 0xbe,
75        copypal = 0xbf,
76        NumCodes
77    };
78
79    static const char *name(int index);
80};
81
82#endif // __ARCH_ALPHA_OSFPAL_HH__
83