openwrt/target/linux/ramips
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
..
base-files/etc ramips: remove model name from LED labels 2020-10-02 14:51:57 +02:00
dts ramips: add support for ELECOM WRC-2533GS2 2022-02-11 22:30:04 +09:00
files/drivers ramips: aw9523: add can_sleep flag for GPIO chip 2021-12-29 03:43:03 +01:00
image ramips: add support for ELECOM WRC-2533GS2 2022-02-11 22:30:04 +09:00
mt76x8 ramips: correct vendor name for COMFAST/Joowin 2022-01-22 01:17:04 +01:00
mt7620 ramips: add support for Wavlink WL-WN535K1 2022-01-30 01:15:23 +09:00
mt7621 ramips: update WLAN MAC address of ipTIME A3004T 2022-02-11 22:30:04 +09:00
patches-5.10 ramips: mt7621: do memory detection on KSEG1 2022-02-14 11:59:12 +08:00
rt288x kernel: filter out both Clang and LLD versions 2021-12-17 16:16:34 +01:00
rt305x ramips: Switch Teltonika RUT5xx to kernel GPIO-line watchdog driver 2022-02-03 22:27:15 +01:00
rt3883 kernel: filter out both Clang and LLD versions 2021-12-17 16:16:34 +01:00
Makefile ramips: switch to kernel 5.10 2021-12-13 19:36:52 +01:00
modules.mk ramips: rename mtk-hsdma to hsdma-mt7621 2021-03-04 23:43:02 -10:00