@@ -18,6 +18,7 @@
extern "C" {
#endif
+#include<odp/dma.h>
/** @defgroup odp_shared_memory ODP SHARED MEMORY
* Operations on shared memory.
@@ -49,6 +50,7 @@ extern "C" {
/* Share level */
#define ODP_SHM_SW_ONLY 0x1 /**< Application SW only, no HW access */
#define ODP_SHM_PROC 0x2 /**< Share with external processes */
+#define ODP_SHM_DMA 0x4 /**< DMA reachable mem */
/**
* Shared memory block info
@@ -125,6 +127,18 @@ void *odp_shm_addr(odp_shm_t shm);
*/
int odp_shm_info(odp_shm_t shm, odp_shm_info_t *info);
+/**
+ * Shared memory block DMA descriptor
+ *
+ * @param[in] shm Block handle
+ * The memory block must have been created with the
+ * ODP_SHM_DMA flag.
+ *
+ * @retval a single DMA descriptor describing the required DMA mapping for
+ * this memory area.
+ * Returns ODP_DMA_REGION_INVALID on error.
+ */
+odp_dma_map_t odp_shm_get_dma_map(odp_shm_t shm);
/**
* Print all shared memory blocks
Adding a function to get a DMA descriptor (describing how to perform a DMA mapping on the given shared memory block). Also added a flag (ODP_SHM_DMA) to be given at block reservation time, when DMA reachable memory is required. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> --- include/odp/api/shared_memory.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+)