frame.h revision 4
1234353Sdim/*- 2218885Sdim * Copyright (c) 1990 The Regents of the University of California. 3218885Sdim * All rights reserved. 4218885Sdim * 5218885Sdim * This code is derived from software contributed to Berkeley by 6218885Sdim * William Jolitz. 7218885Sdim * 8218885Sdim * Redistribution and use in source and binary forms, with or without 9218885Sdim * modification, are permitted provided that the following conditions 10218885Sdim * are met: 11218885Sdim * 1. Redistributions of source code must retain the above copyright 12218885Sdim * notice, this list of conditions and the following disclaimer. 13218885Sdim * 2. Redistributions in binary form must reproduce the above copyright 14218885Sdim * notice, this list of conditions and the following disclaimer in the 15249423Sdim * documentation and/or other materials provided with the distribution. 16218885Sdim * 3. All advertising materials mentioning features or use of this software 17218885Sdim * must display the following acknowledgement: 18276479Sdim * This product includes software developed by the University of 19218885Sdim * California, Berkeley and its contributors. 20218885Sdim * 4. Neither the name of the University nor the names of its contributors 21218885Sdim * may be used to endorse or promote products derived from this software 22218885Sdim * without specific prior written permission. 23218885Sdim * 24218885Sdim * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 25249423Sdim * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26218885Sdim * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27218885Sdim * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 28218885Sdim * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29218885Sdim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30218885Sdim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31218885Sdim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32234353Sdim * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33218885Sdim * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34218885Sdim * SUCH DAMAGE. 35218885Sdim * 36218885Sdim * @(#)frame.h 5.2 (Berkeley) 1/18/91 37218885Sdim */ 38218885Sdim 39276479Sdim/* 40276479Sdim * System stack frames. 41276479Sdim */ 42276479Sdim 43276479Sdim/* 44276479Sdim * Exception/Trap Stack Frame 45276479Sdim */ 46276479Sdim 47276479Sdimstruct trapframe { 48276479Sdim int tf_es; 49276479Sdim int tf_ds; 50276479Sdim int tf_edi; 51276479Sdim int tf_esi; 52276479Sdim int tf_ebp; 53276479Sdim int tf_isp; 54276479Sdim int tf_ebx; 55276479Sdim int tf_edx; 56276479Sdim int tf_ecx; 57276479Sdim int tf_eax; 58276479Sdim int tf_trapno; 59276479Sdim /* below portion defined in 386 hardware */ 60276479Sdim int tf_err; 61276479Sdim int tf_eip; 62276479Sdim int tf_cs; 63276479Sdim int tf_eflags; 64276479Sdim /* below only when transitting rings (e.g. user to kernel) */ 65276479Sdim int tf_esp; 66276479Sdim int tf_ss; 67276479Sdim}; 68276479Sdim 69276479Sdim/* Interrupt stack frame */ 70276479Sdim 71276479Sdimstruct intrframe { 72276479Sdim int if_vec; 73276479Sdim int if_ppl; 74276479Sdim int if_es; 75276479Sdim int if_ds; 76276479Sdim int if_edi; 77276479Sdim int if_esi; 78276479Sdim int if_ebp; 79276479Sdim int :32; 80276479Sdim int if_ebx; 81276479Sdim int if_edx; 82276479Sdim int if_ecx; 83276479Sdim int if_eax; 84276479Sdim int :32; /* for compat with trap frame - trapno */ 85276479Sdim int :32; /* for compat with trap frame - err */ 86276479Sdim /* below portion defined in 386 hardware */ 87276479Sdim int if_eip; 88276479Sdim int if_cs; 89276479Sdim int if_eflags; 90276479Sdim /* below only when transitting rings (e.g. user to kernel) */ 91276479Sdim int if_esp; 92276479Sdim int if_ss; 93276479Sdim}; 94276479Sdim 95276479Sdim/* 96276479Sdim * Call Gate/System Call Stack Frame 97276479Sdim */ 98276479Sdim 99276479Sdimstruct syscframe { 100276479Sdim int sf_edi; 101276479Sdim int sf_esi; 102276479Sdim int sf_ebp; 103276479Sdim int :32; /* redundant save of isp */ 104276479Sdim int sf_ebx; 105276479Sdim int sf_edx; 106276479Sdim int sf_ecx; 107276479Sdim int sf_eax; 108276479Sdim int sf_eflags; 109276479Sdim /* below portion defined in 386 hardware */ 110276479Sdim/* int sf_args[N]; /* if call gate copy args enabled!*/ 111276479Sdim int sf_eip; 112276479Sdim int sf_cs; 113276479Sdim /* below only when transitting rings (e.g. user to kernel) */ 114276479Sdim int sf_esp; 115276479Sdim int sf_ss; 116276479Sdim}; 117276479Sdim