1/* $Id: sigcontext.h,v 1.1.1.1 2008/10/15 03:27:26 james26_jang Exp $ */ 2#ifndef __SPARC_SIGCONTEXT_H 3#define __SPARC_SIGCONTEXT_H 4 5#ifdef __KERNEL__ 6#include <asm/ptrace.h> 7#endif 8 9#ifndef __ASSEMBLY__ 10 11#define __SUNOS_MAXWIN 31 12 13/* This is what SunOS does, so shall I. */ 14struct sigcontext { 15 int sigc_onstack; /* state to restore */ 16 int sigc_mask; /* sigmask to restore */ 17 int sigc_sp; /* stack pointer */ 18 int sigc_pc; /* program counter */ 19 int sigc_npc; /* next program counter */ 20 int sigc_psr; /* for condition codes etc */ 21 int sigc_g1; /* User uses these two registers */ 22 int sigc_o0; /* within the trampoline code. */ 23 24 /* Now comes information regarding the users window set 25 * at the time of the signal. 26 */ 27 int sigc_oswins; /* outstanding windows */ 28 29 /* stack ptrs for each regwin buf */ 30 char *sigc_spbuf[__SUNOS_MAXWIN]; 31 32 /* Windows to restore after signal */ 33 struct { 34 unsigned long locals[8]; 35 unsigned long ins[8]; 36 } sigc_wbuf[__SUNOS_MAXWIN]; 37}; 38 39typedef struct { 40 struct { 41 unsigned long psr; 42 unsigned long pc; 43 unsigned long npc; 44 unsigned long y; 45 unsigned long u_regs[16]; /* globals and ins */ 46 } si_regs; 47 int si_mask; 48} __siginfo_t; 49 50typedef struct { 51 unsigned long si_float_regs [32]; 52 unsigned long si_fsr; 53 unsigned long si_fpqdepth; 54 struct { 55 unsigned long *insn_addr; 56 unsigned long insn; 57 } si_fpqueue [16]; 58} __siginfo_fpu_t; 59 60#ifdef __KERNEL__ 61 62/* This magic should be in g_upper[0] for all upper parts 63 to be valid. 64 This is generated by sparc64 only, but for 32bit processes, 65 so we define it here as well. */ 66#define SIGINFO_EXTRA_V8PLUS_MAGIC 0x130e269 67typedef struct { 68 unsigned int g_upper[8]; 69 unsigned int o_upper[8]; 70} siginfo_extra_v8plus_t; 71 72#endif 73 74#endif /* !(__ASSEMBLY__) */ 75 76#endif /* !(__SPARC_SIGCONTEXT_H) */ 77