Subversion Repositories HelenOS-historic

Rev

Rev 1716 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1716 Rev 1726
Line 119... Line 119...
119
.org 0x100
119
.org 0x100
120
.global exc_system_reset
120
.global exc_system_reset
121
exc_system_reset:
121
exc_system_reset:
122
	CONTEXT_STORE
122
	CONTEXT_STORE
123
	
123
	
124
	lis r12, exc_dispatch@ha
-
 
125
	addi r12, r12, exc_dispatch@l
-
 
126
	mtsrr0 r12
-
 
127
	
-
 
128
	li r3, 0
124
	li r3, 0
129
	b jump_to_kernel
125
	b jump_to_kernel
130
 
126
 
131
.org 0x200
127
.org 0x200
132
.global exc_machine_check
128
.global exc_machine_check
133
exc_machine_check:
129
exc_machine_check:
134
	CONTEXT_STORE
130
	CONTEXT_STORE
135
	
131
	
136
	lis r12, exc_dispatch@ha
-
 
137
	addi r12, r12, exc_dispatch@l
-
 
138
	mtsrr0 r12
-
 
139
	
-
 
140
	li r3, 1
132
	li r3, 1
141
	b jump_to_kernel
133
	b jump_to_kernel
142
 
134
 
143
.org 0x300
135
.org 0x300
144
.global exc_data_storage
136
.global exc_data_storage
145
exc_data_storage:
137
exc_data_storage:
146
	CONTEXT_STORE
138
	CONTEXT_STORE
147
	
139
	
-
 
140
#	li r3, 2
148
	lis r12, exc_dispatch@ha
141
#	mr r4, sp
149
	addi r12, r12, exc_dispatch@l
142
#	addi r4, r4, 8
-
 
143
#	bl pht_real_refill
-
 
144
	
150
	mtsrr0 r12
145
#	cmpwi r3, 0
-
 
146
#	bne iret_real
151
	
147
	
152
	li r3, 2
148
	li r3, 2
153
	b jump_to_kernel
149
	b jump_to_kernel
154
 
150
 
155
.org 0x400
151
.org 0x400
156
.global exc_instruction_storage
152
.global exc_instruction_storage
157
exc_instruction_storage:
153
exc_instruction_storage:
158
	CONTEXT_STORE
154
	CONTEXT_STORE
159
	
155
	
-
 
156
#	li r3, 3
160
	lis r12, exc_dispatch@ha
157
#	mr r4, sp
161
	addi r12, r12, exc_dispatch@l
158
#	addi r4, r4, 8
162
	mtsrr0 r12
159
#	bl pht_real_refill
163
	
160
	
-
 
161
#	cmpwi r3, 0
-
 
162
#	bne iret_real
-
 
163
 
164
	li r3, 3
164
	li r3, 3
165
	b jump_to_kernel
165
	b jump_to_kernel
166
 
166
 
167
.org 0x500
167
.org 0x500
168
.global exc_external
168
.global exc_external
169
exc_external:
169
exc_external:
170
	CONTEXT_STORE
170
	CONTEXT_STORE
171
	
171
	
172
	lis r12, exc_dispatch@ha
-
 
173
	addi r12, r12, exc_dispatch@l
-
 
174
	mtsrr0 r12
-
 
175
	
-
 
176
	li r3, 4
172
	li r3, 4
177
	b jump_to_kernel
173
	b jump_to_kernel
178
 
174
 
179
.org 0x600
175
.org 0x600
180
.global exc_alignment
176
.global exc_alignment
181
exc_alignment:
177
exc_alignment:
182
	CONTEXT_STORE
178
	CONTEXT_STORE
183
	
179
	
184
	lis r12, exc_dispatch@ha
-
 
185
	addi r12, r12, exc_dispatch@l
-
 
186
	mtsrr0 r12
-
 
187
	
-
 
188
	li r3, 5
180
	li r3, 5
189
	b jump_to_kernel
181
	b jump_to_kernel
190
 
182
 
191
.org 0x700
183
.org 0x700
192
.global exc_program
184
.global exc_program
193
exc_program:
185
exc_program:
194
	CONTEXT_STORE
186
	CONTEXT_STORE
195
	
187
	
196
	lis r12, exc_dispatch@ha
-
 
197
	addi r12, r12, exc_dispatch@l
-
 
198
	mtsrr0 r12
-
 
199
	
-
 
200
	li r3, 6
188
	li r3, 6
201
	b jump_to_kernel
189
	b jump_to_kernel
202
 
190
 
203
.org 0x800
191
.org 0x800
204
.global exc_fp_unavailable
192
.global exc_fp_unavailable
205
exc_fp_unavailable:
193
exc_fp_unavailable:
206
	CONTEXT_STORE
194
	CONTEXT_STORE
207
	
195
	
208
	lis r12, exc_dispatch@ha
-
 
209
	addi r12, r12, exc_dispatch@l
-
 
210
	mtsrr0 r12
-
 
211
	
-
 
212
	li r3, 7
196
	li r3, 7
213
	b jump_to_kernel
197
	b jump_to_kernel
214
 
198
 
215
.org 0x900
199
.org 0x900
216
.global exc_decrementer
200
.global exc_decrementer
217
exc_decrementer:
201
exc_decrementer:
218
	CONTEXT_STORE
202
	CONTEXT_STORE
219
 
-
 
220
	lis r12, exc_dispatch@ha
-
 
221
	addi r12, r12, exc_dispatch@l
-
 
222
	mtsrr0 r12
-
 
223
	
203
	
224
	li r3, 8
204
	li r3, 8
225
	b jump_to_kernel
205
	b jump_to_kernel
226
 
206
 
227
.org 0xa00
207
.org 0xa00
228
.global exc_reserved0
208
.global exc_reserved0
229
exc_reserved0:
209
exc_reserved0:
230
	CONTEXT_STORE
210
	CONTEXT_STORE
231
	
211
	
232
	lis r12, exc_dispatch@ha
-
 
233
	addi r12, r12, exc_dispatch@l
-
 
234
	mtsrr0 r12
-
 
235
	
-
 
236
	li r3, 9
212
	li r3, 9
237
	b jump_to_kernel
213
	b jump_to_kernel
238
 
214
 
239
.org 0xb00
215
.org 0xb00
240
.global exc_reserved1
216
.global exc_reserved1
241
exc_reserved1:
217
exc_reserved1:
242
	CONTEXT_STORE
218
	CONTEXT_STORE
243
	
219
	
244
	lis r12, exc_dispatch@ha
-
 
245
	addi r12, r12, exc_dispatch@l
-
 
246
	mtsrr0 r12
-
 
247
	
-
 
248
	li r3, 10
220
	li r3, 10
249
	b jump_to_kernel
221
	b jump_to_kernel
250
 
222
 
251
.org 0xc00
223
.org 0xc00
252
.global exc_syscall
224
.global exc_syscall
Line 258... Line 230...
258
.org 0xd00
230
.org 0xd00
259
.global exc_trace
231
.global exc_trace
260
exc_trace:
232
exc_trace:
261
	CONTEXT_STORE
233
	CONTEXT_STORE
262
	
234
	
263
	lis r12, exc_dispatch@ha
-
 
264
	addi r12, r12, exc_dispatch@l
-
 
265
	mtsrr0 r12
-
 
266
	
-
 
267
	li r3, 12
235
	li r3, 12
268
	b jump_to_kernel
236
	b jump_to_kernel
269
 
237
 
270
.org 0x4000
238
.org 0x4000
271
jump_to_kernel:
239
jump_to_kernel:
272
	lis r12, iret@ha
240
	lis r12, iret@ha
273
	addi r12, r12, iret@l
241
	addi r12, r12, iret@l
274
	mtlr r12
242
	mtlr r12
-
 
243
	
-
 
244
	lis r12, exc_dispatch@ha
-
 
245
	addi r12, r12, exc_dispatch@l
-
 
246
	mtsrr0 r12
275
 
247
	
276
	mfmsr r12
248
	mfmsr r12
277
	ori r12, r12, (msr_ir | msr_dr)@l
249
	ori r12, r12, (msr_ir | msr_dr)@l
278
	mtsrr1 r12
250
	mtsrr1 r12
279
	
251
	
280
	addis sp, sp, 0x8000
252
	addis sp, sp, 0x8000
Line 289... Line 261...
289
	mtsrr0 r12
261
	mtsrr0 r12
290
	
262
	
291
	lis r12, iret_syscall@ha
263
	lis r12, iret_syscall@ha
292
	addi r12, r12, iret_syscall@l
264
	addi r12, r12, iret_syscall@l
293
	mtlr r12
265
	mtlr r12
294
 
266
	
295
	mfmsr r12
267
	mfmsr r12
296
	ori r12, r12, (msr_ir | msr_dr)@l
268
	ori r12, r12, (msr_ir | msr_dr)@l
297
	mtsrr1 r12
269
	mtsrr1 r12
298
	
270
	
299
	addis sp, sp, 0x8000
271
	addis sp, sp, 0x8000
300
	rfi
272
	rfi
-
 
273
 
-
 
274
iret_real:
-
 
275
	
-
 
276
	lwz r0, 8(sp)
-
 
277
	lwz r2, 12(sp)
-
 
278
	lwz r3, 16(sp)
-
 
279
	lwz r4, 20(sp)
-
 
280
	lwz r5, 24(sp)
-
 
281
	lwz r6, 28(sp)
-
 
282
	lwz r7, 32(sp)
-
 
283
	lwz r8, 36(sp)
-
 
284
	lwz r9, 40(sp)
-
 
285
	lwz r10, 44(sp)
-
 
286
	lwz r11, 48(sp)
-
 
287
	lwz r13, 52(sp)
-
 
288
	lwz r14, 56(sp)
-
 
289
	lwz r15, 60(sp)
-
 
290
	lwz r16, 64(sp)
-
 
291
	lwz r17, 68(sp)
-
 
292
	lwz r18, 72(sp)
-
 
293
	lwz r19, 76(sp)
-
 
294
	lwz r20, 80(sp)
-
 
295
	lwz r21, 84(sp)
-
 
296
	lwz r22, 88(sp)
-
 
297
	lwz r23, 92(sp)
-
 
298
	lwz r24, 96(sp)
-
 
299
	lwz r25, 100(sp)
-
 
300
	lwz r26, 104(sp)
-
 
301
	lwz r27, 108(sp)
-
 
302
	lwz r28, 112(sp)
-
 
303
	lwz r29, 116(sp)
-
 
304
	lwz r30, 120(sp)
-
 
305
	lwz r31, 124(sp)
-
 
306
	
-
 
307
	lwz r12, 128(sp)
-
 
308
	mtcr r12
-
 
309
	
-
 
310
	lwz r12, 132(sp)
-
 
311
	mtsrr0 r12
-
 
312
	
-
 
313
	lwz r12, 136(sp)
-
 
314
	mtsrr1 r12
-
 
315
	
-
 
316
	lwz r12, 140(sp)
-
 
317
	mtlr r12
-
 
318
	
-
 
319
	lwz r12, 144(sp)
-
 
320
	mtctr r12
-
 
321
	
-
 
322
	lwz r12, 148(sp)
-
 
323
	mtxer r12
-
 
324
	
-
 
325
	lwz r12, 152(sp)
-
 
326
	lwz sp, 156(sp)
-
 
327
	
-
 
328
	rfi