diff options
author | Miguel de Icaza <miguel@nuclecu.unam.mx> | 1997-08-06 19:14:48 +0000 |
---|---|---|
committer | Miguel de Icaza <miguel@nuclecu.unam.mx> | 1997-08-06 19:14:48 +0000 |
commit | e2819e52a162873ff5061de81bb749831bdb5de9 (patch) | |
tree | 6067ea700202750ba335a423696f2972700e5f76 /include/asm-ppc/ptrace.h | |
parent | 17a005074429bbf143e40401f405ae4363e56828 (diff) |
Merge to 2.1.38.
IMPORTANT NOTE: I could not figure out what information is the
one that should be used for the following files (ie, those
that were in our tree, or those that came from Linus' patch),
please, check these:
include/asm-mips/jazz.h
include/asm-mips/jazzdma.h
include/asm-mips/ioctls.h
Diffstat (limited to 'include/asm-ppc/ptrace.h')
-rw-r--r-- | include/asm-ppc/ptrace.h | 82 |
1 files changed, 45 insertions, 37 deletions
diff --git a/include/asm-ppc/ptrace.h b/include/asm-ppc/ptrace.h index 5bad3b9da..13b526172 100644 --- a/include/asm-ppc/ptrace.h +++ b/include/asm-ppc/ptrace.h @@ -2,54 +2,61 @@ #define _PPC_PTRACE_H /* - * This struct defines the way the registers are stored on the - * kernel stack during a system call or other kernel entry. - * Note: the "_overhead" and "_underhead" spaces are stack locations - * used by called routines. Because of the way the PowerPC ABI - * specifies the function prologue/epilogue, registers can be - * saved in stack locations which are below the current stack - * pointer (_underhead). If an interrupt occurs during this - * [albeit] small time interval, registers which were saved on - * the stack could be trashed by the interrupt save code. The - * "_underhead" leaves a hole just in case this happens. It also - * wastes 80 bytes of stack if it doesn't! Similarly, the called - * routine stores some information "above" the stack pointer before - * if gets adjusted. This is covered by the "_overhead" field - * and [thankfully] is not totally wasted. + * this should only contain volatile regs + * since we can keep non-volatile in the tss + * should set this up when only volatiles are saved + * by intr code. * + * I can't find any reference to the above comment (from Gary Thomas) + * about _underhead/_overhead in the sys V abi for the ppc + * dated july 25, 1994. + * + * the stack must be kept to a size that is a multiple of 16 + * so this includes the stack frame overhead + * -- Cort. + */ + +/* + * GCC sometimes accesses words at negative offsets from the stack + * pointer, although the SysV ABI says it shouldn't. To cope with + * this, we leave this much untouched space on the stack on exception + * entry. */ +#define STACK_FRAME_OVERHEAD 16 +#define STACK_UNDERHEAD 64 +#ifndef __ASSEMBLY__ struct pt_regs { - unsigned long _overhead[14]; /* Callee's SP,LR,params */ - unsigned long gpr[32]; - unsigned long nip; - unsigned long msr; - unsigned long ctr; - unsigned long link; - unsigned long ccr; - unsigned long xer; - unsigned long dar; /* Fault registers */ - unsigned long dsisr; - unsigned long srr1; - unsigned long srr0; - unsigned long hash1, hash2; - unsigned long imiss, dmiss; - unsigned long icmp, dcmp; - unsigned long orig_gpr3; /* Used for restarting system calls */ - unsigned long result; /* Result of a system call */ - double fpcsr; - unsigned long trap; /* Reason for being here */ - unsigned long marker; /* Should have DEADDEAD */ - /*unsigned long _underhead[20]; *//* Callee's register save area */ - unsigned long edx; /* for binfmt_elf.c which wants edx */ + unsigned long gpr[32]; + unsigned long nip; + unsigned long msr; + unsigned long ctr; + unsigned long link; + unsigned long ccr; + unsigned long xer; + unsigned long dar; /* Fault registers */ + unsigned long dsisr; +#if 0 + unsigned long srr1; + unsigned long srr0; + unsigned long hash1, hash2; + unsigned long imiss, dmiss; + unsigned long icmp, dcmp; +#endif + unsigned long orig_gpr3; /* Used for restarting system calls */ + unsigned long result; /* Result of a system call */ + unsigned long trap; /* Reason for being here */ + unsigned long marker; /* Should have DEADDEAD */ }; + #define instruction_pointer(regs) ((regs)->nip) #define user_mode(regs) ((regs)->msr & 0x4000) #ifdef KERNEL extern void show_regs(struct pt_regs *); #endif +/* should include and generate these in ppc_defs.h -- Cort */ /* Offsets used by 'ptrace' system call interface */ /* Note: these should correspond to gpr[x] */ #define PT_R0 0 @@ -94,6 +101,7 @@ extern void show_regs(struct pt_regs *); #define PT_CCR 38 #define PT_FPR0 48 +#endif /* __ASSEMBLY__ */ -#endif +#endif /* _PPC_PTRACE_H */ |