162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
262306a36Sopenharmony_ci#ifndef _UAPI_M68K_PTRACE_H
362306a36Sopenharmony_ci#define _UAPI_M68K_PTRACE_H
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci#define PT_D1	   0
662306a36Sopenharmony_ci#define PT_D2	   1
762306a36Sopenharmony_ci#define PT_D3	   2
862306a36Sopenharmony_ci#define PT_D4	   3
962306a36Sopenharmony_ci#define PT_D5	   4
1062306a36Sopenharmony_ci#define PT_D6	   5
1162306a36Sopenharmony_ci#define PT_D7	   6
1262306a36Sopenharmony_ci#define PT_A0	   7
1362306a36Sopenharmony_ci#define PT_A1	   8
1462306a36Sopenharmony_ci#define PT_A2	   9
1562306a36Sopenharmony_ci#define PT_A3	   10
1662306a36Sopenharmony_ci#define PT_A4	   11
1762306a36Sopenharmony_ci#define PT_A5	   12
1862306a36Sopenharmony_ci#define PT_A6	   13
1962306a36Sopenharmony_ci#define PT_D0	   14
2062306a36Sopenharmony_ci#define PT_USP	   15
2162306a36Sopenharmony_ci#define PT_ORIG_D0 16
2262306a36Sopenharmony_ci#define PT_SR	   17
2362306a36Sopenharmony_ci#define PT_PC	   18
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci#ifndef __ASSEMBLY__
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_ci/* this struct defines the way the registers are stored on the
2862306a36Sopenharmony_ci   stack during a system call. */
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_cistruct pt_regs {
3162306a36Sopenharmony_ci  long     d1;
3262306a36Sopenharmony_ci  long     d2;
3362306a36Sopenharmony_ci  long     d3;
3462306a36Sopenharmony_ci  long     d4;
3562306a36Sopenharmony_ci  long     d5;
3662306a36Sopenharmony_ci  long     a0;
3762306a36Sopenharmony_ci  long     a1;
3862306a36Sopenharmony_ci  long     a2;
3962306a36Sopenharmony_ci  long     d0;
4062306a36Sopenharmony_ci  long     orig_d0;
4162306a36Sopenharmony_ci  long     stkadj;
4262306a36Sopenharmony_ci#ifdef CONFIG_COLDFIRE
4362306a36Sopenharmony_ci  unsigned format :  4; /* frame format specifier */
4462306a36Sopenharmony_ci  unsigned vector : 12; /* vector offset */
4562306a36Sopenharmony_ci  unsigned short sr;
4662306a36Sopenharmony_ci  unsigned long  pc;
4762306a36Sopenharmony_ci#else
4862306a36Sopenharmony_ci  unsigned short sr;
4962306a36Sopenharmony_ci  unsigned long  pc;
5062306a36Sopenharmony_ci  unsigned format :  4; /* frame format specifier */
5162306a36Sopenharmony_ci  unsigned vector : 12; /* vector offset */
5262306a36Sopenharmony_ci#endif
5362306a36Sopenharmony_ci};
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ci/*
5662306a36Sopenharmony_ci * This is the extended stack used by signal handlers and the context
5762306a36Sopenharmony_ci * switcher: it's pushed after the normal "struct pt_regs".
5862306a36Sopenharmony_ci */
5962306a36Sopenharmony_cistruct switch_stack {
6062306a36Sopenharmony_ci	unsigned long  d6;
6162306a36Sopenharmony_ci	unsigned long  d7;
6262306a36Sopenharmony_ci	unsigned long  a3;
6362306a36Sopenharmony_ci	unsigned long  a4;
6462306a36Sopenharmony_ci	unsigned long  a5;
6562306a36Sopenharmony_ci	unsigned long  a6;
6662306a36Sopenharmony_ci	unsigned long  retpc;
6762306a36Sopenharmony_ci};
6862306a36Sopenharmony_ci
6962306a36Sopenharmony_ci/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
7062306a36Sopenharmony_ci#define PTRACE_GETREGS            12
7162306a36Sopenharmony_ci#define PTRACE_SETREGS            13
7262306a36Sopenharmony_ci#define PTRACE_GETFPREGS          14
7362306a36Sopenharmony_ci#define PTRACE_SETFPREGS          15
7462306a36Sopenharmony_ci
7562306a36Sopenharmony_ci#define PTRACE_GET_THREAD_AREA    25
7662306a36Sopenharmony_ci
7762306a36Sopenharmony_ci#define PTRACE_GETFDPIC	31
7862306a36Sopenharmony_ci
7962306a36Sopenharmony_ci#define PTRACE_SINGLEBLOCK	33	/* resume execution until next branch */
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ci#define PTRACE_GETFDPIC_EXEC	0
8262306a36Sopenharmony_ci#define PTRACE_GETFDPIC_INTERP	1
8362306a36Sopenharmony_ci
8462306a36Sopenharmony_ci#endif /* __ASSEMBLY__ */
8562306a36Sopenharmony_ci#endif /* _UAPI_M68K_PTRACE_H */
86