Generic int 13h driver
Die Gestalt
die.gestalt at gmail.com
Fri Jun 1 14:09:59 UTC 2007
Hi me again... ;)
Well now I correctly hook the interrupts, they are correctly reflected back
to the BIOS and I can write to the disk without a problem. When DMA is on,
however, reading fails (it works when DMA is off in the BIOS). This is
obviously a DMA problem and for some reason the machine does not read the
correct page value.
The problem is that the Virtual 8086 monitor makes an "invalidate page" call
when the operation is finished and my buffers are loaded into a DMA mapping
and I do the proper pre/post synchronization, I've even tried with reversed
sync in case I got it wrong.
I think the problem is a lack of understanding on my side about how DMA
works in FreeBSD. What I do is I have a parent tag and two child tags (one
for reading the other for writing), I do :
bus_dma_tag_create -> bus_dmamap_create
Later I do contigmalloc of my buffer and I load this buffer with
bus_dmamap_load.
I do bus_dmamap_sync before and after the call the BIOS.
The writes are succesfull but the read buffer is left untouched. What do I
do wrong? What is the exact use of the callback?
Thanks for any hint.
More information about the freebsd-drivers
mailing list