Tome el uboot correspondiente a Hi3519av100 como ejemplo y desee probar la memoria en uboot
Puedes usar el comando "mtest"
Compile uboot, agregue la macro mtest a la configuración
make ARCH=arm k5_hi3519av100_defconfig
make ARCH=arm menuconfig
找到
CONFIG_CMD_MEMTEST
将其变为 CONFIG_CMD_MEMTEST=y
Luego busque el archivo de configuración en el directorio "include / configs /" correspondiente
Aquí está "k5_hi3519av100", modifique el siguiente contenido:
#define CONFIG_SYS_MEMTEST_START (CONFIG_SYS_SDRAM_BASE + 0x3000000)
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x80000000 - 1)
注:
MEMTEST_START是从内存DDR的起始地址开始,但为了避开uboot的那段地址,因此+0x3000000;
同时DDR的size为2G,因此结束地址为DDR_START+DDR_SIZE
Luego compile, genere uboot, marque "mtest" debajo de uboot:
hisilicon # mtest help
mtest - simple RAM read/write test
Usage:
mtest [start [end [pattern [iterations]]]]
hisilicon #
Simplemente haga una prueba para probar la memoria entre 0x30000000 ~ 0x35000000
dcache on
hisilicon # mtest 0x30000000 0x35000000 0x0 1
Testing 30000000 ... 35000000:
Pattern 00000000 Writing... Reading...Tested 1 iteration(s) with 0 errors.
hisilicon #
¡Fin!