osfpal.hh (2632:1bb2f91485ea) osfpal.hh (2665:a124942bacb8)
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.
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
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 copypal = 0xbf,
74 NumCodes
75 };
76
77 static const char *name(int index);
78};
79
80#endif // __OSFPAL_HH__
29 */
30
31#ifndef __OSFPAL_HH__
32#define __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 // __OSFPAL_HH__