@@ -228,7 +228,7 @@ EXCEPTION_ENTRY(_data_page_fault_handler)
228
228
* DTLB miss handler in the CONFIG_GUARD_PROTECTED_CORE part
229
229
*/
230
230
#ifdef CONFIG_OPENRISC_NO_SPR_SR_DSX
231
- l.lwz r6,PT_PC(r3) // address of an offending insn
231
+ l.lwz r6,PT_PC(r3) // address of an offending insn
232
232
l.lwz r6,0 (r6) // instruction that caused pf
233
233
234
234
l.srli r6,r6,26 // check opcode for jump insn
@@ -244,49 +244,47 @@ EXCEPTION_ENTRY(_data_page_fault_handler)
244
244
l.bf 8f
245
245
l.sfeqi r6,0x12 // l.jalr
246
246
l.bf 8f
247
-
248
- l.nop
247
+ l.nop
249
248
250
249
l.j 9f
251
- l.nop
252
- 8:
250
+ l.nop
253
251
254
- l.lwz r6,PT_PC(r3) // address of an offending insn
252
+ 8: // offending insn is in delay slot
253
+ l.lwz r6,PT_PC(r3) // address of an offending insn
255
254
l.addi r6,r6,4
256
255
l.lwz r6,0 (r6) // instruction that caused pf
257
256
l.srli r6,r6,26 // get opcode
258
- 9:
257
+ 9: // offending instruction opcode loaded in r6
259
258
260
259
#else
261
260
262
- l.mfspr r6,r0,SPR_SR // SR
263
- // l.lwz r6,PT_SR(r3) // ESR
264
- l.andi r6,r6,SPR_SR_DSX // check for delay slot exception
265
- l.sfeqi r6,0x1 // exception happened in delay slot
266
- l.bnf 7f
267
- l.lwz r6,PT_PC(r3) // address of an offending insn
261
+ l.mfspr r6,r0,SPR_SR // SR
262
+ l.andi r6,r6,SPR_SR_DSX // check for delay slot exception
263
+ l.sfeqi r6,0x1 // exception happened in delay slot
264
+ l.bnf 7f
265
+ l.lwz r6,PT_PC(r3) // address of an offending insn
268
266
269
- l.addi r6,r6,4 // offending insn is in delay slot
267
+ l.addi r6,r6,4 // offending insn is in delay slot
270
268
7:
271
269
l.lwz r6,0 (r6) // instruction that caused pf
272
270
l.srli r6,r6,26 // check opcode for write access
273
271
#endif
274
272
275
- l.sfgeui r6,0x33 // check opcode for write access
273
+ l.sfgeui r6,0x33 // check opcode for write access
276
274
l.bnf 1f
277
275
l.sfleui r6,0x37
278
276
l.bnf 1f
279
277
l.ori r6,r0,0x1 // write access
280
278
l.j 2f
281
- l.nop
279
+ l.nop
282
280
1: l.ori r6,r0,0x0 // !write access
283
281
2:
284
282
285
283
/* call fault.c handler in or32/mm/fault.c */
286
284
l.jal do_page_fault
287
- l.nop
285
+ l.nop
288
286
l.j _ret_from_exception
289
- l.nop
287
+ l.nop
290
288
291
289
/* ---[ 0x400: Insn Page Fault exception ]------------------------------- */
292
290
EXCEPTION_ENTRY(_itlb_miss_page_fault_handler)
@@ -306,9 +304,9 @@ EXCEPTION_ENTRY(_insn_page_fault_handler)
306
304
307
305
/* call fault.c handler in or32/mm/fault.c */
308
306
l.jal do_page_fault
309
- l.nop
307
+ l.nop
310
308
l.j _ret_from_exception
311
- l.nop
309
+ l.nop
312
310
313
311
314
312
/* ---[ 0x500: Timer exception ]----------------------------------------- */
0 commit comments