Re: correct use of bus_dmamap_sync

From: Dinesh Nair (dinesh_at_alphaque.com)
Date: 10/25/05

  • Next message: Dinesh Nair: "Re: correct use of bus_dmamap_sync"
    Date: Wed, 26 Oct 2005 02:46:36 +0800
    To: John Baldwin <jhb@freebsd.org>
    
    

    On 10/26/05 01:27 John Baldwin said the following:
    > On Tuesday 25 October 2005 09:15 am, Dinesh Nair wrote:
    >>(must i malloc space for them before passing them into those functions, or
    >>will the call to bus_dmamem_alloc do it for me ?)
    >
    > bus_dmamem_alloc() will do it for you.

    thanx.

    > Probably not as the sync()'s don't really do anything with memory allocated
    > via bus_dmamem_alloc(). The operations are named from the CPU's perspective,

    however, the man page at
    http://www.freebsd.org/cgi/man.cgi?query=bus_dmamap_sync&apropos=0&sektion=0&manpath=FreeBSD+5.4-stable&format=html
    says,

    "Although no explicit loading is required to access the memory referenced
    by the returned map, the synchronization requirements as described in the
    bus_dmamap_sync() section still apply."

    also, is bus_dmamap_load() required, since the same man page section above
    says it isnt ?

    have things changed between freebsd 4.x (which i'm using) and freebsd 5.x ?

    > thus when you send data to your device, that is a WRITE operation (even
    > though your device is doing a DMA to read data), and when you get data back
    > from your device, that is a READ operation (even though your device is doing
    > a DMA to write the data into the buffer).

    thanx, the verbiage on the man page is slightly confusing with it's use of
    CPU, giving the opposite impression.

    -- 
    Regards,                           /\_/\   "All dogs go to heaven."
    dinesh@alphaque.com                (0 0)    http://www.alphaque.com/
    +==========================----oOO--(_)--OOo----==========================+
    | for a in past present future; do                                        |
    |   for b in clients employers associates relatives neighbours pets; do   |
    |   echo "The opinions here in no way reflect the opinions of my $a $b."  |
    | done; done                                                              |
    +=========================================================================+
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: Dinesh Nair: "Re: correct use of bus_dmamap_sync"

    Relevant Pages

    • Re: HELP REQ: Hardisk Issues
      ... If Win has turned the DMA off, due to too many errors seen ... cylinders, 16 heads, 63 sectors per track, 600 bytes per sector ... OK: Always passing ... Thats two bad sectors that its reallocated, ...
      (comp.sys.ibm.pc.hardware.storage)
    • Re: HELP REQ: Hardisk Issues
      ... in DMA mode. ... heads, 63 sectors per track, 600 bytes per sector ... Always passing ...
      (comp.sys.ibm.pc.hardware.storage)
    • [PATCH 1/1] Fix PCI DMA flag propagation on SN (Altix) with PICs
      ... We recently discovered a problem with passing of DMA attributes on ... SN systems with the older PIC chips. ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)