Subversion Repositories HelenOS

Rev

Rev 3022 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3022 Rev 4055
Line 58... Line 58...
58
		mfsprg2 sp
58
		mfsprg2 sp
59
		subis sp, sp, 0x8000
59
		subis sp, sp, 0x8000
60
	
60
	
61
	2:
61
	2:
62
	
62
	
63
	subi sp, sp, 160
63
	subi sp, sp, 164
64
	stw r0, 8(sp)
64
	stw r0, 8(sp)
65
	stw r2, 12(sp)
65
	stw r2, 12(sp)
66
	stw r3, 16(sp)
66
	stw r3, 16(sp)
67
	stw r4, 20(sp)
67
	stw r4, 20(sp)
68
	stw r5, 24(sp)
68
	stw r5, 24(sp)
Line 107... Line 107...
107
	stw r12, 144(sp)
107
	stw r12, 144(sp)
108
	
108
	
109
	mfxer r12
109
	mfxer r12
110
	stw r12, 148(sp)
110
	stw r12, 148(sp)
111
	
111
	
112
	mfsprg1 r12
112
	mfdar r12
113
	stw r12, 152(sp)
113
	stw r12, 152(sp)
114
	
114
	
115
	mfsprg2 r12
115
	mfsprg1 r12
116
	stw r12, 156(sp)
116
	stw r12, 156(sp)
-
 
117
	
-
 
118
	mfsprg2 r12
-
 
119
	stw r12, 160(sp)
117
.endm
120
.endm
118
 
121
 
119
.org 0x100
122
.org 0x100
120
.global exc_system_reset
123
.global exc_system_reset
121
exc_system_reset:
124
exc_system_reset:
Line 135... Line 138...
135
.org 0x300
138
.org 0x300
136
.global exc_data_storage
139
.global exc_data_storage
137
exc_data_storage:
140
exc_data_storage:
138
	CONTEXT_STORE
141
	CONTEXT_STORE
139
	
142
	
140
	li r3, 2
-
 
141
	mr r4, sp
-
 
142
	addi r4, r4, 8
-
 
143
	bl pht_real_refill
-
 
144
	
-
 
145
	cmpwi r3, 0
-
 
146
	bne iret_real
-
 
147
	
-
 
148
	li r3, 2
-
 
149
	b jump_to_kernel
143
	b data_storage
150
 
144
 
151
.org 0x400
145
.org 0x400
152
.global exc_instruction_storage
146
.global exc_instruction_storage
153
exc_instruction_storage:
147
exc_instruction_storage:
154
	CONTEXT_STORE
148
	CONTEXT_STORE
155
	
149
	
156
	li r3, 3
-
 
157
	mr r4, sp
-
 
158
	addi r4, r4, 8
-
 
159
	bl pht_real_refill
-
 
160
	
-
 
161
	cmpwi r3, 0
-
 
162
	bne iret_real
-
 
163
 
-
 
164
	li r3, 3
-
 
165
	b jump_to_kernel
150
	b instruction_storage
166
 
151
 
167
.org 0x500
152
.org 0x500
168
.global exc_external
153
.global exc_external
169
exc_external:
154
exc_external:
170
	CONTEXT_STORE
155
	CONTEXT_STORE
Line 221... Line 206...
221
	b jump_to_kernel
206
	b jump_to_kernel
222
 
207
 
223
.org 0xc00
208
.org 0xc00
224
.global exc_syscall
209
.global exc_syscall
225
exc_syscall:
210
exc_syscall:
226
	CONTEXT_STORE	
211
	CONTEXT_STORE
227
	
212
	
228
	b jump_to_kernel_syscall
213
	b jump_to_kernel_syscall
229
 
214
 
230
.org 0xd00
215
.org 0xd00
231
.global exc_trace
216
.global exc_trace
Line 233... Line 218...
233
	CONTEXT_STORE
218
	CONTEXT_STORE
234
	
219
	
235
	li r3, 12
220
	li r3, 12
236
	b jump_to_kernel
221
	b jump_to_kernel
237
 
222
 
-
 
223
.org 0x1000
-
 
224
.global exc_itlb_miss
-
 
225
exc_itlb_miss:
-
 
226
	CONTEXT_STORE
-
 
227
	
-
 
228
	b tlb_miss
-
 
229
 
-
 
230
.org 0x1100
-
 
231
.global exc_dtlb_miss_load
-
 
232
exc_dtlb_miss_load:
-
 
233
	CONTEXT_STORE
-
 
234
	
-
 
235
	b tlb_miss
-
 
236
 
-
 
237
.org 0x1200
-
 
238
.global exc_dtlb_miss_store
-
 
239
exc_dtlb_miss_store:
-
 
240
	CONTEXT_STORE
-
 
241
	
-
 
242
	b tlb_miss
-
 
243
 
238
.org 0x4000
244
.org 0x4000
-
 
245
data_storage:
-
 
246
	li r3, 2
-
 
247
	mr r4, sp
-
 
248
	addi r4, r4, 8
-
 
249
	bl pht_refill_real
-
 
250
	
-
 
251
	cmpwi r3, 0
-
 
252
	bne iret_real
-
 
253
	
-
 
254
	li r3, 2
-
 
255
	b jump_to_kernel
-
 
256
 
-
 
257
instruction_storage:
-
 
258
	li r3, 3
-
 
259
	mr r4, sp
-
 
260
	addi r4, r4, 8
-
 
261
	bl pht_refill_real
-
 
262
	
-
 
263
	cmpwi r3, 0
-
 
264
	bne iret_real
-
 
265
	
-
 
266
	li r3, 3
-
 
267
	b jump_to_kernel
-
 
268
 
-
 
269
tlb_miss:
-
 
270
	li r3, 16
-
 
271
	mfspr r4, tlbmiss
-
 
272
	mfspr r5, ptehi
-
 
273
	mfspr r6, ptelo
-
 
274
	mr r7, sp
-
 
275
	addi r7, r7, 20
-
 
276
	
-
 
277
	bl tlb_refill_real
-
 
278
	b iret_real
-
 
279
 
239
jump_to_kernel:
280
jump_to_kernel:
240
	lis r12, iret@ha
281
	lis r12, iret@ha
241
	addi r12, r12, iret@l
282
	addi r12, r12, iret@l
242
	mtlr r12
283
	mtlr r12
243
	
284
	
Line 270... Line 311...
270
	
311
	
271
	addis sp, sp, 0x8000
312
	addis sp, sp, 0x8000
272
	rfi
313
	rfi
273
 
314
 
274
iret_real:
315
iret_real:
275
	
-
 
276
	lwz r0, 8(sp)
316
	lwz r0, 8(sp)
277
	lwz r2, 12(sp)
317
	lwz r2, 12(sp)
278
	lwz r3, 16(sp)
318
	lwz r3, 16(sp)
279
	lwz r4, 20(sp)
319
	lwz r4, 20(sp)
280
	lwz r5, 24(sp)
320
	lwz r5, 24(sp)
Line 320... Line 360...
320
	mtctr r12
360
	mtctr r12
321
	
361
	
322
	lwz r12, 148(sp)
362
	lwz r12, 148(sp)
323
	mtxer r12
363
	mtxer r12
324
	
364
	
325
	lwz r12, 152(sp)
365
	lwz r12, 156(sp)
326
	lwz sp, 156(sp)
366
	lwz sp, 160(sp)
327
	
367
	
328
	rfi
368
	rfi