armv7R: K3: am654: Use full malloc implementation in SPL
authorAndreas Dannenberg <dannenberg@ti.com>
Tue, 4 Jun 2019 22:55:49 +0000 (17:55 -0500)
committerTom Rini <trini@konsulko.com>
Wed, 17 Jul 2019 15:12:54 +0000 (11:12 -0400)
Switch to using the full malloc scheme in post-relocation SPL to allow
better utilization of available memory for example by allowing memory
to get freed. Initially allocate a 16MB-sized region in DDR starting
at address 0x84000000 for this purpose.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
configs/am65x_evm_r5_defconfig
configs/am65x_hs_evm_r5_defconfig
include/configs/am65x_evm.h

index 6a261c20acb95b2cc0a492786f7f20ffb7f316c6..5abd686931db6f7c7244d202f81ddbde2851b25d 100644 (file)
@@ -18,7 +18,6 @@ CONFIG_SPL_LOAD_FIT=y
 CONFIG_USE_BOOTCOMMAND=y
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_SPL_TEXT_BASE=0x41c00000
-CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_STACK_R=y
 CONFIG_SPL_SEPARATE_BSS=y
 CONFIG_SPL_I2C_SUPPORT=y
index 0b12f15782ef9c6d25d30105c74ab70781bf8b19..49eca7de64ae19575270ce99d02cda8a51635b31 100644 (file)
@@ -20,7 +20,6 @@ CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
 CONFIG_USE_BOOTCOMMAND=y
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_SPL_TEXT_BASE=0x41c00000
-CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_STACK_R=y
 CONFIG_SPL_SEPARATE_BSS=y
 CONFIG_SPL_I2C_SUPPORT=y
index 13197459634f2a078961e52880185fc1c89c46e9..ea365b979bd9c8377fc85c32947a6d7e9952b9d4 100644 (file)
@@ -41,6 +41,9 @@
                                         CONFIG_SPL_BSS_MAX_SIZE)
 /* Set the stack right below the SPL BSS section */
 #define CONFIG_SYS_INIT_SP_ADDR         CONFIG_SPL_BSS_START_ADDR
+/* Configure R5 SPL post-relocation malloc pool in DDR */
+#define CONFIG_SYS_SPL_MALLOC_START    0x84000000
+#define CONFIG_SYS_SPL_MALLOC_SIZE     SZ_16M
 #endif
 
 #ifdef CONFIG_SYS_K3_SPL_ATF