[Aranym-dev] [Fwd: 68040 MMU possible bug]

Milan Jurik milan.jurik at xylab.cz
Sun Aug 30 13:13:29 CEST 2009


Hi,

heh, Andreas fixed it before I read e-mails :-)

Best regards,

Milan

Petr Stehlik napsal(a):
> Hi Andreas, Milan, and other MMU experts,
> 
> Toni Wilen has implemented ARAnyM's MMU in the WinUAE and says that he
> found a bug (please see below). If you can figure out what's wrong
> please post a patch (or apply it directly).
> 
> Thanks
> 
> Petr
> 
> -------- Přeposlaná zpráva --------
> Od: Toni Wilen <twilen at winuae.net>
> Komu: pstehlik at sophics.cz
> Předmět: 68040 MMU possible bug
> Datum: Sat, 29 Aug 2009 21:49:50 +0300
> 
> Hello again.
> 
> I think there is small bug in MMU emulation, MMU_DES_USED is set when 
> page is indirect page descriptor, which does not have U-bit, corrupting 
> the address. (if bit 3 was originally zero). Removing code that sets 
> U-bit when indirect fixes Amiga mmulib crash.
> 
> get_page_descriptor:
>     desc = phys_get_long(desc_addr);
>     if ((desc & 1) == 0) {
>         if ((desc & 2) == 0) {
>             D(bug("MMU: invalid page descriptor log=%08lx desc=%08lx 
> @%08lx", addr, desc, desc_addr));
>             return desc;
>         }
>         /* indirect */
>         if (indirect) {
>             D(bug("MMU: double indirect descriptor log=%lx descriptor @ 
> %lx", addr, desc_addr));
>             return desc;
>         }
>         wp |= desc;
>         if ((desc & MMU_DES_USED) == 0)
>             phys_put_long(desc_addr, desc | MMU_DES_USED); <--- this 
> does not appear to be right
>         desc_addr = desc & MMU_PAGE_INDIRECT_MASK;
>         indirect = 1;
>         goto get_page_descriptor;
>     }
> 
> 
> _______________________________________________
> cz-bobek-lists-aranym mailing list
> aranym at lists.bobek.cz
> https://lists.bobek.cz/mailman/listinfo/cz-bobek-lists-aranym



More information about the cz-bobek-lists-aranym mailing list