Hi! On Mon, Feb 21, 2022 at 10:22 AM Szabolcs Hubai <szab...@gmail.com> wrote: > > From: Chuanhong Guo <gch981...@gmail.com> > > 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 <rsalvate...@gmail.com> > Tested-by: Rui Salvaterra <rsalvate...@gmail.com> > Signed-off-by: Chuanhong Guo <gch981...@gmail.com> > (cherry picked from commit 2f024b79331141e2a62c9bf3601c803b26bde77b) > [backport for OpenWrt 21.02 as it was reproducible with Kernel 5.4, see [1]] > [1]: https://forum.openwrt.org/t/113081 > Tested-by: Dimitri Souza <dimitri.so...@gmail.com> [mt7621/archer-c6-v3] > Signed-off-by: Szabolcs Hubai <szab...@gmail.com>
Merged. Thanks! -- Regards, Chuanhong Guo _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel