162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 262306a36Sopenharmony_ci#ifndef _UAPI_ASMAXP_PTRACE_H 362306a36Sopenharmony_ci#define _UAPI_ASMAXP_PTRACE_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci/* 762306a36Sopenharmony_ci * This struct defines the way the registers are stored on the 862306a36Sopenharmony_ci * kernel stack during a system call or other kernel entry 962306a36Sopenharmony_ci * 1062306a36Sopenharmony_ci * NOTE! I want to minimize the overhead of system calls, so this 1162306a36Sopenharmony_ci * struct has as little information as possible. It does not have 1262306a36Sopenharmony_ci * 1362306a36Sopenharmony_ci * - floating point regs: the kernel doesn't change those 1462306a36Sopenharmony_ci * - r9-15: saved by the C compiler 1562306a36Sopenharmony_ci * 1662306a36Sopenharmony_ci * This makes "fork()" and "exec()" a bit more complex, but should 1762306a36Sopenharmony_ci * give us low system call latency. 1862306a36Sopenharmony_ci */ 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_cistruct pt_regs { 2162306a36Sopenharmony_ci unsigned long r0; 2262306a36Sopenharmony_ci unsigned long r1; 2362306a36Sopenharmony_ci unsigned long r2; 2462306a36Sopenharmony_ci unsigned long r3; 2562306a36Sopenharmony_ci unsigned long r4; 2662306a36Sopenharmony_ci unsigned long r5; 2762306a36Sopenharmony_ci unsigned long r6; 2862306a36Sopenharmony_ci unsigned long r7; 2962306a36Sopenharmony_ci unsigned long r8; 3062306a36Sopenharmony_ci unsigned long r19; 3162306a36Sopenharmony_ci unsigned long r20; 3262306a36Sopenharmony_ci unsigned long r21; 3362306a36Sopenharmony_ci unsigned long r22; 3462306a36Sopenharmony_ci unsigned long r23; 3562306a36Sopenharmony_ci unsigned long r24; 3662306a36Sopenharmony_ci unsigned long r25; 3762306a36Sopenharmony_ci unsigned long r26; 3862306a36Sopenharmony_ci unsigned long r27; 3962306a36Sopenharmony_ci unsigned long r28; 4062306a36Sopenharmony_ci unsigned long hae; 4162306a36Sopenharmony_ci/* JRP - These are the values provided to a0-a2 by PALcode */ 4262306a36Sopenharmony_ci unsigned long trap_a0; 4362306a36Sopenharmony_ci unsigned long trap_a1; 4462306a36Sopenharmony_ci unsigned long trap_a2; 4562306a36Sopenharmony_ci/* These are saved by PAL-code: */ 4662306a36Sopenharmony_ci unsigned long ps; 4762306a36Sopenharmony_ci unsigned long pc; 4862306a36Sopenharmony_ci unsigned long gp; 4962306a36Sopenharmony_ci unsigned long r16; 5062306a36Sopenharmony_ci unsigned long r17; 5162306a36Sopenharmony_ci unsigned long r18; 5262306a36Sopenharmony_ci}; 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ci/* 5562306a36Sopenharmony_ci * This is the extended stack used by signal handlers and the context 5662306a36Sopenharmony_ci * switcher: it's pushed after the normal "struct pt_regs". 5762306a36Sopenharmony_ci */ 5862306a36Sopenharmony_cistruct switch_stack { 5962306a36Sopenharmony_ci unsigned long r9; 6062306a36Sopenharmony_ci unsigned long r10; 6162306a36Sopenharmony_ci unsigned long r11; 6262306a36Sopenharmony_ci unsigned long r12; 6362306a36Sopenharmony_ci unsigned long r13; 6462306a36Sopenharmony_ci unsigned long r14; 6562306a36Sopenharmony_ci unsigned long r15; 6662306a36Sopenharmony_ci unsigned long r26; 6762306a36Sopenharmony_ci#ifndef __KERNEL__ 6862306a36Sopenharmony_ci unsigned long fp[32]; /* fp[31] is fpcr */ 6962306a36Sopenharmony_ci#endif 7062306a36Sopenharmony_ci}; 7162306a36Sopenharmony_ci 7262306a36Sopenharmony_ci 7362306a36Sopenharmony_ci#endif /* _UAPI_ASMAXP_PTRACE_H */ 74