Writing Device Drivers

SBus--Example One

A DMA engine on an SBus in a SPARC machine has the following attributes:

The resulting attribute structure is:

	static ddi_dma_attr_t attributes = {
 		DMA_ATTR_V0,		/* Version number */
 		0xFF000000,			/* low address */
 		0xFFFFFFFF,			/* high address */
 		0xFFFFFFFF,			/* counter register max */
 		1,						/* byte alignment */
 		0x7,					/* burst sizes: 0x1 | 0x2 | 0x4 */
 		0x1,					/* minimum transfer size */
 		0xFFFFFFFF,			/* max xfer size */
 		0xFFFFFFFF,			/* address register max */
 		1,						/* no scatter-gather */
 		512,					/* device operates on sectors */
 		0,						/* attr flag: set to 0 */
 	};