Re: [hatari-devel] 68040/060 MMU bug fix |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: Hatari devel list <hatari-devel@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [hatari-devel] 68040/060 MMU bug fix
- From: Andreas Grabher <andreas_g86@xxxxxxxxxx>
- Date: Sun, 7 Jan 2024 16:22:17 +0100
- Cc: Toni Wilen <twilen@xxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1704640950; bh=hN5VQ84Sm2s0/58ET+IeUe0yGP0RLKgEug7JBDQODpo=; h=Content-Type:Mime-Version:Subject:From:Date:Message-Id:To; b=N+Nu5yis7hYxbkou0UIp0eU8jM5J5zEzIUfXeLhJJ0qOmDg34b2hYku0b33KoMha6 7wc/cV4Yy3wNjDMQORz/k2RuIMuuyYjNun4MNInSKnbqohTayfbHyIWX/TuZ5XFasR RBYy6Mt19Jf899aIF4RP8vwUMqkbRpzqsRFTlATlMeKAC4jUtWKkKNnp5ZozQASmgO YgL0O/GoO5eoMA2OKx6Om+TAFYylosO4+m6w5X33jXCYmEon1BFpDFhAE39R5EzOvm WIPyw/GOGxMS2xuxE+xC3fnXzj9Uk260COJDiJWDwABOpw2sR+9QgtbWaxuZntSZVi 7b+wcJN4bKgGw==
> 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