aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq40xx/files-5.10
diff options
context:
space:
mode:
authorChuanhong Guo <gch981213@gmail.com>2022-02-10 23:09:46 +0800
committerChuanhong Guo <gch981213@gmail.com>2022-02-14 11:59:12 +0800
commit2f024b79331141e2a62c9bf3601c803b26bde77b (patch)
treed34659ce8957c1bb384b4133be744045a6cc5640 /target/linux/ipq40xx/files-5.10
parent5205010a546fed2227c208f6bd025b47398f4cf3 (diff)
downloadupstream-2f024b79331141e2a62c9bf3601c803b26bde77b.tar.gz
upstream-2f024b79331141e2a62c9bf3601c803b26bde77b.tar.bz2
upstream-2f024b79331141e2a62c9bf3601c803b26bde77b.zip
ramips: mt7621: do memory detection on KSEG1
It's reported that current memory detection code occasionally detects larger memory under some bootloaders. Current memory detection code tests whether address space wraps around on KSEG0, which is unreliable because it's cached. Rewrite memory size detection to perform the same test on KSEG1 instead. While at it, this patch also does the following two things: 1. use a fixed pattern instead of a random function pointer as the magic value. 2. add an additional memory write and a second comparison as part of the test to prevent possible smaller memory detection result due to leftover values in memory. Fixes: 6d91ddf517 ("ramips: mt7621: add support for memory detection") Reported-by: Rui Salvaterra <rsalvaterra@gmail.com> Tested-by: Rui Salvaterra <rsalvaterra@gmail.com> Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Diffstat (limited to 'target/linux/ipq40xx/files-5.10')
0 files changed, 0 insertions, 0 deletions