88f6282内存检测

内存加到1G后,发现后面的512M不能使用,导致kernel起不来,停在starting kernel那里。

所以在uboot环境下检测后面512M内存:

 

uboot下sflash 地址为0xf8000000,前100000为uboot,后面的为kernel

Marvell>> iminfo 0xf8100000

## Checking Image at f8100000 ...
   Image Name:   Linux-2.6.31.8
   Created:      2011-06-19   8:36:25 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4419220 Bytes =  4.2 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK

读取kernel到内存某地址,再和sflash中的内容比较,就能检测内存是否错误:
setenv loadaddr 0x02000000
sflash read 0x100000 $(loadaddr) 0x500000
cmp.b  $(loadaddr) 0xf8100000 0x500000

读取到512M位置,发现比较错误。
setenv loadaddr 0x20000000
Marvell>> sflash read 0x100000 $(loadaddr) 0x500000
Marvell>> cmp.b  $(loadaddr) 0xf8100000 0x500000
byte at 0x20000000 (0x9f) != byte at 0xf8100000 (0x27)
Total of 0 bytes were the same

你可能感兴趣的:(内存)