Re: ide with DMA and ram 4GB
On Thursday 13 November 2008 21:02, John Baldwin wrote: On Wednesday 12 November 2008 12:23:14 pm Marc Lörner wrote: Hello, I just stepped over a problem with my IDE disk running in DMA-mode and having more than 4GB of RAM. It seems that the whole way down GEOM, ata-disk, ata-dma never is checked whether physical address of buffer is less than 4GB an so fits in 32bits. = when PRD is set the address is rigorously truncated to fit into 32bit, with buffer 4GB all is quite fine. bus_dmamap_load() in ata-dma.c should result in bounce pages being allocated and having the data copied to pages below 4GB and having those addresses passed to the callback and stored in the PRD. Thanks for pointing this out! So it seems that bounce-pages are counted with helper-function run_filter. But this function does never return 1 with dma-pages not lying in range (e.g. paddr 4GB) but being aligned. Did nobody else have problems on 64bit ide-dma, or is it already working, but I didn't grasp functionality, yet? For now, I came around this by adding a flag in /sys/bus_dma.h and setting this flag on tag-creation. So I now can check in run_filter whether I'm doing an ide-dma, relying on this and on check whether I got paddr 4GB, I then can tell bus_dmamap_load to use bounce-pages. Any thoughts or comments? Regards, Marc Loerner ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: ide with DMA and ram 4GB
On Wednesday 12 November 2008 12:23:14 pm Marc Lörner wrote: Hello, I just stepped over a problem with my IDE disk running in DMA-mode and having more than 4GB of RAM. It seems that the whole way down GEOM, ata-disk, ata-dma never is checked whether physical address of buffer is less than 4GB an so fits in 32bits. = when PRD is set the address is rigorously truncated to fit into 32bit, with buffer 4GB all is quite fine. bus_dmamap_load() in ata-dma.c should result in bounce pages being allocated and having the data copied to pages below 4GB and having those addresses passed to the callback and stored in the PRD. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
ide with DMA and ram 4GB
Hello, I just stepped over a problem with my IDE disk running in DMA-mode and having more than 4GB of RAM. It seems that the whole way down GEOM, ata-disk, ata-dma never is checked whether physical address of buffer is less than 4GB an so fits in 32bits. = when PRD is set the address is rigorously truncated to fit into 32bit, with buffer 4GB all is quite fine. So what do you recommend: - Easiest way (but not performantest) is to turn DMA for ide off and use PIO instead - Harder way: Bugfix ide-dma! When doing this, where do you recommend to put code? I tried to do a simple (but not performant) patch in in ata-disk functions ad_strategy and ad_done with using another aligned, with right boundary and physical address 4GB and copying data from an to it from bp-b_data (or request-data). At least this one works, but copying from one to another buffer is not quite elegant and the code doesn't really belong there. So I thought of putting something into busdma_machdep, but right now I have now clue to where to hook in, because this function cannot modify buffer given from vfs_bio = geom = ata. Regards, Marc Loerner P.S.: I'm using kernel-sources from 7.0-RELEASE-p3 ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]