Difference between revisions of "Memory organization (Naon)"

From DAVE Developer's Wiki
Jump to: navigation, search
(SPI NOR Flash)
(Non-Volatile Memory Map)
Line 21: Line 21:
  
 
Due the fact that different memory size are available on request on Naon SOM, we will review here only the default memory size. Anyway, the beginning of each memory is the same for all of them due boot system restrictions.
 
Due the fact that different memory size are available on request on Naon SOM, we will review here only the default memory size. Anyway, the beginning of each memory is the same for all of them due boot system restrictions.
 +
 +
Each section correspond to a [[:Category:Linux|Linux]] MTD partition. User can change partition at runtime or by statically by changing Kernel sources. See [[MTD Partition]] for more detail regarding this topic.
  
 
==== SPI NOR Flash ====
 
==== SPI NOR Flash ====
  
SPI NOR Flash is the main boot memory, where available, for Naon module. Here is the layout of the default 8MiB memory
+
SPI NOR Flash is the main boot memory, where available, for Naon module. Due the fact that SPI NOR is a non-XIP memory, Naon uses two-stage [[:Category:U-Boot|U-Boot]] for booting.
 +
 
 +
Here is the layout of the default 8MiB memory:
  
 
{|class="wikitable" style="text-align:right"
 
{|class="wikitable" style="text-align:right"
Line 63: Line 67:
 
|FREE
 
|FREE
 
|}
 
|}
 +
 +
The last section is Free for use by the user (e.g. for a ramdisk, a redundant Kernel image or generic storage).
 +
  
 
==== NAND Flash ====
 
==== NAND Flash ====
  
On Naon module, NAND size may vary from
+
Nand Flash is the main storage memory, even if can be used for [[Boot_sequence_(Naon)|boot too]]. By default Naon is provided with 1GiB Nand but other memory size is available on request. The default Nand partitioning is detailed in the following table:
 +
 
 +
{|class="wikitable" style="text-align:right"
 +
|-
 +
!| Base Address (HEX)
 +
!Size (KiB)
 +
!Size (HEX)
 +
!Usage
 +
|-
 +
|align="right"|0
 +
|128
 +
|20000
 +
|U-boot 1st stage
 +
|-
 +
|20000
 +
|256
 +
|40000
 +
|U-boot 2nd stage
 +
|-
 +
|60000
 +
|64
 +
|10000
 +
|U-boot env1
 +
|-
 +
|70000
 +
|64
 +
|10000
 +
|U-boot env2
 +
|-
 +
|80000
 +
|3072
 +
|300000
 +
|Linux Kernel
 +
|-
 +
|380000
 +
|5120
 +
|500000
 +
|FREE
 +
|}
  
 
=== User Options ===
 
=== User Options ===

Revision as of 13:17, 2 May 2012

Info Box
Naon am387x-dm814x.png Applies to Naon

Introduction[edit | edit source]

Memory Map for Naon Module is quite complex, due it's multiprocessor nature.

Before start reading regarding memory map in details, please take a look at generic EZSDK Memory Map on Texas Instruments Wiki.

RAM Memory Map[edit | edit source]

RAM memory map is the most complex part of this architecture, because the user should allocate the different area used by Cortex-A8 processor (which runs the Linux OS), the two media controller (Cortex-M3, that take care of the whole video processing subsystem) and DSP.

This memory map is statically defined in various places, so the user has a limited options in changing this. Anyway it's useful to know how this memory is shared between the various processors to develop correctly the end-user multimedia application and to know exactly how much memory a processor can use.

Please download the NELK Memory Map spreadsheet to view the memory map. The region are named exactly as in EZSDK Memory Map

Non-Volatile Memory Map[edit | edit source]

Due the fact that different memory size are available on request on Naon SOM, we will review here only the default memory size. Anyway, the beginning of each memory is the same for all of them due boot system restrictions.

Each section correspond to a Linux MTD partition. User can change partition at runtime or by statically by changing Kernel sources. See MTD Partition for more detail regarding this topic.

SPI NOR Flash[edit | edit source]

SPI NOR Flash is the main boot memory, where available, for Naon module. Due the fact that SPI NOR is a non-XIP memory, Naon uses two-stage U-Boot for booting.

Here is the layout of the default 8MiB memory:

Base Address (HEX) Size (KiB) Size (HEX) Usage
0 128 20000 U-boot 1st stage
20000 256 40000 U-boot 2nd stage
60000 64 10000 U-boot env1
70000 64 10000 U-boot env2
80000 3072 300000 Linux Kernel
380000 5120 500000 FREE

The last section is Free for use by the user (e.g. for a ramdisk, a redundant Kernel image or generic storage).


NAND Flash[edit | edit source]

Nand Flash is the main storage memory, even if can be used for boot too. By default Naon is provided with 1GiB Nand but other memory size is available on request. The default Nand partitioning is detailed in the following table:

Base Address (HEX) Size (KiB) Size (HEX) Usage
0 128 20000 U-boot 1st stage
20000 256 40000 U-boot 2nd stage
60000 64 10000 U-boot env1
70000 64 10000 U-boot env2
80000 3072 300000 Linux Kernel
380000 5120 500000 FREE

User Options[edit | edit source]

Without rebuilding Media Controller Firmware (which needs NDA from TI or Dave support) user can change some memory map parameter on the fly.

Change FB size[edit | edit source]

Current LELK support up to 3 Frame Buffers. See Frame Buffer Management -Naon- for more information regarding NELK Frame Buffers.

User can choose how much of Linux kernel memory give to the frame buffer driver and how to divide this memory into the 3 available frame buffer.

The amount of memory that the kernel reserve to the FB is given by the vram command line parameter. For more information in how to change kernel command like parameter see Change Linux Command Line Parameter from U-boot

The amount of memory given away to each frame buffer is described by vram ti81xxfb's module parameter.

E.g. to use 46MiB of RAM for 3 frame buffer, divided in 24MiB for fb0, 16MiB for fb1 and 6MiB for fb2, use:

  • vmem=46M as command line parameter
  • modprobe ti81xxfb vram=0:24M,1:16M,2:6M command to load fb module

User that needs more Linux user space memory and needs only one frame buffer, can, for example, use 6MiB of RAM used only by the first FB, so:

  • vmem=6M as command line parameter
  • modprobe ti81xxfb vram=0:6M command to load fb module

Please note that ti81xxfb is usually loaded at startup from /etc/init.d/load-hd-firmware.sh: user that would like to change the default configuration should change this file.