From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chin Liang See Date: Mon, 9 Nov 2015 00:37:06 -0600 Subject: [U-Boot] [PATCH 2/2] nios2: trim CONFIG_SYS_MEMTEST_END In-Reply-To: <563AED7E.7030503@wytron.com.tw> 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> <563AED7E.7030503@wytron.com.tw> Message-ID: <1447051026.2048.2.camel@clsee-VirtualBox> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Thomas, On Thu, 2015-11-05 at 13:47 +0800, thomas at wytron.com.tw wrote: > 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. Yah. In that case, it should be ok CONFIG_ENV_SIZE is much small. The memtest should sufficiently exercise the each memory lines. Thanks again for the patch. Reviewed-by: Chin Liang See Thanks Chin Liang > > Best regards, > Thomas