Re: [hatari-devel] Cycle exact setting affects nf_scsidrv

[ Thread Index | Date Index | More Archives ]


On 10/12/18 12:25 AM, Uwe Seimet wrote:
Is st_buffer data something that could be program code read from
the SCSI disk?  If yes, all caches would need to be flushed for that.

Yes, you are probably right. Just checked that I'm also flushing both in
HDDRIVER. One more updated patch attached. The sense data buffer and
the buffer for the bus name do not need flushing the instruction cache
because you cannot transfer program code this way.

Thanks, I pushed you patch:

When checking that, I noticed that nf_scsidrv.c doesn't validate
that the memory addresses specified through the NF API are valid,
like GEMDOS HD driver does:
        /* Check that read is to valid memory area */
        if ( !STMemory_CheckAreaType ( Addr, Size, ABFLAG_RAM ) )
Log_Printf(LOG_WARN, "GEMDOS Fread() failed due to invalid RAM range 0x%x+%i\n", Addr, Size);
                Regs[REG_D0] = GEMDOS_ERANGE;
                return true;

Could you send also a (tested) patch that adds those checks?

	- Eero

Mail converted by MHonArc 2.6.19+