Re: [hatari-devel] 68040/060 MMU bug fix

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]



> Am 06.01.2024 um 22:31 schrieb Nicolas Pomarède <npomarede@xxxxxxxxxxxx>:
> 
> Le 01/01/2024 à 18:51, Andreas Grabher a écrit :
>>> Am 31.12.2023 um 10:59 schrieb Andreas Grabher <andreas_g86@xxxxxxxxxx>:
>>> 
>>> 
>>>> Am 30.12.2023 um 10:31 schrieb Andreas Grabher <andreas_g86@xxxxxxxxxx>:
>>>> 
>>>> May I suggest the appended patch for WinUAE/Hatari? I just rechecked: Without this level 7 interrupts do not work correctly. Triggering an NMI on the NeXT causes multiple nested level 7 interrupt exceptions finally resulting in double bus fault. With the patch all seems to be fine. Maybe lastipl could be set in a different place of the cascading function calls (do_interrupt() > doint() > update_ipl()). Btw. intlev() is called twice or even more often in this cascade (even without any cycle exact mode).
>>>> 
>>>> <winuae.diff>
>>>> 
>>> 
>>> Minor improvement: Checking intr > 0 is useless, as regs.intmask can never be negative (and negative return values for intlev() would be strange anyway).
>>> 
>>> <winuae.diff>
>> I tried to simplify my patch even further without needing regs.lastipl. But when I tried to just compare intr to regs.ipl_pin it turned out that regs.ipl_pin is not always updated if the interrupt level is lowered (update_ipl() not called). So regs.ipl_pin does not reliably reflect the current level on the interrupt priority line. Doesn’t this cause issues on the Amiga?
> 
> Hi
> 
> your patch from previous mail has been merged into WinUAE as "NMI handling fix" and I added it to Hatari devel.
> Can you check it works OK in the case of "Previous" ?
> 
> Nicolas
> 

Hello,

thank you very much for the information! Yes, it does work with Previous. Every time the interrupt level changes I simply set SPCFLAG_INT and I see no issues so far. Anyway I am in contact with Toni discussing two things:
1. Is the new variable lastipl really necessary? We might just use ipl_pin instead.
2. Are there any side effects from ipl_pin not being updated if the interrupt level is lowered? This is not caused by the added code.

Let’s see if we can do some optimisations here.

Regards,
Andreas


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/