2011-06-13 21:37:41

by johnlinn

[permalink] [raw]
Subject: DMA setup for ARM platform with hole low in memory

I'm trying to decide the best way to setup this ARM platform DMA to deal with the fact that the lowest 512K of memory can not be DMAed into. The rest of memory space is fine.

>From my digging and prototyping it seems like a DMA zone will do the job, but maybe there's an easier way. The DMA mask doesn't seem to really help with this hole in memory and would still need to be 0xFFFFFFFF it appears.

Am I missing the easier way?

Thanks,
John


2011-06-14 10:15:50

by Catalin Marinas

[permalink] [raw]
Subject: Re: DMA setup for ARM platform with hole low in memory

On Mon, Jun 13, 2011 at 09:31:59PM +0000, [email protected] wrote:
> I'm trying to decide the best way to setup this ARM platform DMA to
> deal with the fact that the lowest 512K of memory can not be DMAed
> into. The rest of memory space is fine.
>
> From my digging and prototyping it seems like a DMA zone will do the
> job, but maybe there's an easier way. The DMA mask doesn't seem to
> really help with this hole in memory and would still need to be
> 0xFFFFFFFF it appears.

The DMA zone won't help because it assumes that it is always at the
bottom of the RAM. The simples way is to mark that area as reserved and
never use it. It's not that bad since I suspect you already have the
kernel and swapper_pg_dir using most of it.

Have a look at arch/arm/mach-integrator/core.c - integrator_reserve().

--
Catalin