Subject: Re: bus_dmamem accessors.
To: Chris G. Demetriou <>
From: Bill Studenmund <>
List: tech-kern
Date: 06/25/2000 11:37:11
On 25 Jun 2000, Chris G. Demetriou wrote:

> (Eduardo Horvath) writes:
> > Two new flags will be added to bus_dmamap_create(), which will be used to tag
> > the bus_dmamap_t:
> > 
> > BUS_DMA_LITTLE_ENDIAN		The device expects data in little-endian
> > 				format.
> > BUS_DMA_BIG_ENDIAN		The device expects data in big-endian
> > 				format.
> what are the semantics of these?
> specifically, what is the unit of translation from one endianness to
> another, and how can these be used properly by hardware (i.e. bus
> bridges, not the devices themselves) which support automatic
> byte-swapping of DMA transfers in certain regions?

Not sure about what to do with swapping hardware, but I took the unit of
translation to be specific to the bus_dmamem_foo routines described later
in the note. i.e. bus_dmamem_read_4() does uint32_t's, while
bus_dmamem_write_2() does uint16_t's.

Take care,