Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
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
4
5#define PTRACE_GETREGS 12
6#define PTRACE_SETREGS 13
7
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 */
12
13/* Define instruction mask */
14#define INSN32_MASK 0x80008000
15
16#define J32 0x88008000 /* 1_00010_0000000000_1_000000000000000 */
17#define J32M 0xFC008000 /* 1_11111_0000000000_1_000000000000000 */
18
19#define B32 0x90008000 /* 1_00100_0000000000_1_000000000000000 */
20#define B32M 0xFC008000
21#define BL32 0x90008001 /* 1_00100_0000000000_1_000000000000001 */
22#define BL32M B32
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 */
26#define BRL32M BR32M
27
28#define B32_SET (J32 | B32 | BL32 | BR32 | BRL32)
29
30#define J16 0x3000 /* 0_011_....... */
31#define J16M 0xF000
32#define B16 0x4000 /* 0_100_....... */
33#define B16M 0xF000
34#define BR16 0x0004 /* 0_000.......0100 */
35#define BR16M 0xF00F
36#define B16_SET (J16 | B16 | BR16)
37
38
39/*
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.
42 */
43struct pt_regs {
44 unsigned long pad0[6]; /* stack arguments */
45 unsigned long orig_r4;
46 unsigned long orig_r7;
47 long is_syscall;
48
49 unsigned long regs[32];
50
51 unsigned long cel;
52 unsigned long ceh;
53
54 unsigned long sr0; /* cnt */
55 unsigned long sr1; /* lcr */
56 unsigned long sr2; /* scr */
57
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;
63};
64
65
66#endif /* _UAPI_ASM_SCORE_PTRACE_H */