diff options
Diffstat (limited to 'arch/arm64/include/asm/ptrace.h')
-rw-r--r-- | arch/arm64/include/asm/ptrace.h | 75 |
1 files changed, 1 insertions, 74 deletions
diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h index fc2772a27c7..b04d3404f0d 100644 --- a/arch/arm64/include/asm/ptrace.h +++ b/arch/arm64/include/asm/ptrace.h | |||
@@ -19,11 +19,8 @@ | |||
19 | #ifndef __ASM_PTRACE_H | 19 | #ifndef __ASM_PTRACE_H |
20 | #define __ASM_PTRACE_H | 20 | #define __ASM_PTRACE_H |
21 | 21 | ||
22 | #include <linux/types.h> | 22 | #include <uapi/asm/ptrace.h> |
23 | 23 | ||
24 | #include <asm/hwcap.h> | ||
25 | |||
26 | #ifdef __KERNEL__ | ||
27 | /* AArch32-specific ptrace requests */ | 24 | /* AArch32-specific ptrace requests */ |
28 | #define COMPAT_PTRACE_GETREGS 12 | 25 | #define COMPAT_PTRACE_GETREGS 12 |
29 | #define COMPAT_PTRACE_SETREGS 13 | 26 | #define COMPAT_PTRACE_SETREGS 13 |
@@ -33,48 +30,9 @@ | |||
33 | #define COMPAT_PTRACE_SETVFPREGS 28 | 30 | #define COMPAT_PTRACE_SETVFPREGS 28 |
34 | #define COMPAT_PTRACE_GETHBPREGS 29 | 31 | #define COMPAT_PTRACE_GETHBPREGS 29 |
35 | #define COMPAT_PTRACE_SETHBPREGS 30 | 32 | #define COMPAT_PTRACE_SETHBPREGS 30 |
36 | #endif | ||
37 | |||
38 | /* | ||
39 | * PSR bits | ||
40 | */ | ||
41 | #define PSR_MODE_EL0t 0x00000000 | ||
42 | #define PSR_MODE_EL1t 0x00000004 | ||
43 | #define PSR_MODE_EL1h 0x00000005 | ||
44 | #define PSR_MODE_EL2t 0x00000008 | ||
45 | #define PSR_MODE_EL2h 0x00000009 | ||
46 | #define PSR_MODE_EL3t 0x0000000c | ||
47 | #define PSR_MODE_EL3h 0x0000000d | ||
48 | #define PSR_MODE_MASK 0x0000000f | ||
49 | |||
50 | /* AArch32 CPSR bits */ | ||
51 | #define PSR_MODE32_BIT 0x00000010 | ||
52 | #ifdef __KERNEL__ | ||
53 | #define COMPAT_PSR_MODE_USR 0x00000010 | 33 | #define COMPAT_PSR_MODE_USR 0x00000010 |
54 | #define COMPAT_PSR_T_BIT 0x00000020 | 34 | #define COMPAT_PSR_T_BIT 0x00000020 |
55 | #define COMPAT_PSR_IT_MASK 0x0600fc00 /* If-Then execution state mask */ | 35 | #define COMPAT_PSR_IT_MASK 0x0600fc00 /* If-Then execution state mask */ |
56 | #endif | ||
57 | |||
58 | /* AArch64 SPSR bits */ | ||
59 | #define PSR_F_BIT 0x00000040 | ||
60 | #define PSR_I_BIT 0x00000080 | ||
61 | #define PSR_A_BIT 0x00000100 | ||
62 | #define PSR_D_BIT 0x00000200 | ||
63 | #define PSR_Q_BIT 0x08000000 | ||
64 | #define PSR_V_BIT 0x10000000 | ||
65 | #define PSR_C_BIT 0x20000000 | ||
66 | #define PSR_Z_BIT 0x40000000 | ||
67 | #define PSR_N_BIT 0x80000000 | ||
68 | |||
69 | /* | ||
70 | * Groups of PSR bits | ||
71 | */ | ||
72 | #define PSR_f 0xff000000 /* Flags */ | ||
73 | #define PSR_s 0x00ff0000 /* Status */ | ||
74 | #define PSR_x 0x0000ff00 /* Extension */ | ||
75 | #define PSR_c 0x000000ff /* Control */ | ||
76 | |||
77 | #ifdef __KERNEL__ | ||
78 | /* | 36 | /* |
79 | * These are 'magic' values for PTRACE_PEEKUSR that return info about where a | 37 | * These are 'magic' values for PTRACE_PEEKUSR that return info about where a |
80 | * process is located in memory. | 38 | * process is located in memory. |
@@ -82,36 +40,8 @@ | |||
82 | #define COMPAT_PT_TEXT_ADDR 0x10000 | 40 | #define COMPAT_PT_TEXT_ADDR 0x10000 |
83 | #define COMPAT_PT_DATA_ADDR 0x10004 | 41 | #define COMPAT_PT_DATA_ADDR 0x10004 |
84 | #define COMPAT_PT_TEXT_END_ADDR 0x10008 | 42 | #define COMPAT_PT_TEXT_END_ADDR 0x10008 |
85 | #endif | ||
86 | |||
87 | #ifndef __ASSEMBLY__ | 43 | #ifndef __ASSEMBLY__ |
88 | 44 | ||
89 | /* | ||
90 | * User structures for general purpose, floating point and debug registers. | ||
91 | */ | ||
92 | struct user_pt_regs { | ||
93 | __u64 regs[31]; | ||
94 | __u64 sp; | ||
95 | __u64 pc; | ||
96 | __u64 pstate; | ||
97 | }; | ||
98 | |||
99 | struct user_fpsimd_state { | ||
100 | __uint128_t vregs[32]; | ||
101 | __u32 fpsr; | ||
102 | __u32 fpcr; | ||
103 | }; | ||
104 | |||
105 | struct user_hwdebug_state { | ||
106 | __u32 dbg_info; | ||
107 | struct { | ||
108 | __u64 addr; | ||
109 | __u32 ctrl; | ||
110 | } dbg_regs[16]; | ||
111 | }; | ||
112 | |||
113 | #ifdef __KERNEL__ | ||
114 | |||
115 | /* sizeof(struct user) for AArch32 */ | 45 | /* sizeof(struct user) for AArch32 */ |
116 | #define COMPAT_USER_SZ 296 | 46 | #define COMPAT_USER_SZ 296 |
117 | /* AArch32 uses x13 as the stack pointer... */ | 47 | /* AArch32 uses x13 as the stack pointer... */ |
@@ -206,8 +136,5 @@ extern unsigned long profile_pc(struct pt_regs *regs); | |||
206 | 136 | ||
207 | extern int aarch32_break_trap(struct pt_regs *regs); | 137 | extern int aarch32_break_trap(struct pt_regs *regs); |
208 | 138 | ||
209 | #endif /* __KERNEL__ */ | ||
210 | |||
211 | #endif /* __ASSEMBLY__ */ | 139 | #endif /* __ASSEMBLY__ */ |
212 | |||
213 | #endif | 140 | #endif |