Inconsistency in bus_dma manpage?

看板FB_doc作者時間19年前 (2007/02/12 05:36), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
In the busdma_sync_op_t section of the bus_dma manpage, the sync operations are described as follows: BUS_DMASYNC_PREREAD Perform any synchronization required prior to an update of host memory by the DMA read operation. BUS_DMASYNC_PREWRITE Perform any synchronization required after an update of host memory by the CPU and prior to DMA write operations. BUS_DMASYNC_POSTREAD Perform any synchronization required after DMA read operations and prior to CPU access to host memory. BUS_DMASYNC_POSTWRITE Perform any synchronization required after DMA write operations. Makes sense...But in the section describing bus_dmamap_load, the following example is given: For example, the CPU might be used to setup the contents of a buffer that is to be DMA'ed into a device. To ensure that the data are visible via the device's mapping of that memory, the buffer must be loaded and a dma sync operation of BUS_DMASYNC_PREREAD must be performed. I believe the example is incorrect--it's actually describing the case where BUS_DMASYNC_PREWRITE would be necessary. Thanks, Jason Harmening _______________________________________________ freebsd-doc@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-doc To unsubscribe, send any mail to "freebsd-doc-unsubscribe@freebsd.org"
文章代碼(AID): #15punn00 (FB_doc)
文章代碼(AID): #15punn00 (FB_doc)