From: Thomas Chou Date: Thu, 5 Nov 2015 13:47:42 +0800 Subject: [U-Boot] [PATCH 2/2] nios2: trim CONFIG_SYS_MEMTEST_END In-Reply-To: <1446647249.2582.3.camel@clsee-VirtualBox> References: <1446615011-30320-1-git-send-email-thomas@wytron.com.tw> <1446615011-30320-2-git-send-email-thomas@wytron.com.tw> <1446647249.2582.3.camel@clsee-VirtualBox> Message-ID: <563AED7E.7030503@wytron.com.tw> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Chin Liang, On 2015?11?04? 22:27, Chin Liang See wrote: >> +#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MONITOR_BASE - \ >> + CONFIG_ENV_SIZE - \ >> + CONFIG_SYS_MALLOC_LEN - \ > > Since CONFIG_ENV_IS_IN_FLASH, I believe we can take out the > CONFIG_ENV_SIZE here. > This comes from a very old macro in common.h, #if defined(CONFIG_ENV_IS_EMBEDDED) #define TOTAL_MALLOC_LEN CONFIG_SYS_MALLOC_LEN #elif ( ((CONFIG_ENV_ADDR+CONFIG_ENV_SIZE) < CONFIG_SYS_MONITOR_BASE) || \ (CONFIG_ENV_ADDR >= (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)) ) || \ defined(CONFIG_ENV_IS_IN_NVRAM) #define TOTAL_MALLOC_LEN (CONFIG_SYS_MALLOC_LEN + CONFIG_ENV_SIZE) #else #define TOTAL_MALLOC_LEN CONFIG_SYS_MALLOC_LEN #endif The TOTAL_MALLOC_LEN is (CONFIG_SYS_MALLOC_LEN + CONFIG_ENV_SIZE) for nios2. I think the macro might need fix though. Best regards, Thomas