]>
Commit | Line | Data |
---|---|---|
6f52b16c | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
bc3966bf JH |
2 | #ifndef _UAPI_METAG_PTRACE_H |
3 | #define _UAPI_METAG_PTRACE_H | |
4 | ||
5 | #ifndef __ASSEMBLY__ | |
6 | ||
7 | /* | |
8 | * These are the layouts of the regsets returned by the GETREGSET ptrace call | |
9 | */ | |
10 | ||
11 | /* user_gp_regs::status */ | |
12 | ||
13 | /* CBMarker bit (indicates catch state / catch replay) */ | |
14 | #define USER_GP_REGS_STATUS_CATCH_BIT (1 << 22) | |
15 | #define USER_GP_REGS_STATUS_CATCH_S 22 | |
16 | /* LSM_STEP field (load/store multiple step) */ | |
17 | #define USER_GP_REGS_STATUS_LSM_STEP_BITS (0x7 << 8) | |
18 | #define USER_GP_REGS_STATUS_LSM_STEP_S 8 | |
19 | /* SCC bit (indicates split 16x16 condition flags) */ | |
20 | #define USER_GP_REGS_STATUS_SCC_BIT (1 << 4) | |
21 | #define USER_GP_REGS_STATUS_SCC_S 4 | |
22 | ||
23 | /* normal condition flags */ | |
24 | /* CF_Z bit (Zero flag) */ | |
25 | #define USER_GP_REGS_STATUS_CF_Z_BIT (1 << 3) | |
26 | #define USER_GP_REGS_STATUS_CF_Z_S 3 | |
27 | /* CF_N bit (Negative flag) */ | |
28 | #define USER_GP_REGS_STATUS_CF_N_BIT (1 << 2) | |
29 | #define USER_GP_REGS_STATUS_CF_N_S 2 | |
30 | /* CF_V bit (oVerflow flag) */ | |
31 | #define USER_GP_REGS_STATUS_CF_V_BIT (1 << 1) | |
32 | #define USER_GP_REGS_STATUS_CF_V_S 1 | |
33 | /* CF_C bit (Carry flag) */ | |
34 | #define USER_GP_REGS_STATUS_CF_C_BIT (1 << 0) | |
35 | #define USER_GP_REGS_STATUS_CF_C_S 0 | |
36 | ||
37 | /* split 16x16 condition flags */ | |
38 | /* SCF_LZ bit (Low Zero flag) */ | |
39 | #define USER_GP_REGS_STATUS_SCF_LZ_BIT (1 << 3) | |
40 | #define USER_GP_REGS_STATUS_SCF_LZ_S 3 | |
41 | /* SCF_HZ bit (High Zero flag) */ | |
42 | #define USER_GP_REGS_STATUS_SCF_HZ_BIT (1 << 2) | |
43 | #define USER_GP_REGS_STATUS_SCF_HZ_S 2 | |
44 | /* SCF_HC bit (High Carry flag) */ | |
45 | #define USER_GP_REGS_STATUS_SCF_HC_BIT (1 << 1) | |
46 | #define USER_GP_REGS_STATUS_SCF_HC_S 1 | |
47 | /* SCF_LC bit (Low Carry flag) */ | |
48 | #define USER_GP_REGS_STATUS_SCF_LC_BIT (1 << 0) | |
49 | #define USER_GP_REGS_STATUS_SCF_LC_S 0 | |
50 | ||
51 | /** | |
52 | * struct user_gp_regs - User general purpose registers | |
53 | * @dx: GP data unit regs (dx[reg][unit] = D{unit:0-1}.{reg:0-7}) | |
54 | * @ax: GP address unit regs (ax[reg][unit] = A{unit:0-1}.{reg:0-3}) | |
55 | * @pc: PC register | |
56 | * @status: TXSTATUS register (condition flags, LSM_STEP etc) | |
57 | * @rpt: TXRPT registers (branch repeat counter) | |
58 | * @bpobits: TXBPOBITS register ("branch prediction other" bits) | |
59 | * @mode: TXMODE register | |
60 | * @_pad1: Reserved padding to make sizeof obviously 64bit aligned | |
61 | * | |
62 | * This is the user-visible general purpose register state structure. | |
63 | * | |
64 | * It can be accessed through PTRACE_GETREGSET with NT_PRSTATUS. | |
65 | * | |
66 | * It is also used in the signal context. | |
67 | */ | |
68 | struct user_gp_regs { | |
69 | unsigned long dx[8][2]; | |
70 | unsigned long ax[4][2]; | |
71 | unsigned long pc; | |
72 | unsigned long status; | |
73 | unsigned long rpt; | |
74 | unsigned long bpobits; | |
75 | unsigned long mode; | |
76 | unsigned long _pad1; | |
77 | }; | |
78 | ||
79 | /** | |
80 | * struct user_cb_regs - User catch buffer registers | |
81 | * @flags: TXCATCH0 register (fault flags) | |
82 | * @addr: TXCATCH1 register (fault address) | |
83 | * @data: TXCATCH2 and TXCATCH3 registers (low and high data word) | |
84 | * | |
85 | * This is the user-visible catch buffer register state structure containing | |
86 | * information about a failed memory access, and allowing the access to be | |
87 | * modified and replayed. | |
88 | * | |
89 | * It can be accessed through PTRACE_GETREGSET with NT_METAG_CBUF. | |
90 | */ | |
91 | struct user_cb_regs { | |
92 | unsigned long flags; | |
93 | unsigned long addr; | |
94 | unsigned long long data; | |
95 | }; | |
96 | ||
97 | /** | |
98 | * struct user_rp_state - User read pipeline state | |
99 | * @entries: Read pipeline entries | |
100 | * @mask: Mask of valid pipeline entries (RPMask from TXDIVTIME register) | |
101 | * | |
102 | * This is the user-visible read pipeline state structure containing the entries | |
103 | * currently in the read pipeline and the mask of valid entries. | |
104 | * | |
105 | * It can be accessed through PTRACE_GETREGSET with NT_METAG_RPIPE. | |
106 | */ | |
107 | struct user_rp_state { | |
108 | unsigned long long entries[6]; | |
109 | unsigned long mask; | |
110 | }; | |
111 | ||
112 | #endif /* __ASSEMBLY__ */ | |
113 | ||
114 | #endif /* _UAPI_METAG_PTRACE_H */ |