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

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

1.1     ! nbrk        1: /*     $OpenBSD: frame.h,v 1.3 2005/12/13 00:18:19 jsg Exp $   */
        !             2: /*     $NetBSD: frame.h,v 1.1 2003/04/26 18:39:40 fvdl Exp $   */
        !             3:
        !             4: /*-
        !             5:  * Copyright (c) 1998 The NetBSD Foundation, Inc.
        !             6:  * All rights reserved.
        !             7:  *
        !             8:  * This code is derived from software contributed to The NetBSD Foundation
        !             9:  * by Charles M. Hannum.
        !            10:  *
        !            11:  * Redistribution and use in source and binary forms, with or without
        !            12:  * modification, are permitted provided that the following conditions
        !            13:  * are met:
        !            14:  * 1. Redistributions of source code must retain the above copyright
        !            15:  *    notice, this list of conditions and the following disclaimer.
        !            16:  * 2. Redistributions in binary form must reproduce the above copyright
        !            17:  *    notice, this list of conditions and the following disclaimer in the
        !            18:  *    documentation and/or other materials provided with the distribution.
        !            19:  * 3. All advertising materials mentioning features or use of this software
        !            20:  *    must display the following acknowledgement:
        !            21:  *        This product includes software developed by the NetBSD
        !            22:  *        Foundation, Inc. and its contributors.
        !            23:  * 4. Neither the name of The NetBSD Foundation nor the names of its
        !            24:  *    contributors may be used to endorse or promote products derived
        !            25:  *    from this software without specific prior written permission.
        !            26:  *
        !            27:  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
        !            28:  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
        !            29:  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
        !            30:  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
        !            31:  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
        !            32:  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
        !            33:  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
        !            34:  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
        !            35:  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
        !            36:  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
        !            37:  * POSSIBILITY OF SUCH DAMAGE.
        !            38:  */
        !            39:
        !            40: /*-
        !            41:  * Copyright (c) 1990 The Regents of the University of California.
        !            42:  * All rights reserved.
        !            43:  *
        !            44:  * This code is derived from software contributed to Berkeley by
        !            45:  * William Jolitz.
        !            46:  *
        !            47:  * Redistribution and use in source and binary forms, with or without
        !            48:  * modification, are permitted provided that the following conditions
        !            49:  * are met:
        !            50:  * 1. Redistributions of source code must retain the above copyright
        !            51:  *    notice, this list of conditions and the following disclaimer.
        !            52:  * 2. Redistributions in binary form must reproduce the above copyright
        !            53:  *    notice, this list of conditions and the following disclaimer in the
        !            54:  *    documentation and/or other materials provided with the distribution.
        !            55:  * 3. Neither the name of the University nor the names of its contributors
        !            56:  *    may be used to endorse or promote products derived from this software
        !            57:  *    without specific prior written permission.
        !            58:  *
        !            59:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
        !            60:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        !            61:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
        !            62:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
        !            63:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        !            64:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
        !            65:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
        !            66:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
        !            67:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
        !            68:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
        !            69:  * SUCH DAMAGE.
        !            70:  *
        !            71:  *     @(#)frame.h     5.2 (Berkeley) 1/18/91
        !            72:  */
        !            73:
        !            74: /*
        !            75:  * Adapted for NetBSD/amd64 by fvdl@wasabisystems.com
        !            76:  */
        !            77:
        !            78: #ifndef _AMD64_FRAME_H_
        !            79: #define _AMD64_FRAME_H_
        !            80:
        !            81: #include <sys/signal.h>
        !            82: #include <machine/fpu.h>
        !            83:
        !            84: /*
        !            85:  * System stack frames.
        !            86:  */
        !            87:
        !            88: /*
        !            89:  * Exception/Trap Stack Frame
        !            90:  */
        !            91: struct trapframe {
        !            92:        int64_t tf_rdi;
        !            93:        int64_t tf_rsi;
        !            94:        int64_t tf_rdx;
        !            95:        int64_t tf_rcx;
        !            96:        int64_t tf_r8;
        !            97:        int64_t tf_r9;
        !            98:        int64_t tf_r10;
        !            99:        int64_t tf_r11;
        !           100:        int64_t tf_r12;
        !           101:        int64_t tf_r13;
        !           102:        int64_t tf_r14;
        !           103:        int64_t tf_r15;
        !           104:        int64_t tf_rbp;
        !           105:        int64_t tf_rbx;
        !           106:        int64_t tf_rax;
        !           107:        int64_t tf_gs;
        !           108:        int64_t tf_fs;
        !           109:        int64_t tf_es;
        !           110:        int64_t tf_ds;
        !           111:        int64_t tf_trapno;
        !           112:        /* below portion defined in hardware */
        !           113:        int64_t tf_err;
        !           114:        int64_t tf_rip;
        !           115:        int64_t tf_cs;
        !           116:        int64_t tf_rflags;
        !           117:        /* These are pushed unconditionally on the x86-64 */
        !           118:        int64_t tf_rsp;
        !           119:        int64_t tf_ss;
        !           120: };
        !           121:
        !           122: /*
        !           123:  * Interrupt stack frame
        !           124:  */
        !           125: struct intrframe {
        !           126:        int64_t if_ppl;
        !           127:        int64_t if_rdi;
        !           128:        int64_t if_rsi;
        !           129:        int64_t if_rdx;
        !           130:        int64_t if_rcx;
        !           131:        int64_t if_r8;
        !           132:        int64_t if_r9;
        !           133:        int64_t if_r10;
        !           134:        int64_t if_r11;
        !           135:        int64_t if_r12;
        !           136:        int64_t if_r13;
        !           137:        int64_t if_r14;
        !           138:        int64_t if_r15;
        !           139:        int64_t if_rbp;
        !           140:        int64_t if_rbx;
        !           141:        int64_t if_rax;
        !           142:        int64_t tf_gs;
        !           143:        int64_t tf_fs;
        !           144:        int64_t tf_es;
        !           145:        int64_t tf_ds;
        !           146:        u_int64_t __if_trapno; /* for compat with trap frame - trapno */
        !           147:        u_int64_t __if_err;     /* for compat with trap frame - err */
        !           148:        /* below portion defined in hardware */
        !           149:        int64_t if_rip;
        !           150:        int64_t if_cs;
        !           151:        int64_t if_rflags;
        !           152:        /* These are pushed unconditionally on the x86-64 */
        !           153:        int64_t if_rsp;
        !           154:        int64_t if_ss;
        !           155: };
        !           156:
        !           157: /*
        !           158:  * Stack frame inside cpu_switch()
        !           159:  */
        !           160: struct switchframe {
        !           161:        int64_t sf_r15;
        !           162:        int64_t sf_r14;
        !           163:        int64_t sf_r13;
        !           164:        int64_t sf_r12;
        !           165:        int64_t sf_rbp;
        !           166:        int64_t sf_rbx;
        !           167:        int64_t sf_rip;
        !           168: };
        !           169:
        !           170: #endif  /* _AMD64_FRAME_H_ */

CVSweb