
Hi Thomas,
On Thu, 2015-11-05 at 13:47 +0800, thomas@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 clsee@altera.com
Thanks Chin Liang
Best regards, Thomas