Re: [hatari-devel] IDE IO register range access commit

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


Le 24/09/2020 à 15:10, Eero Tamminen a écrit :
Hi,

On 9/24/20 3:26 PM, Uwe Seimet wrote:
Looks as if there is still an issue with the IDE handling. I don't know
whether this is a new issue or has always been there > In Falcon030 mode Hatari crashes when no IDE images are assigned:

Thread 1 "hatari" received signal SIGSEGV, Segmentation fault.
0x00005555558f7258 in Ide_Mem_bget ()
(gdb) bt
#0  0x00005555558f7258 in Ide_Mem_bget ()
#1  0x00005555559c5a99 in op_4a39_0_ff ()
#2  0x000055555597d092 in m68k_run_2_020 ()
#3  0x00005555559758c2 in m68k_go ()
#4  0x00005555558ba703 in main ()

In TT mode everything is fine, i.e. the IDE interface is not present.

I can reproduce this just with:
     $ hatari --machine falcon --dsp none

---------------------------------------------
Thread 1 "hatari" received signal SIGSEGV, Segmentation fault.
Ide_Mem_bget (addr=15728669) at src/ide.c:107
107            retval = ide_ioport_read(opaque_ide_if, ideport);
(gdb) print opaque_ide_if
$2 = (struct IDEState *) 0x0
---------------------------------------------

It's due to Nicolas' Ide_MmioIsAvailable()
function change claiming that IDE is available
(on Falcon) even when there are no IDE devices
present.

That (previously internal) function is used by IDE
data access functions which chrash when there's no
actual IDE device...


Hi

I'm looking at it, but IdeInit() seems strange to me ; it doesn't create the "opaque_ide_if" struct if machine is falcon, only if Ide[0].bUseDevice (else it returns immediately)

But Ide should be enabled on Falcon even if there's no disk on Ide[0].
It seems that sometimes IDE depends on Ide[0].bUseDevice and sometimes it depends on machine==falcon.
I think it should check both in every places.

Nicolas



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