In u-boot, DDR memory map is as the following.
* 0x0000_0000 0x7fff_ffff DDR Up to 2GB cacheable
Typically U-Boot is built to reside/execute in the upper portion of main memory, and the remainder of low memory is available for whatever.
U-Boot will start its stack at the end of SDRAM, or BASE+SIZE. So the region between CONFIG_SYS_TEXT_BASE+(size of u-boot.bin) and the end of SDRAM is the available stack area should be available.
U-Boot will also use memory below CONFIG_SYS_TEXT_BASE for its malloc() pool. The size of that region is defined by CONFIG_SYS_MALLOC_LEN.
So the memory between CONFIG_SYS_SDRAM_BASE and
CONFIG_SYS_TEXT_BASE-CONFIG_SYS_MALLOC_LEN should be available.
'examples/hello_world.c' contains a small "Hello World" Demo
application; it is automatically compiled when you build U-Boot.
It's configured to run at address 0x00040004, so you can play with it
like that:
=> loads
## Ready for S-Record download ...
~>examples/hello_world.srec
1 2 3 4 5 6 7 8 9 10 11 ...
[file transfer complete]
[connected]
## Start Addr = 0x00040004
=> go 40004 Hello World! This is a test.
## Starting application at 0x00040004 ...
Hello World
argc = 7
argv[0] = "40004"
argv[1] = "Hello"
argv[2] = "World!"
argv[3] = "This"
argv[4] = "is"
argv[5] = "a"
argv[6] = "test."
argv[7] = "<NULL>"
Hit any key to exit ...
## Application terminated, rc = 0x0