lede/target/linux
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
..
airoha kernel: bump 5.15 to 5.15.103 (#11017) 2023-03-19 11:31:49 +08:00
apm821xx kernel: bump to 5.4.241, 6.1.25 2023-04-21 00:09:22 +08:00
arc770 x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
archs38 x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
armvirt target: add EFI support to armvirt 2023-04-24 15:02:30 +08:00
at91 x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
ath25 kernel: bump 5.4 to 5.4.214 (#10170) 2022-09-24 12:09:08 +08:00
ath79 kernel: bump 5.15 to 5.15.110 2023-05-05 13:37:38 +08:00
bcm27xx kernel: bump 5.15 to 5.15.105 2023-04-21 00:11:35 +08:00
bcm47xx mac80211: remove old legacy legacy drivers 2022-12-18 20:25:07 +08:00
bcm53xx kernel: bump to 5.4.241, 6.1.25 2023-04-21 00:09:22 +08:00
bcm63xx kernel: bump to 5.4.229, 5.10.164, 5.15.89, 6.1.7 (#10785) 2023-01-19 14:03:33 +08:00
bcm4908 kernel: bump to 5.4.227, 5.10.159, 5.15.83 (#10619) 2022-12-15 13:14:31 +08:00
bmips kernel: bump 5.15 to 5.15.67 2022-09-13 19:25:12 +08:00
gemini kernel: bump 5.10 to 5.10.70 (#7976) 2021-10-04 22:25:52 +08:00
generic kernel: bump 5.15 to 5.15.110 2023-05-05 13:37:38 +08:00
imx target: imx6 rename to imx 2022-01-05 19:08:23 +08:00
ipq40xx kernel: bump to 5.4.238, 5.10.176, 5.15.104, 6.1.21 (#11026) 2023-03-23 07:36:05 +00:00
ipq60xx kernel: bump to 5.4.238, 5.10.176, 5.15.104, 6.1.21 (#11026) 2023-03-23 07:36:05 +00:00
ipq806x kernel: bump to 5.4.242, 6.1.26 (#11163) 2023-04-29 13:13:03 +08:00
ipq807x kernel: bump to 5.4.238, 5.10.176, 5.15.104, 6.1.21 (#11026) 2023-03-23 07:36:05 +00:00
kirkwood kernel: remove hack patch, move kirkwood specific kmods to target modules.mk 2022-09-30 21:35:47 +08:00
lantiq kernel: bump to 5.4.237, 5.10.175 (#11016) 2023-03-18 18:08:42 +08:00
layerscape kernel: bump 5.15 to 5.15.103 (#11017) 2023-03-19 11:31:49 +08:00
malta x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
mediatek mediatek: add kernel code for supporting offloading wlan->eth and wlan->wlan flows 2023-04-26 23:58:23 +08:00
meson meson: refresh kernel configuration 2023-02-13 23:50:15 +08:00
mpc85xx kernel: bump 5.4 to 5.4.221 (#10342) 2022-11-01 02:02:19 +00:00
mvebu kernel: bump 5.15 to 5.15.103 (#11017) 2023-03-19 11:31:49 +08:00
mxs x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
octeon kernel: bump 5.4 to 5.4.214 (#10170) 2022-09-24 12:09:08 +08:00
octeontx kernel: bump to 5.4.237, 5.10.175 (#11016) 2023-03-18 18:08:42 +08:00
omap x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
oxnas kernel: bump 5.15 to 5.15.86 (#10708) 2023-01-02 14:11:40 +08:00
pistachio kernel: bump to 5.4.229, 5.10.164, 5.15.89, 6.1.7 (#10785) 2023-01-19 14:03:33 +08:00
ramips ramips: mt7621: do memory detection on KSEG1 2023-05-08 23:35:21 +08:00
realtek kernel: bump 5.4 to 5.4.191 (#9329) 2022-04-29 22:56:09 +08:00
rockchip rockchip: add h68k/h69k hardware v2 support 2023-05-01 21:08:28 +08:00
silicon silicon: fix kernel target 2022-12-14 18:35:35 +08:00
sunxi sunxi: add kernel 5.10 support 2022-12-14 12:00:10 +08:00
tegra kernel: bump 5.10 to 5.10.133 (#9845) 2022-07-27 23:51:57 +08:00
uml x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
x86 target: add EFI support to armvirt 2023-04-24 15:02:30 +08:00
zynq x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
Makefile treewide: sync with upstream (#10750) 2023-01-25 15:30:35 +08:00