1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef _UAPI_ASM_SCORE_PTRACE_H
3 #define _UAPI_ASM_SCORE_PTRACE_H
5 #define PTRACE_GETREGS 12
6 #define PTRACE_SETREGS 13
8 #define SINGLESTEP16_INSN 0x7006
9 #define SINGLESTEP32_INSN 0x840C8000
10 #define BREAKPOINT16_INSN 0x7002 /* work on SPG300 */
11 #define BREAKPOINT32_INSN 0x84048000 /* work on SPG300 */
13 /* Define instruction mask */
14 #define INSN32_MASK 0x80008000
16 #define J32 0x88008000 /* 1_00010_0000000000_1_000000000000000 */
17 #define J32M 0xFC008000 /* 1_11111_0000000000_1_000000000000000 */
19 #define B32 0x90008000 /* 1_00100_0000000000_1_000000000000000 */
20 #define B32M 0xFC008000
21 #define BL32 0x90008001 /* 1_00100_0000000000_1_000000000000001 */
23 #define BR32 0x80008008 /* 1_00000_0000000000_1_00000000_000100_0 */
24 #define BR32M 0xFFE0807E
25 #define BRL32 0x80008009 /* 1_00000_0000000000_1_00000000_000100_1 */
28 #define B32_SET (J32 | B32 | BL32 | BR32 | BRL32)
30 #define J16 0x3000 /* 0_011_....... */
32 #define B16 0x4000 /* 0_100_....... */
34 #define BR16 0x0004 /* 0_000.......0100 */
36 #define B16_SET (J16 | B16 | BR16)
40 * This struct defines the way the registers are stored on the stack during a
41 * system call/exception. As usual the registers k0/k1 aren't being saved.
44 unsigned long pad0
[6]; /* stack arguments */
45 unsigned long orig_r4
;
46 unsigned long orig_r7
;
49 unsigned long regs
[32];
54 unsigned long sr0
; /* cnt */
55 unsigned long sr1
; /* lcr */
56 unsigned long sr2
; /* scr */
58 unsigned long cp0_epc
;
59 unsigned long cp0_ema
;
60 unsigned long cp0_psr
;
61 unsigned long cp0_ecr
;
62 unsigned long cp0_condition
;
66 #endif /* _UAPI_ASM_SCORE_PTRACE_H */