Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Nov 2015 10:45:32 -0700
From:      Ian Lepore <ian@freebsd.org>
To:        AlexHully <deco33000@yandex.com>, freebsd-hackers@freebsd.org
Subject:   Re: dma
Message-ID:  <1447091132.91534.480.camel@freebsd.org>
In-Reply-To: <298361446978177@web22g.yandex.ru>
References:  <298361446978177@web22g.yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2015-11-08 at 11:22 +0100, AlexHully wrote:
> Hi,
> 
> I would like a clarification for dma.
> 
> The context: most dma capable devices have 32 bits address range.
> Is it correct that, if there was no 3G/1G mapping in the kernel, or
> that kernel low memory could map 4Gb memory, one could choose any
> free addresses in that low memory to set up a dma buffer?
> 
> That would avoid all the mapping hassle, and performance cost
> associated.
> 
> Thanks

There is more to DMA that just how many bits are in the address space.
On platforms with software-assisted cache coherency such as ARM and
MIPS, DMA usually must also be aligned to cacheline boundaries, and
will be bounced if it is not.  Plus, of course, it's also required that
you perform the correct busdma sync operations before and after the DMA
to keep the caches coherent.

-- Ian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1447091132.91534.480.camel>