- Nicu Pavel personal page

PaNiC Random Rant (or how we used to call it: .plan)

Using both memory controllers with SPARSE_MEM on Atmel SAM9G45/M10

Atmel AT91SAM9G45 and AT91SAM9M10 (AT91SAM9263 has a similar layout) have two memory controllers providing 128Mb at locations 0x20000000 and 0x70000000. To use both banks of memory SPARSE_MEM support must be enabled in kernel and phys_to_virt() and virt_to_phys() macros defined. The actual mapping is configured in kernel by boot params.

Both banks must be initialized by AT91Bootstrap, if you use AT91Bootstrap from AT91SAM9G45/M10 SDK see the patch below. Also if u-boot is used as bootloader and you want to use second bank it needs to be patched too.
My patches wore made for 2.6.30 kernel updated patches should be available below:

AT91Bootstrap (from G45 SDK):


Add to boot params to enable both mem banks(for example on u-boot bootparams=) :
mem=128M@0x20000000 mem=128M@0x70000000

For kernels <= 2.6.30: 0001-Add-SPARSEMEM-support-for-Atmel-CPU-for-2-banks-of-m.patch


For kernels >2.6.30 (patch is for 2.6.34):

Labels: , ,


At July 21, 2010 at 10:48 PM , Blogger oscarb said...

First of all, very good doc, thanks for your work.

Then, i cant understand which of uboot or at91bootstrap is responsible for initializing the second bank at 0x20000000 and why?

I have a newer version of at91bootstrap i think because the patch wont fit.

Could you help me with this please?

Thanks a lot, Francisco.

At March 10, 2015 at 1:28 PM , Blogger Unknown said...


I am enjoying Open Panzer but am having issues with glitches in Germany's Russian Front Campaign, Specifically Operation Typhoon - called off. It says I have another objective to conquer but I have captured them all. Is there some magic space somewhere I need to capture?




Post a Comment

Subscribe to Post Comments [Atom]

<< Home