tn3399_openwrt/target
Chuanhong Guo 2f024b7933 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>
2022-02-14 11:59:12 +08:00
..
imagebuilder imagebuilder: fix local packages/ folder 2021-11-05 19:18:48 -10:00
linux ramips: mt7621: do memory detection on KSEG1 2022-02-14 11:59:12 +08:00
llvm-bpf llvm-bpf: fix rebuild check for generating tarball 2021-11-26 11:37:19 +01:00
sdk sdk: ship llvm toolchain 2022-01-27 11:32:56 +01:00
toolchain toolchain: switch packaged toolchain to tar.xz 2021-10-21 08:25:38 -10:00
Config.in base-files: add eMMC sysupgrade support 2021-12-02 20:42:58 +00:00
Makefile tools/llvm-bpf: move tarball packing to target/llvm-bpf 2021-11-22 12:00:40 +01:00