Just in case some dev is looking at this topic, I've tracked this issue to the code below. But i believe it has not changed and I have no understanding about its logic to proceed with the investigation of the root cause of what caused it started failing (but I suspect that the "detec_magic" is flawed):
mt7621_memory_detect() determines the amount of memory installed by testing whether the physical memory content is mirrored to the next-higher possible memory size. For example if you have 128MB of memory, the value (detect_magic) at (say) 1MB and 33MB would be different, the value at 1MB and 65MB would be different, but the value at 1MB and 129MB would be identical because the 0-128MB range is mirrored to 128MB-256MB.
The if-statement in the second half of the function is just due to the way MT7621 lays out its memory; if you have 512MB memory then the I/O region will end up in the middle of your physical memory. So that conditional sets up the first 448MB as lowmem and the remaining 64MB on the other side of the I/O region as highmem.
Unfortunately this means disabling highmem isn't an effective workaround; when the memory size is misdetected, you'll just end up with 448MB of lowmem, which is obviously still quite wrong. I suspect that your no-highmem build has merely perturbed the kernel layout in a way that avoids the problem occurring.
If you're able to reproduce the problem with different builds, it might be worth instrumenting it to see why mt7621_memory_detect() is failing, but if you just want a reliable workaround I suggest removing target/linux/ramips/patches-5.4/105-mt7621-memory-detect.patch which should return to the upstream memory detection algorithm.
Today (Dec 5th, 2021) I did a new build (r18287-f9a28d216d) without the above patch to skip the memory detection in the .dtsi file, and now everything is working fine again (tested with 4 Archer C6 v3).
So I'm convinced this was in fact a regression that has now being fixed (by some unidentified commit) and the above patch is not required anymore.
The mystery now is to identify which change/commit fixed this issue...
# go to your local clone
$ cd openwrt
# add my fork to your working copy and name it e.g. "xabolcs-github"
$ git remote add xabolcs-github https://github.com/xabolcs/openwrt.git
$ git remote -v show
origin https://github.com/openwrt/openwrt.git (fetch)
origin https://github.com/openwrt/openwrt.git (push)
xabolcs-github https://github.com/xabolcs/openwrt.git (fetch)
xabolcs-github https://github.com/xabolcs/openwrt.git (push)
# fetch my "branch-21.02-backport-ramips-memory-detect" branch to your working copy and name it e.g. "21.02-ramips-memory-detect
$ git fetch xabolcs-github branch-21.02-backport-ramips-memory-detect:21.02-ramips-memory-detect
* [new branch] branch-21.02-backport-ramips-memory-detect -> 21.02-ramips-memory-detect
* [new branch] branch-21.02-backport-ramips-memory-detect -> xabolcs-github/branch-21.02-backport-ramips-memory-detect
# switch to it and check it's history
$ git checkout 21.02-ramips-memory-detect
Switched to branch '21.02-ramips-memory-detect'
# (I'm syncing OpenWrt's GitHub mirror, as "origin" thats why are you seeing those "openwrt-21.02" branches, you can check them at https://github.com/openwrt/openwrt/commits/openwrt-21.02)
$ git log --oneline
855f60e85e (HEAD -> 21.02-ramips-memory-detect, xabolcs-github/branch-21.02-backport-ramips-memory-detect) ramips: mt7621: do memory detection on KSEG1
7fc336484b (origin/openwrt-21.02, openwrt-21.02) rpcd: backport 802.11ax support
d1c15c41d9 OpenWrt v21.02.2: revert to branch defaults
30e2782e06 (tag: v21.02.2) OpenWrt v21.02.2: adjust config defaults
bf0c965af0 ramips: fix NAND flash driver ECC bit position mask
adb65008c8 kernel: backport fix for initializing skb->cb in the bridge code to 5.4
b7af850bd2 tools/mtools: update to 4.0.35
5d553d8767 tools/fakeroot: fix unresolved symbols on arm64 macOS
c8d6a7c84e tools/fakeroot: fix build on MacOS arm64
83bf22ba2e tools/fakeroot: explicitly pass CPP variable
230ec4c69c bcm4908: backport watchdog and I2C changes
87b9ba9ed9 bcm4908: backport first 5.18 DTS changes
e6a718239f bcm4908: backport bcm_sf2 patch for better LED registers support
e6aaa061d0 bcm4908: backport BCM4908 pinctrl driver
59e7ae8d65 tcpdump: Fix CVE-2018-16301
de948a0bce glibc: update to latest 2.33 HEAD
0c0db6e66b hostapd: Apply SAE/EAP-pwd side-channel attack update 2
5b13b0b02c wolfssl: update to 5.1.1-stable
7d376e6e52 libs/wolfssl: add SAN (Subject Alternative Name) support
5ea2e1d5ba wolfssl: enable ECC Curve 25519 by default
4108d02a29 ustream-ssl: update to Git version 2022-01-16
# and then: build as usual
$ make clean
$ scripts/feeds update -a
$ scripts/feefs install -a
$ make menuconfig