From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Mon, 30 Mar 2015 01:45:34 +0200 Subject: [U-Boot] [PATCHv2 15/20] arm: socfpga: spl: adjust SPL_MALLOC_SIZE to 256 In-Reply-To: <5515B93B.5050501@opensource.altera.com> References: <1425313688-23595-1-git-send-email-dinguyen@opensource.altera.com> <201503041416.02358.marex@denx.de> <5515B93B.5050501@opensource.altera.com> Message-ID: <201503300145.34550.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Friday, March 27, 2015 at 09:10:35 PM, Dinh Nguyen wrote: > Hi Marek, Hi Dinh, > On 03/04/2015 07:16 AM, Marek Vasut wrote: > > On Monday, March 02, 2015 at 05:28:03 PM, dinguyen at opensource.altera.com wrote: > >> From: Dinh Nguyen > >> > >> Signed-off-by: Dinh Nguyen > > > > Why did you do this change please ? > > Sorry that it's taken me a while to get back to you on this, but this is > why I had to adjust the SPL_MALLOC_SIZE to 256: No worries, I'm also quite busy myself :) > #define CONFIG_SYS_INIT_RAM_SIZE (0x10000 - 0x100) > #define CONFIG_SYS_INIT_SP_ADDR \ > (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE - \ > GENERATED_GBL_DATA_SIZE) > > Because of the above define I only have 0x100 left for SPL_MALLOC_SIZE. > > I think I should rework this patch to be like this: > > --- a/include/configs/socfpga_common.h > +++ b/include/configs/socfpga_common.h > @@ -41,7 +41,7 @@ > #define CONFIG_SYS_MEMTEST_END PHYS_SDRAM_1_SIZE > > #define CONFIG_SYS_INIT_RAM_ADDR 0xFFFF0000 > -#define CONFIG_SYS_INIT_RAM_SIZE (0x10000 - 0x100) > +#define CONFIG_SYS_INIT_RAM_SIZE (0x10000 - > CONFIG_SYS_SPL_MALLOC_SIZE) Certainly, that makes more sense ;-) You can also take for example include/configs/novena.h for a reference. It contains the defines which should be enabled for SPL with working mallocator, while it still runs from OCRAM. Best regards, Marek Vasut