~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/ia64/include/uapi/asm/ptrace.h

Version: ~ [ linux-5.18-rc6 ] ~ [ linux-5.17.6 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.38 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.114 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.192 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.241 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.277 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.312 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 /*
  3  * Copyright (C) 1998-2004 Hewlett-Packard Co
  4  *      David Mosberger-Tang <davidm@hpl.hp.com>
  5  *      Stephane Eranian <eranian@hpl.hp.com>
  6  * Copyright (C) 2003 Intel Co
  7  *      Suresh Siddha <suresh.b.siddha@intel.com>
  8  *      Fenghua Yu <fenghua.yu@intel.com>
  9  *      Arun Sharma <arun.sharma@intel.com>
 10  *
 11  * 12/07/98     S. Eranian      added pt_regs & switch_stack
 12  * 12/21/98     D. Mosberger    updated to match latest code
 13  *  6/17/99     D. Mosberger    added second unat member to "struct switch_stack"
 14  *
 15  */
 16 #ifndef _UAPI_ASM_IA64_PTRACE_H
 17 #define _UAPI_ASM_IA64_PTRACE_H
 18 
 19 /*
 20  * When a user process is blocked, its state looks as follows:
 21  *
 22  *            +----------------------+  ------- IA64_STK_OFFSET
 23  *            |                      |   ^
 24  *            | struct pt_regs       |   |
 25  *            |                      |   |
 26  *            +----------------------+   |
 27  *            |                      |   |
 28  *            |    memory stack      |   |
 29  *            | (growing downwards)  |   |
 30  *            //.....................//  |
 31  *                                       |
 32  *            //.....................//  |
 33  *            |                      |   |
 34  *            +----------------------+   |
 35  *            | struct switch_stack  |   |
 36  *            |                      |   |
 37  *            +----------------------+   |
 38  *            |                      |   |
 39  *            //.....................//  |
 40  *                                       |
 41  *            //.....................//  |
 42  *            |                      |   |
 43  *            |  register stack      |   |
 44  *            | (growing upwards)    |   |
 45  *            |                      |   |
 46  *            +----------------------+   |  --- IA64_RBS_OFFSET
 47  *            |  struct thread_info  |   |  ^
 48  *            +----------------------+   |  |
 49  *            |                      |   |  |
 50  *            |  struct task_struct  |   |  |
 51  * current -> |                      |   |  |
 52  *            +----------------------+ -------
 53  *
 54  * Note that ar.ec is not saved explicitly in pt_reg or switch_stack.
 55  * This is because ar.ec is saved as part of ar.pfs.
 56  */
 57 
 58 
 59 #include <asm/fpu.h>
 60 
 61 
 62 #ifndef __ASSEMBLY__
 63 
 64 /*
 65  * This struct defines the way the registers are saved on system
 66  * calls.
 67  *
 68  * We don't save all floating point register because the kernel
 69  * is compiled to use only a very small subset, so the other are
 70  * untouched.
 71  *
 72  * THIS STRUCTURE MUST BE A MULTIPLE 16-BYTE IN SIZE
 73  * (because the memory stack pointer MUST ALWAYS be aligned this way)
 74  *
 75  */
 76 struct pt_regs {
 77         /* The following registers are saved by SAVE_MIN: */
 78         unsigned long b6;               /* scratch */
 79         unsigned long b7;               /* scratch */
 80 
 81         unsigned long ar_csd;           /* used by cmp8xchg16 (scratch) */
 82         unsigned long ar_ssd;           /* reserved for future use (scratch) */
 83 
 84         unsigned long r8;               /* scratch (return value register 0) */
 85         unsigned long r9;               /* scratch (return value register 1) */
 86         unsigned long r10;              /* scratch (return value register 2) */
 87         unsigned long r11;              /* scratch (return value register 3) */
 88 
 89         unsigned long cr_ipsr;          /* interrupted task's psr */
 90         unsigned long cr_iip;           /* interrupted task's instruction pointer */
 91         /*
 92          * interrupted task's function state; if bit 63 is cleared, it
 93          * contains syscall's ar.pfs.pfm:
 94          */
 95         unsigned long cr_ifs;
 96 
 97         unsigned long ar_unat;          /* interrupted task's NaT register (preserved) */
 98         unsigned long ar_pfs;           /* prev function state  */
 99         unsigned long ar_rsc;           /* RSE configuration */
100         /* The following two are valid only if cr_ipsr.cpl > 0 || ti->flags & _TIF_MCA_INIT */
101         unsigned long ar_rnat;          /* RSE NaT */
102         unsigned long ar_bspstore;      /* RSE bspstore */
103 
104         unsigned long pr;               /* 64 predicate registers (1 bit each) */
105         unsigned long b0;               /* return pointer (bp) */
106         unsigned long loadrs;           /* size of dirty partition << 16 */
107 
108         unsigned long r1;               /* the gp pointer */
109         unsigned long r12;              /* interrupted task's memory stack pointer */
110         unsigned long r13;              /* thread pointer */
111 
112         unsigned long ar_fpsr;          /* floating point status (preserved) */
113         unsigned long r15;              /* scratch */
114 
115         /* The remaining registers are NOT saved for system calls.  */
116 
117         unsigned long r14;              /* scratch */
118         unsigned long r2;               /* scratch */
119         unsigned long r3;               /* scratch */
120 
121         /* The following registers are saved by SAVE_REST: */
122         unsigned long r16;              /* scratch */
123         unsigned long r17;              /* scratch */
124         unsigned long r18;              /* scratch */
125         unsigned long r19;              /* scratch */
126         unsigned long r20;              /* scratch */
127         unsigned long r21;              /* scratch */
128         unsigned long r22;              /* scratch */
129         unsigned long r23;              /* scratch */
130         unsigned long r24;              /* scratch */
131         unsigned long r25;              /* scratch */
132         unsigned long r26;              /* scratch */
133         unsigned long r27;              /* scratch */
134         unsigned long r28;              /* scratch */
135         unsigned long r29;              /* scratch */
136         unsigned long r30;              /* scratch */
137         unsigned long r31;              /* scratch */
138 
139         unsigned long ar_ccv;           /* compare/exchange value (scratch) */
140 
141         /*
142          * Floating point registers that the kernel considers scratch:
143          */
144         struct ia64_fpreg f6;           /* scratch */
145         struct ia64_fpreg f7;           /* scratch */
146         struct ia64_fpreg f8;           /* scratch */
147         struct ia64_fpreg f9;           /* scratch */
148         struct ia64_fpreg f10;          /* scratch */
149         struct ia64_fpreg f11;          /* scratch */
150 };
151 
152 /*
153  * This structure contains the addition registers that need to
154  * preserved across a context switch.  This generally consists of
155  * "preserved" registers.
156  */
157 struct switch_stack {
158         unsigned long caller_unat;      /* user NaT collection register (preserved) */
159         unsigned long ar_fpsr;          /* floating-point status register */
160 
161         struct ia64_fpreg f2;           /* preserved */
162         struct ia64_fpreg f3;           /* preserved */
163         struct ia64_fpreg f4;           /* preserved */
164         struct ia64_fpreg f5;           /* preserved */
165 
166         struct ia64_fpreg f12;          /* scratch, but untouched by kernel */
167         struct ia64_fpreg f13;          /* scratch, but untouched by kernel */
168         struct ia64_fpreg f14;          /* scratch, but untouched by kernel */
169         struct ia64_fpreg f15;          /* scratch, but untouched by kernel */
170         struct ia64_fpreg f16;          /* preserved */
171         struct ia64_fpreg f17;          /* preserved */
172         struct ia64_fpreg f18;          /* preserved */
173         struct ia64_fpreg f19;          /* preserved */
174         struct ia64_fpreg f20;          /* preserved */
175         struct ia64_fpreg f21;          /* preserved */
176         struct ia64_fpreg f22;          /* preserved */
177         struct ia64_fpreg f23;          /* preserved */
178         struct ia64_fpreg f24;          /* preserved */
179         struct ia64_fpreg f25;          /* preserved */
180         struct ia64_fpreg f26;          /* preserved */
181         struct ia64_fpreg f27;          /* preserved */
182         struct ia64_fpreg f28;          /* preserved */
183         struct ia64_fpreg f29;          /* preserved */
184         struct ia64_fpreg f30;          /* preserved */
185         struct ia64_fpreg f31;          /* preserved */
186 
187         unsigned long r4;               /* preserved */
188         unsigned long r5;               /* preserved */
189         unsigned long r6;               /* preserved */
190         unsigned long r7;               /* preserved */
191 
192         unsigned long b0;               /* so we can force a direct return in copy_thread */
193         unsigned long b1;
194         unsigned long b2;
195         unsigned long b3;
196         unsigned long b4;
197         unsigned long b5;
198 
199         unsigned long ar_pfs;           /* previous function state */
200         unsigned long ar_lc;            /* loop counter (preserved) */
201         unsigned long ar_unat;          /* NaT bits for r4-r7 */
202         unsigned long ar_rnat;          /* RSE NaT collection register */
203         unsigned long ar_bspstore;      /* RSE dirty base (preserved) */
204         unsigned long pr;               /* 64 predicate registers (1 bit each) */
205 };
206 
207 
208 /* pt_all_user_regs is used for PTRACE_GETREGS PTRACE_SETREGS */
209 struct pt_all_user_regs {
210         unsigned long nat;
211         unsigned long cr_iip;
212         unsigned long cfm;
213         unsigned long cr_ipsr;
214         unsigned long pr;
215 
216         unsigned long gr[32];
217         unsigned long br[8];
218         unsigned long ar[128];
219         struct ia64_fpreg fr[128];
220 };
221 
222 #endif /* !__ASSEMBLY__ */
223 
224 /* indices to application-registers array in pt_all_user_regs */
225 #define PT_AUR_RSC      16
226 #define PT_AUR_BSP      17
227 #define PT_AUR_BSPSTORE 18
228 #define PT_AUR_RNAT     19
229 #define PT_AUR_CCV      32
230 #define PT_AUR_UNAT     36
231 #define PT_AUR_FPSR     40
232 #define PT_AUR_PFS      64
233 #define PT_AUR_LC       65
234 #define PT_AUR_EC       66
235 
236 /*
237  * The numbers chosen here are somewhat arbitrary but absolutely MUST
238  * not overlap with any of the number assigned in <linux/ptrace.h>.
239  */
240 #define PTRACE_SINGLEBLOCK      12      /* resume execution until next branch */
241 #define PTRACE_OLD_GETSIGINFO   13      /* (replaced by PTRACE_GETSIGINFO in <linux/ptrace.h>)  */
242 #define PTRACE_OLD_SETSIGINFO   14      /* (replaced by PTRACE_SETSIGINFO in <linux/ptrace.h>)  */
243 #define PTRACE_GETREGS          18      /* get all registers (pt_all_user_regs) in one shot */
244 #define PTRACE_SETREGS          19      /* set all registers (pt_all_user_regs) in one shot */
245 
246 #define PTRACE_OLDSETOPTIONS    21
247 
248 #endif /* _UAPI_ASM_IA64_PTRACE_H */
249 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp