LinuxConsulting

- 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):
 0001-Init-second-bank-of-memory-0x20000000.patch

U-Boot:
0001-add-support-for-both-banks-of-memory-on-Atmel-G45-bo.patch


Kernel:
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

0010-Fix-memory-mapping-for-SPARSEMEM-to-use-both-banks-o.patch

For kernels >2.6.30 (patch is for 2.6.34):

http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=6143/1

Labels: , ,

2 Comments


HTML5 Hex Grid with mouse mapping


A simple hex grid map with mouse mapping just to explore what HTML5 canvas can do (and it looks to me a lot like Cairo).  Maybe someone will start a panzer general clone reusing the code from lgeneral ?

http://www.linuxconsulting.ro/code-repository/repository/html5-hexgrid/hexgrid.html
Or a better example(looks like no one started a panzer general clone so I did):
Open Panzer

Labels:

3 Comments