DM36x Memory Map

From RidgeRun Developer Wiki

Linux RAM Memory Map

The RidgeRun SDK bspconfig file contains the entries needed to determine the Linux RAM memory map. The physical start of SDRAM address is 0x80000000.

In the table below, the CONFIG_ has been left off the entries taken from the bspconfig file.

Region Start Address
Formula
Start Address
(Example Value)
Size
Formula
Size
(Example Value)
Notes
Kernel BSP_ARCH_SDRAM_BASE 0x80000000 KCL mem 0x09C00000
mem=156M
The kernel executable is included in this region. The kernel executable starts at 0x80008000 with the first 32K (0x8000) used by the kernel for the initial MMU table. Look in kernel/linux-2.6.32.17-psp03.01.01.39/arch/arm/kernel/head.S for details on the setup of the initial MMU table.
Capture
buffer
After kernel 0x89C00000 KCL vpfe_capture.cont_bufsize 0x00C00000
12Mbytes
Calculate the size to reserve for the capture buffers based on the maximum image resolution and how many buffers you require.
height * width * 2 bytes/pixel * number_of_buffers
 1920  * 1088  * 2             * 3

Round amount to the next 4MB boundary. 1088 is used instead of 1080 do due hardware requiring the width to be divisible by 32. 2 bytes/pixel is used for UYVY encoding.

Display
buffer
After kernel +
KCL vpfe_capture.cont_bufoffset
0x8A800000 KCL davinci_display.cont2_bufsize 0x00D00000 Calculate the size to reserve for the display buffers based on the maximum image resolution and how many buffers you require.

Round amount to the next 4096 boundary.

CMEM After kernel +
KCL vpfe_capture.cont_bufsize +
davinci_display.cont2_bufsize
0x8B500000 Rest of SD RAM
BSP_ARCH_SDRAM_SIZE minus amount used above
0x04B00000 CMEM can use all the remaining SD RAM above the kernel and display and capture buffers.

Notes:

  • KCL is the kernel command line, also called cmdline. You can retrieve the KCL using
    cat /proc/cmdline
    . An example kernel command line used for the values above is:
davinci_enc_mngr.ch0_output=COMPONENT davinci_enc_mngr.ch0_mode=1080I-30 davinci_display.cont2_bufsize=13631488 vpfe_capture.cont_bufoffset=13631488 vpfe_capture.cont_bufsize=12582912 video=davincifb:osd1=0x0x8:osd0=1920x1080x16,4050K@0,0:vid0=off:vid1=off console=none dm365_imp.oper_mode=0 mem=156M ubi.mtd=FS root=ubi0:rootfs rootfstype=ubifs mtdparts=davinci_nand.0:4096k(UBOOT),4736k(KERNEL),204800k(FS) davinci_emac.ethaddr=40:61:86:e9:82:22
  • For video capture, each pixel is typically in NV12 which takes 2 bytes / pixel.