5 * This struct defines the way the registers are stored on the 6 * kernel stack during a system call or other kernel entry. 8 * this should only contain volatile regs 9 * since we can keep non-volatile in the thread_struct 10 * should set this up when only volatiles are saved 13 * Since this is going on the stack, *CARE MUST BE TAKEN* to insure 14 * that the overall structure is a multiple of 16 bytes in length. 16 * Note that the offsets of the fields in this struct correspond with 17 * the PT_* values below. This simplifies arch/ppc/kernel/ptrace.c. 20 #include <linux/config.h> 24 #define PPC_REG unsigned long/*long*/ 26 #define PPC_REG unsigned long 32 PPC_REG orig_gpr3
;/* Used for restarting system calls */ 37 PPC_REG mq
;/* 601 only (not used at present) */ 38 /* Used on APUS to hold IPL value. */ 39 PPC_REG trap
;/* Reason for being here */ 40 PPC_REG dar
;/* Fault registers */ 42 PPC_REG result
;/* Result of a system call */ 46 #define STACK_FRAME_OVERHEAD 16/* size of minimum stack frame */ 48 /* Size of stack frame allocated when calling signal handler. */ 49 #define __SIGNAL_FRAMESIZE 64 51 #define instruction_pointer(regs) ((regs)->nip) 52 #define user_mode(regs) ((regs)->msr & 0x4000) 55 * Offsets used by 'ptrace' system call interface. 56 * These can't be changed without breaking binary compatibility 103 #define PT_FPR0 48/* each FP reg occupies 2 slots in this space */ 104 #define PT_FPR31 (PT_FPR0 + 2*31) 105 #define PT_FPSCR (PT_FPR0 + 2*32 + 1)