|
1 | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
2 | 2 |
|
| 3 | +/* |
| 4 | + * Set of msr bits that gdb can change on behalf of a process. |
| 5 | + */ |
| 6 | +#ifdef CONFIG_PPC_ADV_DEBUG_REGS |
| 7 | +#define MSR_DEBUGCHANGE 0 |
| 8 | +#else |
| 9 | +#define MSR_DEBUGCHANGE (MSR_SE | MSR_BE) |
| 10 | +#endif |
| 11 | + |
| 12 | +/* |
| 13 | + * Max register writeable via put_reg |
| 14 | + */ |
| 15 | +#ifdef CONFIG_PPC32 |
| 16 | +#define PT_MAX_PUT_REG PT_MQ |
| 17 | +#else |
| 18 | +#define PT_MAX_PUT_REG PT_CCR |
| 19 | +#endif |
| 20 | + |
| 21 | +#define TVSO(f) (offsetof(struct thread_vr_state, f)) |
| 22 | +#define TFSO(f) (offsetof(struct thread_fp_state, f)) |
| 23 | +#define TSO(f) (offsetof(struct thread_struct, f)) |
| 24 | + |
3 | 25 | /* ptrace-(no)vsx */ |
4 | 26 |
|
5 | 27 | int fpr_get(struct task_struct *target, const struct user_regset *regset, |
@@ -37,8 +59,75 @@ int evr_set(struct task_struct *target, const struct user_regset *regset, |
37 | 59 |
|
38 | 60 | /* ptrace */ |
39 | 61 |
|
| 62 | +int gpr32_get_common(struct task_struct *target, |
| 63 | + const struct user_regset *regset, |
| 64 | + unsigned int pos, unsigned int count, |
| 65 | + void *kbuf, void __user *ubuf, |
| 66 | + unsigned long *regs); |
| 67 | +int gpr32_set_common(struct task_struct *target, |
| 68 | + const struct user_regset *regset, |
| 69 | + unsigned int pos, unsigned int count, |
| 70 | + const void *kbuf, const void __user *ubuf, |
| 71 | + unsigned long *regs); |
| 72 | + |
| 73 | +/* ptrace-tm */ |
| 74 | + |
40 | 75 | #ifdef CONFIG_PPC_TRANSACTIONAL_MEM |
41 | 76 | void flush_tmregs_to_thread(struct task_struct *tsk); |
42 | 77 | #else |
43 | 78 | static inline void flush_tmregs_to_thread(struct task_struct *tsk) { } |
44 | 79 | #endif |
| 80 | + |
| 81 | +int tm_cgpr_active(struct task_struct *target, const struct user_regset *regset); |
| 82 | +int tm_cgpr_get(struct task_struct *target, const struct user_regset *regset, |
| 83 | + unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf); |
| 84 | +int tm_cgpr_set(struct task_struct *target, const struct user_regset *regset, |
| 85 | + unsigned int pos, unsigned int count, |
| 86 | + const void *kbuf, const void __user *ubuf); |
| 87 | +int tm_cfpr_active(struct task_struct *target, const struct user_regset *regset); |
| 88 | +int tm_cfpr_get(struct task_struct *target, const struct user_regset *regset, |
| 89 | + unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf); |
| 90 | +int tm_cfpr_set(struct task_struct *target, const struct user_regset *regset, |
| 91 | + unsigned int pos, unsigned int count, |
| 92 | + const void *kbuf, const void __user *ubuf); |
| 93 | +int tm_cvmx_active(struct task_struct *target, const struct user_regset *regset); |
| 94 | +int tm_cvmx_get(struct task_struct *target, const struct user_regset *regset, |
| 95 | + unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf); |
| 96 | +int tm_cvmx_set(struct task_struct *target, const struct user_regset *regset, |
| 97 | + unsigned int pos, unsigned int count, |
| 98 | + const void *kbuf, const void __user *ubuf); |
| 99 | +int tm_cvsx_active(struct task_struct *target, const struct user_regset *regset); |
| 100 | +int tm_cvsx_get(struct task_struct *target, const struct user_regset *regset, |
| 101 | + unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf); |
| 102 | +int tm_cvsx_set(struct task_struct *target, const struct user_regset *regset, |
| 103 | + unsigned int pos, unsigned int count, |
| 104 | + const void *kbuf, const void __user *ubuf); |
| 105 | +int tm_spr_active(struct task_struct *target, const struct user_regset *regset); |
| 106 | +int tm_spr_get(struct task_struct *target, const struct user_regset *regset, |
| 107 | + unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf); |
| 108 | +int tm_spr_set(struct task_struct *target, const struct user_regset *regset, |
| 109 | + unsigned int pos, unsigned int count, |
| 110 | + const void *kbuf, const void __user *ubuf); |
| 111 | +int tm_tar_active(struct task_struct *target, const struct user_regset *regset); |
| 112 | +int tm_tar_get(struct task_struct *target, const struct user_regset *regset, |
| 113 | + unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf); |
| 114 | +int tm_tar_set(struct task_struct *target, const struct user_regset *regset, |
| 115 | + unsigned int pos, unsigned int count, |
| 116 | + const void *kbuf, const void __user *ubuf); |
| 117 | +int tm_ppr_active(struct task_struct *target, const struct user_regset *regset); |
| 118 | +int tm_ppr_get(struct task_struct *target, const struct user_regset *regset, |
| 119 | + unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf); |
| 120 | +int tm_ppr_set(struct task_struct *target, const struct user_regset *regset, |
| 121 | + unsigned int pos, unsigned int count, |
| 122 | + const void *kbuf, const void __user *ubuf); |
| 123 | +int tm_dscr_active(struct task_struct *target, const struct user_regset *regset); |
| 124 | +int tm_dscr_get(struct task_struct *target, const struct user_regset *regset, |
| 125 | + unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf); |
| 126 | +int tm_dscr_set(struct task_struct *target, const struct user_regset *regset, |
| 127 | + unsigned int pos, unsigned int count, |
| 128 | + const void *kbuf, const void __user *ubuf); |
| 129 | +int tm_cgpr32_get(struct task_struct *target, const struct user_regset *regset, |
| 130 | + unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf); |
| 131 | +int tm_cgpr32_set(struct task_struct *target, const struct user_regset *regset, |
| 132 | + unsigned int pos, unsigned int count, |
| 133 | + const void *kbuf, const void __user *ubuf); |
0 commit comments