[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Kernel and Subsystems, Volume 1

d_sync_mem Kernel Service

Purpose

Allows a device driver to indicate that previously mapped buffers may need to be refreshed.

Syntax

int d_sync_mem(d_handle_t handle, dio_t blist)

Description

The d_sync_mem service allows a device driver to indicate that previously mapped buffers may need to be refreshed, either because a new DMA is about to start or a previous DMA has now completed. d_sync_mem is not an exported kernel service, but a bus-specific utility determined by d_map_init based on platform characteristics and provided to the caller through the d_handle structure. d_sync_mem allows the driver to identify additional coherency points beyond those of the initial mapping (d_map_list) and termination of the mapping (d_unmap_list). Thus d_sync_mem provides a way to long-term map buffers and still handle potential data consistency problems.

The blist parameter is a pointer to the dio structure that describes the initial mapping, as returned by d_map_list. Note that for bounce buffering, the data direction is also implicitly defined by this initial mapping.

Note
You can use the D_SYNC_MEM macro provided in the /usr/include/sys/dma.h file to code calls to the d_sync_mem kernel service.

Parameters

d_handle_t Indicates the unique dma handle returned by d_map_init.
dio_t blist List of vectors returned by original d_map_list.

Return Values

DMA_SUCC Buffers described by the blist have been synchronized.
DMA_FAIL Buffers could not be synchronized.

Related Information

The d_alloc_dmamem kernel service, d_map_init kernel service, d_map_list kernel service, d_unmap_list kernel service.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]