88f6282記憶體檢測

2021-09-06 03:45:07 字數 976 閱讀 5020

記憶體加到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