1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56#ifndef _ASM_REGISTERS_H
57#define _ASM_REGISTERS_H
58
59#ifndef __ASSEMBLY__
60#define __OFFSET(X,N) ((X)+(N)*4)
61#define __OFFSETC(X,N) xxxxxxxxxxxxxxxxxxxxxxxx
62#else
63#define __OFFSET(X,N) ((X)+(N)*4)
64#define __OFFSETC(X,N) ((X)+(N))
65#endif
66
67
68
69
70
71
72
73
74#ifndef __ASSEMBLY__
75
76struct pt_regs {
77 unsigned long psr;
78 unsigned long isr;
79 unsigned long ccr;
80 unsigned long cccr;
81 unsigned long lr;
82 unsigned long lcr;
83 unsigned long pc;
84 unsigned long __status;
85 unsigned long syscallno;
86 unsigned long orig_gr8;
87 unsigned long gner0;
88 unsigned long gner1;
89 unsigned long long iacc0;
90 unsigned long tbr;
91 unsigned long sp;
92 unsigned long fp;
93 unsigned long gr3;
94 unsigned long gr4;
95 unsigned long gr5;
96 unsigned long gr6;
97 unsigned long gr7;
98 unsigned long gr8;
99 unsigned long gr9;
100 unsigned long gr10;
101 unsigned long gr11;
102 unsigned long gr12;
103 unsigned long gr13;
104 unsigned long gr14;
105 unsigned long gr15;
106 unsigned long gr16;
107 unsigned long gr17;
108 unsigned long gr18;
109 unsigned long gr19;
110 unsigned long gr20;
111 unsigned long gr21;
112 unsigned long gr22;
113 unsigned long gr23;
114 unsigned long gr24;
115 unsigned long gr25;
116 unsigned long gr26;
117 unsigned long gr27;
118 struct pt_regs *next_frame;
119 unsigned long gr29;
120 unsigned long gr30;
121 unsigned long gr31;
122} __attribute__((aligned(8)));
123
124#endif
125
126#define REG__STATUS_STEP 0x00000001
127#define REG__STATUS_STEPPED 0x00000002
128#define REG__STATUS_BROKE 0x00000004
129#define REG__STATUS_SYSC_ENTRY 0x40000000
130#define REG__STATUS_SYSC_EXIT 0x80000000
131
132#define REG_GR(R) __OFFSET(REG_GR0, (R))
133
134#define REG_SP REG_GR(1)
135#define REG_FP REG_GR(2)
136#define REG_PREV_FRAME REG_GR(28)
137#define REG_CURR_TASK REG_GR(29)
138
139
140
141
142
143#ifndef __ASSEMBLY__
144
145struct frv_debug_regs
146{
147 unsigned long dcr;
148 unsigned long ibar[4] __attribute__((aligned(8)));
149 unsigned long dbar[4] __attribute__((aligned(8)));
150 unsigned long dbdr[4][4] __attribute__((aligned(8)));
151 unsigned long dbmr[4][4] __attribute__((aligned(8)));
152} __attribute__((aligned(8)));
153
154#endif
155
156
157
158
159
160#ifndef __ASSEMBLY__
161
162struct user_int_regs
163{
164
165
166
167
168 unsigned long psr;
169 unsigned long isr;
170 unsigned long ccr;
171 unsigned long cccr;
172 unsigned long lr;
173 unsigned long lcr;
174 unsigned long pc;
175 unsigned long __status;
176 unsigned long syscallno;
177 unsigned long orig_gr8;
178 unsigned long gner[2];
179 unsigned long long iacc[1];
180
181 union {
182 unsigned long tbr;
183 unsigned long gr[64];
184 };
185};
186
187struct user_fpmedia_regs
188{
189
190 unsigned long fr[64];
191 unsigned long fner[2];
192 unsigned long msr[2];
193 unsigned long acc[8];
194 unsigned char accg[8];
195 unsigned long fsr[1];
196};
197
198struct user_context
199{
200 struct user_int_regs i;
201 struct user_fpmedia_regs f;
202
203
204
205
206 void *extension;
207} __attribute__((aligned(8)));
208
209struct frv_frame0 {
210 union {
211 struct pt_regs regs;
212 struct user_context uc;
213 };
214
215 struct frv_debug_regs debug;
216
217} __attribute__((aligned(32)));
218
219#endif
220
221#define __INT_GR(R) __OFFSET(__INT_GR0, (R))
222
223#define __FPMEDIA_FR(R) __OFFSET(__FPMEDIA_FR0, (R))
224#define __FPMEDIA_FNER(R) __OFFSET(__FPMEDIA_FNER0, (R))
225#define __FPMEDIA_MSR(R) __OFFSET(__FPMEDIA_MSR0, (R))
226#define __FPMEDIA_ACC(R) __OFFSET(__FPMEDIA_ACC0, (R))
227#define __FPMEDIA_ACCG(R) __OFFSETC(__FPMEDIA_ACCG0, (R))
228#define __FPMEDIA_FSR(R) __OFFSET(__FPMEDIA_FSR0, (R))
229
230#define __THREAD_GR(R) __OFFSET(__THREAD_GR16, (R) - 16)
231
232#endif
233