From ce6e14d347c1abc4f022cf83c09d07ffeab5ee92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Fr=C3=B6schle?= Date: Fri, 9 Aug 2013 13:49:59 +0000 Subject: [PATCH] only clear int 7 in int7 exception handler --- sources/exceptions.S | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sources/exceptions.S b/sources/exceptions.S index 977b713..2d449a0 100644 --- a/sources/exceptions.S +++ b/sources/exceptions.S @@ -804,20 +804,21 @@ irq7: lea -12(sp),sp movem.l d0/a0,(sp) - move.l __RAMBAR0+0x008,a0 // Real Access Error handler - move.l a0,8(sp) // This will be the return address for rts + move.l __RAMBAR0+0x008,a0 // real access error handler + move.l a0,8(sp) // this will be the return address for rts - move.w 12(sp),d0 // Format/Vector word - andi.l #0xf000,d0 // Keep only the Format - ori.l #2*4,d0 // Simulate Vector #2, no Fault + move.w 12(sp),d0 // format/vector word + andi.l #0xf000,d0 // keep only the format + ori.l #2*4,d0 // simulate vector #2, no fault move.w d0,12(sp) // TODO: Inside an interrupt handler, 16(sp) is the return address. // For an Access Error, it should be the address of the fault instruction instead lea MCF_EPORT_EPFR,a0 - move.b #0x80,(a0) // clear int7 - move.l (sp)+,d0 + bset #7,(a0) // clear int 7 + + move.l (sp)+,d0 // restore registers move.l (sp)+,a0 rts // Forward to the Access Error handler