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