Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
DMA buffer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

DMA buffer



Hi,

I am trying to write driver for a PCI X card which is DMA capable.
What I want to do is allocate some memory (a buffer ring) which would
contain data to be DMAed by the device.
For this I am following these steps

1) my_buffer =
my_buffer_t*)IOMallocContiguous( (vm_size_t)sizeof(my_buffer_t), PAGE_SIZE,
&phyAddr)
2) Set the device's DMA buffer registers with phyAddr from above.
3) Start the DMA

Reading through the mailing list it seems that I need to get a
IOMemoryDescriptor object after step 2) and call its prepare method before
doing the DMA start.

The question is IOMallocContiguous will create a wired down memory in the
kernel then why to call IOMemoryDescriptor's prepare()?


Thanks,
Lalit.
_______________________________________________
darwin-drivers mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-drivers
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.