1 #ifndef_ASMAXP_PTRACE_H 2 #define_ASMAXP_PTRACE_H 3
4
5 /* 6 * This struct defines the way the registers are stored on the 7 * kernel stack during a system call or other kernel entry 8 * 9 * NOTE! I want to minimize the overhead of system calls, so this 10 * struct has as little information as possible. I does not have 11 * 12 * - floating point regs: the kernel doesn't change those 13 * - r9-15: saved by the C compiler 14 * 15 * This makes "fork()" and "exec()" a bit more complex, but should 16 * give us low system call latency. 17 */ 18
19 structpt_regs{ 20 unsignedlongr0;
21 unsignedlong r1;
22 unsignedlong r2;
23 unsignedlong r3;
24 unsignedlong r4;
25 unsignedlong r5;
26 unsignedlong r6;
27 unsignedlong r7;
28 unsignedlong r8;
29 unsignedlong r19;
30 unsignedlong r20;
31 unsignedlong r21;
32 unsignedlong r22;
33 unsignedlong r23;
34 unsignedlong r24;
35 unsignedlong r25;
36 unsignedlongr26;
37 unsignedlong r27;
38 unsignedlong r28;
39 unsignedlong hae;
40 /* These are saved by PAL-code: */ 41 unsignedlongps;
42 unsignedlongpc;
43 unsignedlonggp;
44 unsignedlong r16;
45 unsignedlong r17;
46 unsignedlong r18;
47 };
48
49 #ifdef__KERNEL__ 50 #defineuser_mode(regs) ((regs)->ps & 8)
51 externvoidshow_regs(structpt_regs *);
52 #endif 53
54 #endif