Go to main content

man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

dmao_get_size (9F)

Name

dmao_get_size, dmao_set_size - get and set the size of a DMA object

Synopsis

# include <sys/ddidmareq.h>

size_t dmao_get_size(const ddi_dma_obj_t *dp);

void dmao_set_size(ddi_dma_obj_t *dp, size_t size);

Interface Level

Solaris DDI specific (Solaris DDI).

Parameters

dmao_get_size

dp

Pointer to the ddi_dma_obj_t of the DMA object whose size is to be returned.

dmao_set_size

dp

Pointer to the ddi_dma_obj_t of the DMA object whose size is to be set.

size

Value of size in bytes.

Description

The dmao_get_size() function supports getting the size of a DMA object from the ddi_dma_req structure.

The dmao_set_size() supports setting the size of a DMA object in the ddi_dma_req structure.

Return Values

The dmao_get_size() function returns the size of the DMA object in bytes.

Warnings

Drivers looking to map DMA objects larger than 4GB in size must use the dmao_get_size() and dmao_set_size() interfaces. Using the dmao_size field of the dmar_object structure directly will result in an unsuccessful mapping.

Mixed operations are not supported, that is, getting by reading dmao_size directly and setting by using dmao_set_size(), and vice versa.

See Also

ddi_dma_req(9S), ddi_dma_addr_setup(9F), ddi_dma_buf_setup(9F), ddi_dma_curwin(9F), ddi_dma_free(9F), ddi_dma_movwin(9F), ddi_dma_setup(9F), ddi_dma_sync(9F)