/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1#ifndef _UAPI_ASMAXP_PTRACE_H2#define _UAPI_ASMAXP_PTRACE_H345/*6* This struct defines the way the registers are stored on the7* kernel stack during a system call or other kernel entry8*9* NOTE! I want to minimize the overhead of system calls, so this10* struct has as little information as possible. It does not have11*12* - floating point regs: the kernel doesn't change those13* - r9-15: saved by the C compiler14*15* This makes "fork()" and "exec()" a bit more complex, but should16* give us low system call latency.17*/1819struct pt_regs {20unsigned long r0;21unsigned long r1;22unsigned long r2;23unsigned long r3;24unsigned long r4;25unsigned long r5;26unsigned long r6;27unsigned long r7;28unsigned long r8;29unsigned long r19;30unsigned long r20;31unsigned long r21;32unsigned long r22;33unsigned long r23;34unsigned long r24;35unsigned long r25;36unsigned long r26;37unsigned long r27;38unsigned long r28;39unsigned long hae;40/* JRP - These are the values provided to a0-a2 by PALcode */41unsigned long trap_a0;42unsigned long trap_a1;43unsigned long trap_a2;44/* This makes the stack 16-byte aligned as GCC expects */45unsigned long __pad0;46/* These are saved by PAL-code: */47unsigned long ps;48unsigned long pc;49unsigned long gp;50unsigned long r16;51unsigned long r17;52unsigned long r18;53};5455/*56* This is the extended stack used by signal handlers and the context57* switcher: it's pushed after the normal "struct pt_regs".58*/59struct switch_stack {60unsigned long r9;61unsigned long r10;62unsigned long r11;63unsigned long r12;64unsigned long r13;65unsigned long r14;66unsigned long r15;67unsigned long r26;68#ifndef __KERNEL__69unsigned long fp[32]; /* fp[31] is fpcr */70#endif71};727374#endif /* _UAPI_ASMAXP_PTRACE_H */757677