mem=XXXM ioremap DMA

Eric Nuckols jrocnuck at hotmail.com
Sat Jan 27 19:48:30 EST 2007


I've seen a couple posts out there about issuing a kernel boot parameter of 
mem=XXXM, say for example mem=504M on a 512 MiB system followed by issuing 
an ioremap function call from a module/driver such as: ioremap( 0x1F800000, 
0x800000 ) where an attempt is made to remap the unclaimed (by the kernel) 
physical memory from 504MiB up to 512MiB.

I've tried this route which looks to make great logical sense and I've tried 
to actually use the remapped range for DMA with no luck.  I've seen posts 
from all the way back in 2003 where folks are doing the same thing and have 
the same bad results... and no replies to the posts.

Can this ram really be used for DMA?

I'm afraid that since I'm using a PCI device (PLX) with device specific 
hardware address decoding on the LOCAL bus side of the PLX, that by taking 
this approach, the kernel comes back with virtual addresses that, after 
being mapped back to bus addresses still won't allow for DMA to work 
properly.   Can anyone give some insight into this?

I'm basically trying the following:
  boot kernel (2.4.xx) with mem=504M

in my driver, I'm calling
my_virt_address =   ioremap( 0x1F800000, 0x800000  );
my_bus_address = virt_to_bus( my_virt_address );

Then, I'm telling my FPGA bus master device (across a PLX chip) that it's 
starting DMA address is my_bus_address.

I get interrupts, but no data in my_virt_address.  I've seen several posts 
exactly like this and have yet to see any answers to these posts...

I've tried an alternative approach of calling one of the alloc_bootmem_xxx 
functions early in start_kernel and have had positivie results ONLY on the 
montavista 3.1 pro kernel with preemption enabled.  On the Denx 2.4.25 
Kernel from ELDK 3.1 I just get a locked up/frozen kernel when I trie to use 
the alloc_bootmem_xx approach and when I use the mem=504M / ioremap 
approach, I don't get any DMA data from either kernel...

Please help!!
Thanks,
Eric

_________________________________________________________________
FREE online classifieds from Windows Live Expo – buy and sell with people 
you know 
http://clk.atdmt.com/MSN/go/msnnkwex0010000001msn/direct/01/?href=http://expo.live.com?s_cid=Hotmail_tagline_12/06




More information about the Linuxppc-embedded mailing list