osfpal.hh revision 2
1/*
2 * Copyright (c) 2003 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
29#ifndef __OSFPAL_HH__
30#define __OSFPAL_HH__
31
32struct PAL
33{
34    enum {
35        // Privileged PAL functions
36        halt = 0x00,
37        cflush = 0x01,
38        draina = 0x02,
39        cserve = 0x09,
40        swppal = 0x0a,
41        wripir = 0x0d,
42        rdmces = 0x10,
43        wrmces = 0x11,
44        wrfen = 0x2b,
45        wrvptptr = 0x2d,
46        swpctx = 0x30,
47        wrval = 0x31,
48        rdval = 0x32,
49        tbi = 0x33,
50        wrent = 0x34,
51        swpipl = 0x35,
52        rdps = 0x36,
53        wrkgp = 0x37,
54        wrusp = 0x38,
55        wrperfmon = 0x39,
56        rdusp = 0x3a,
57        whami = 0x3c,
58        retsys = 0x3d,
59        wtint = 0x3e,
60        rti = 0x3f,
61
62        // unprivileged pal functions
63        bpt = 0x80,
64        bugchk = 0x81,
65        callsys = 0x83,
66        imb = 0x86,
67        urti = 0x92,
68        rdunique = 0x9e,
69        wrunique = 0x9f,
70        gentrap = 0xaa,
71        clrfen = 0xae,
72        nphalt = 0xbe,
73        NumCodes
74    };
75
76    static const char *name(int index);
77};
78
79#endif // __OSFPAL_HH__
80