board: ti: am62x: Avoid overwriting reserve mem for AM62 SIP
AM62 SIP has 512MB RAM. But the top of the RAM is reserved for TF-A and OPTEE. U-Boot relocating there would cause overwriting of these reserved regions. Fix this by limit U-Boot to first 256MB of RAM for all boards with 512MB. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
This commit is contained in:
parent
8a25b4e318
commit
64c0d9e010
|
|
@ -23,6 +23,8 @@
|
|||
#include <asm/gpio.h>
|
||||
#include <cpu_func.h>
|
||||
|
||||
#include <linux/sizes.h>
|
||||
|
||||
#include "../common/board_detect.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
|
@ -86,6 +88,16 @@ int dram_init_banksize(void)
|
|||
return fdtdec_setup_memory_banksize();
|
||||
}
|
||||
|
||||
phys_size_t get_effective_memsize(void)
|
||||
{
|
||||
/*
|
||||
* Just below 512MB are TF-A and OPTEE reserve regions, thus
|
||||
* SPL/U-Boot RAM has to start below that. Leave 256MB space for
|
||||
* all reserved memories.
|
||||
*/
|
||||
return gd->ram_size == SZ_512M ? SZ_256M : gd->ram_size;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SPL_BUILD)
|
||||
static int video_setup(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue