osfpal.hh revision 2632:1bb2f91485ea
1955SN/A/*
2955SN/A * Copyright (c) 2003-2005 The Regents of The University of Michigan
39812Sandreas.hansson@arm.com * All rights reserved.
49812Sandreas.hansson@arm.com *
59812Sandreas.hansson@arm.com * Redistribution and use in source and binary forms, with or without
69812Sandreas.hansson@arm.com * modification, are permitted provided that the following conditions are
79812Sandreas.hansson@arm.com * met: redistributions of source code must retain the above copyright
89812Sandreas.hansson@arm.com * notice, this list of conditions and the following disclaimer;
99812Sandreas.hansson@arm.com * redistributions in binary form must reproduce the above copyright
109812Sandreas.hansson@arm.com * notice, this list of conditions and the following disclaimer in the
119812Sandreas.hansson@arm.com * documentation and/or other materials provided with the distribution;
129812Sandreas.hansson@arm.com * neither the name of the copyright holders nor the names of its
139812Sandreas.hansson@arm.com * contributors may be used to endorse or promote products derived from
149812Sandreas.hansson@arm.com * this software without specific prior written permission.
157816Ssteve.reinhardt@amd.com *
165871Snate@binkert.org * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
171762SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18955SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19955SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20955SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21955SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22955SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23955SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24955SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25955SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26955SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27955SN/A */
28955SN/A
29955SN/A#ifndef __OSFPAL_HH__
30955SN/A#define __OSFPAL_HH__
31955SN/A
32955SN/Astruct PAL
33955SN/A{
34955SN/A    enum {
35955SN/A        // Privileged PAL functions
36955SN/A        halt = 0x00,
37955SN/A        cflush = 0x01,
38955SN/A        draina = 0x02,
39955SN/A        cserve = 0x09,
40955SN/A        swppal = 0x0a,
41955SN/A        wripir = 0x0d,
422665Ssaidi@eecs.umich.edu        rdmces = 0x10,
432665Ssaidi@eecs.umich.edu        wrmces = 0x11,
445863Snate@binkert.org        wrfen = 0x2b,
45955SN/A        wrvptptr = 0x2d,
46955SN/A        swpctx = 0x30,
47955SN/A        wrval = 0x31,
48955SN/A        rdval = 0x32,
49955SN/A        tbi = 0x33,
508878Ssteve.reinhardt@amd.com        wrent = 0x34,
512632Sstever@eecs.umich.edu        swpipl = 0x35,
528878Ssteve.reinhardt@amd.com        rdps = 0x36,
532632Sstever@eecs.umich.edu        wrkgp = 0x37,
54955SN/A        wrusp = 0x38,
558878Ssteve.reinhardt@amd.com        wrperfmon = 0x39,
562632Sstever@eecs.umich.edu        rdusp = 0x3a,
572761Sstever@eecs.umich.edu        whami = 0x3c,
582632Sstever@eecs.umich.edu        retsys = 0x3d,
592632Sstever@eecs.umich.edu        wtint = 0x3e,
602632Sstever@eecs.umich.edu        rti = 0x3f,
612761Sstever@eecs.umich.edu
622761Sstever@eecs.umich.edu        // unprivileged pal functions
632761Sstever@eecs.umich.edu        bpt = 0x80,
648878Ssteve.reinhardt@amd.com        bugchk = 0x81,
658878Ssteve.reinhardt@amd.com        callsys = 0x83,
662761Sstever@eecs.umich.edu        imb = 0x86,
672761Sstever@eecs.umich.edu        urti = 0x92,
682761Sstever@eecs.umich.edu        rdunique = 0x9e,
692761Sstever@eecs.umich.edu        wrunique = 0x9f,
702761Sstever@eecs.umich.edu        gentrap = 0xaa,
718878Ssteve.reinhardt@amd.com        clrfen = 0xae,
728878Ssteve.reinhardt@amd.com        nphalt = 0xbe,
732632Sstever@eecs.umich.edu        copypal = 0xbf,
742632Sstever@eecs.umich.edu        NumCodes
758878Ssteve.reinhardt@amd.com    };
768878Ssteve.reinhardt@amd.com
772632Sstever@eecs.umich.edu    static const char *name(int index);
78955SN/A};
79955SN/A
80955SN/A#endif // __OSFPAL_HH__
815863Snate@binkert.org