Re: [hatari-devel] Disk driver memory access checks

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


Hi,

On 10/13/18 9:09 PM, Nicolas Pomarède wrote:
Le 13/10/2018 à 18:53, Uwe Seimet a écrit :
if transfer is made using DMA, does DMA generate bus error when trying
to write to TOS ROM or is this not handled at all and "ignored"
(contrary to what would happen if the cpu try to write to ROM)

One could test this on real HW by just using xbios to read a floppy
sector into ROM.

Assuming that the DMA chip generates a bus error in such a case, what's
the most similar approach in the case of nf_scsidrv? Just returning an
error code as a result of the ST memory check probably not.
Of course, I'm aware that this is a rather esoteric problem.

The main thing is to protect the emulation process i.e. prevent
Hatari itself doing invalid memory access.

What else driver does in such a corner case is less of a concern
from my point of view.  For now, you could log an error and
later once it's checked on real HW, add proper error response.


	- Eero

I would need to check in the code how to raise a bus error from outside the cpu emulation ; in the meantime, the safest is just to ignore writes to ROM (ie : considerer all the data were transfered but ignore the writes) A you say, it's a corner case and we wouyld need to check on real HW first the behaviour for DMA FDC and for other DMA in TT/Falcon




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