lede/target
Chuanhong Guo 990cd1b3f1 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>
2023-05-08 23:35:21 +08:00
..
imagebuilder treewide: sync with upstream (#10750) 2023-01-25 15:30:35 +08:00
linux ramips: mt7621: do memory detection on KSEG1 2023-05-08 23:35:21 +08:00
llvm-bpf toolchain: add llvm-bpf 2022-04-07 01:01:05 +08:00
sdk sync with upstream (#10562) 2022-12-08 14:20:57 +08:00
toolchain sync with upstream (#10562) 2022-12-08 14:20:57 +08:00
Config.in sync with upstream (#10562) 2022-12-08 14:20:57 +08:00
Makefile ipq60xx: add dma arm64 api patch 2022-09-13 15:19:06 +08:00