frame.h revision 66458
1/*- 2 * Copyright (c) 2000 Doug Rabson 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 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 * $FreeBSD: head/sys/ia64/include/frame.h 66458 2000-09-29 13:46:07Z dfr $ 27 */ 28 29#ifndef _MACHINE_FRAME_H_ 30#define _MACHINE_FRAME_H_ 31 32#include <machine/reg.h> 33 34/* 35 * Software trap, exception, and syscall frame. 36 * 37 * This is loosely based on the Linux pt_regs structure. When I 38 * understand things better, I might change it. 39 */ 40struct trapframe { 41 u_int64_t tf_cr_iip; 42 u_int64_t tf_cr_ipsr; 43 u_int64_t tf_cr_isr; 44 u_int64_t tf_cr_ifa; 45 u_int64_t tf_pr; 46 u_int64_t tf_ar_rsc; 47 u_int64_t tf_ar_pfs; 48 u_int64_t tf_cr_ifs; 49 u_int64_t tf_ar_bspstore; 50 u_int64_t tf_ar_rnat; 51 u_int64_t tf_ar_bsp; 52 u_int64_t tf_ar_unat; 53 u_int64_t tf_ar_ccv; 54 u_int64_t tf_ar_fpsr; 55 56 u_int64_t tf_b[8]; 57 58 u_int64_t tf_r[31]; /* don't need to save r0 */ 59#define FRAME_R1 0 60#define FRAME_GP 0 61#define FRAME_R2 1 62#define FRAME_R3 2 63#define FRAME_R4 3 64#define FRAME_R5 4 65#define FRAME_R6 5 66#define FRAME_R7 6 67#define FRAME_R8 7 68#define FRAME_R9 8 69#define FRAME_R10 9 70#define FRAME_R11 10 71#define FRAME_R12 11 72#define FRAME_SP 11 73#define FRAME_R13 12 74#define FRAME_TP 12 75#define FRAME_R14 13 76#define FRAME_R15 14 77#define FRAME_R16 15 78#define FRAME_R17 16 79#define FRAME_R18 17 80#define FRAME_R19 18 81#define FRAME_R20 19 82#define FRAME_R21 20 83#define FRAME_R22 21 84#define FRAME_R23 22 85#define FRAME_R24 23 86#define FRAME_R25 24 87#define FRAME_R26 25 88#define FRAME_R27 26 89#define FRAME_R28 27 90#define FRAME_R29 28 91#define FRAME_R30 29 92#define FRAME_R31 30 93 94 u_int64_t tf_pad1; 95 96 /* 97 * We rely on the compiler to save/restore f2-f5 and 98 * f16-f31. We also tell the compiler to avoid f32-f127 99 * completely so we don't worry about them at all. 100 */ 101 struct ia64_fpreg tf_f[10]; 102#define FRAME_F6 0 103#define FRAME_F7 1 104#define FRAME_F8 2 105#define FRAME_F9 3 106#define FRAME_F10 3 107#define FRAME_F11 3 108#define FRAME_F12 3 109#define FRAME_F13 3 110#define FRAME_F14 3 111#define FRAME_F15 3 112}; 113 114#endif /* _MACHINE_FRAME_H_ */ 115