3.1.1.6. RAM and Device Trees
3.1.1.6.1. Available RAM for image download
To know the amount of RAM available for downloading images or for other
usage, use bdinfo
command.
=> bdinfo
arch_number = 0x00000000
boot_params = 0x80000100
DRAM bank = 0x00000000
-> start = 0x80000000
-> size = 0x7F000000
baudrate = 115200 bps
TLB addr = 0xFEFF0000
relocaddr = 0xFEF30000
reloc off = 0x7E730000
irq_sp = 0xFCEF8880
sp start = 0xFCEF8870
Early malloc usage: 890 / 2000
After booting, U-Boot relocates itself (along with its various reserved
RAM areas) and places itself at end of available RAM (starting at
relocaddr
in bdinfo
output above). Only the stack is located
just before that area. The address of top of the stack is in
sp start
in bdinfo
output and it grows downwards. Users should
reserve at least about 1MB for stack, so in the example output above,
RAM in the range of [0x80000000, 0xFCE00000]
is safely available for
use.
3.1.1.6.2. Device Trees
A note about device trees. Now all supported boards are required to use a device tree to boot. To facilitate this in supported platforms, a command in U-Boot environment findfdt is available that will set the fdtfile variable to the name of the device tree to use, as found with the kernel sources. In the Keystone-2 family devices (K2H/K/E/L/G), it is specified by name_fdt variable for each platform. The device tree is expected to be loaded from the same media as the kernel, and from the same relative path.
3.1.1.6.3. SRAM memory Layout during initial bootloader stage
The SRAM memory layout explains the memory used for Bootloader’s operation.
┌──────────────────────────────────────┐0x43c00000 │ │ │ │ │ SPL IMAGE │ │ (Max size 192 KB) │ │ (excluding BSS) │ │ (196608B Max) │ │ │ ├──────────────────────────────────────┤0x43c30000 │ │ │ │ │ STACK (13568B Max) │ │ │ │ │ ├──────────────────────────────────────┤ │ Global Data (428B Max) │ ├──────────────────────────────────────┤ │ │ │ HEAP (28KB Max) │ │ │ ├──────────────────────────────────────┤0x43c3a7f0 │ │ │ EMPTY (16B) │ │ │ ├──────────────────────────────────────┤0x43c3a800 │ │ │ │ │ DM config data (2KB) │ │ │ │ │ ├──────────────────────────────────────┤0x43c3b000 │ │ │ BSS (12KB) │ │ │ ├──────────────────────────────────────┤0x43c3e000 │ │ │ │ │ EMPTY (4.5KB) │ │ (Reserved for ROM) │ │ │ ├──────────────────────────────────────┤0x43c3f1e0 │ │ │ ROM Boot parameter table │ │ + Extended boot info (3.5 KB) │ │ │ └──────────────────────────────────────┘0x43c3ffff