[BACK]Return to frame.h CVS log [TXT][DIR] Up to [local] / sys / arch / hppa64 / include

Annotation of sys/arch/hppa64/include/frame.h, Revision 1.1

1.1     ! nbrk        1: /*     $OpenBSD: frame.h,v 1.1 2005/04/01 10:40:48 mickey Exp $        */
        !             2:
        !             3: /*
        !             4:  * Copyright (c) 2005 Michael Shalayeff
        !             5:  * All rights reserved.
        !             6:  *
        !             7:  * Permission to use, copy, modify, and distribute this software for any
        !             8:  * purpose with or without fee is hereby granted, provided that the above
        !             9:  * copyright notice and this permission notice appear in all copies.
        !            10:  *
        !            11:  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
        !            12:  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
        !            13:  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
        !            14:  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
        !            15:  * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN
        !            16:  * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
        !            17:  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
        !            18:  */
        !            19:
        !            20: #ifndef _MACHINE_FRAME_H_
        !            21: #define _MACHINE_FRAME_H_
        !            22:
        !            23: /*
        !            24:  * Call frame definitions
        !            25:  */
        !            26: #define        HPPA_FRAME_SIZE         (128)
        !            27: #define        HPPA_FRAME_PSP          (-8)
        !            28: #define        HPPA_FRAME_RP           (-16)
        !            29:
        !            30: /*
        !            31:  * Macros to decode processor status word.
        !            32:  */
        !            33: #define        HPPA_PC_PRIV_MASK    3
        !            34: #define        HPPA_PC_PRIV_KERN    0
        !            35: #define        HPPA_PC_PRIV_USER    3
        !            36: #define        USERMODE(pc)    ((((register_t)pc) & HPPA_PC_PRIV_MASK) != HPPA_PC_PRIV_KERN)
        !            37: #define        KERNMODE(pc)    (((register_t)pc) & ~HPPA_PC_PRIV_MASK)
        !            38:
        !            39: /*
        !            40:  *
        !            41:  */
        !            42: #define        HPPA_SID_MAX    0x7ffffe00
        !            43: #define        HPPA_SID_KERNEL 0
        !            44: #define        HPPA_PID_KERNEL 2
        !            45:
        !            46: #ifndef _LOCORE
        !            47: /*
        !            48:  * the trapframe is divided into two parts:
        !            49:  *     one is saved while we are in the physical mode (beginning of the trap),
        !            50:  *     and should be kept as small as possible, since all the interrupts will
        !            51:  *     be lost during this phase, also it must be 64-bytes aligned, per
        !            52:  *     pa-risc stack conventions, and its dependencies in the code (;
        !            53:  *     the other part is filled out when we are already in the virtual mode,
        !            54:  *     are able to catch interrupts (they are kept pending) and perform
        !            55:  *     other trap activities (like tlb misses).
        !            56:  */
        !            57: struct trapframe {
        !            58:        unsigned long   tf_flags;
        !            59:        unsigned long   tf_r1;
        !            60:        unsigned long   tf_rp;
        !            61:        unsigned long   tf_r3;
        !            62:        unsigned long   tf_r4;
        !            63:        unsigned long   tf_r5;
        !            64:        unsigned long   tf_r6;
        !            65:        unsigned long   tf_r7;
        !            66:        unsigned long   tf_r8;
        !            67:        unsigned long   tf_r9;
        !            68:        unsigned long   tf_r10;
        !            69:        unsigned long   tf_r11;
        !            70:        unsigned long   tf_r12;
        !            71:        unsigned long   tf_r13;
        !            72:        unsigned long   tf_r14;
        !            73:        unsigned long   tf_r15;
        !            74:        unsigned long   tf_r16;
        !            75:        unsigned long   tf_r17;
        !            76:        unsigned long   tf_r18;
        !            77:        unsigned long   tf_args[8];
        !            78:        unsigned long   tf_dp;          /* r27 */
        !            79:        unsigned long   tf_ret0;
        !            80:        unsigned long   tf_ret1;
        !            81:        unsigned long   tf_sp;
        !            82:        unsigned long   tf_r31;
        !            83:        unsigned long   tf_sr0;
        !            84:        unsigned long   tf_sr1;
        !            85:        unsigned long   tf_sr2;
        !            86:        unsigned long   tf_sr3;
        !            87:        unsigned long   tf_sr4;
        !            88:        unsigned long   tf_sr5;
        !            89:        unsigned long   tf_sr6;
        !            90:        unsigned long   tf_sr7;
        !            91:        unsigned long   tf_rctr;
        !            92:        unsigned long   tf_ccr;         /* cr10 */
        !            93:        unsigned long   tf_iioq[2];
        !            94:        unsigned long   tf_iisq[2];
        !            95:        unsigned long   tf_pidr1;
        !            96:        unsigned long   tf_pidr2;
        !            97:        unsigned long   tf_eiem;
        !            98:        unsigned long   tf_eirr;
        !            99:        unsigned long   tf_ior;
        !           100:        unsigned long   tf_isr;
        !           101:        unsigned long   tf_iir;
        !           102:        unsigned long   tf_ipsw;
        !           103:        unsigned long   tf_ci;          /* cr24 */
        !           104:        unsigned long   tf_vtop;        /* cr25 */
        !           105:        unsigned long   tf_cr30;        /* pa(u) */
        !           106:        unsigned long   tf_cr27;        /* user curthread */
        !           107:        unsigned long   tf_sar;
        !           108:
        !           109:        unsigned long   tf_pad[5];
        !           110: };
        !           111: #endif /* !_LOCORE */
        !           112:
        !           113: #endif /* !_MACHINE_FRAME_H_ */

CVSweb