Kernel thinks u7623 has double the RAM

I have OpenWrt 21.02.1 installed on a new U7623 router. I have the unusual problem that the kernel is reporting there is double the amount of actual RAM present.

dmesg initially reports the correct amount of RAM:
[ 0.000000] OF: fdt: Machine model: UniElec U7623-02 eMMC (512M RAM)

But both free and cat /proc/meminfo report that there is actually 1024MB present:

# free
              total        used        free      shared  buff/cache   available
Mem:        1028520       38204      957388        1124       32928      937468
Swap:             0           0           0
# cat /proc/meminfo
MemTotal:        1028520 kB
...

The device was upgraded from the vendor OpenWrt 14 to 21.02.1 first by a sysupgrade to the legacy image, then by a sysupgrade to the full image. For good measure the MediaTek flash software was also used to flash over USB UART.

I am looking at the board, and there are physically two 128MB x 16 bit chips mounted on it (NTCC128M16JR-EK x 2).

Linux is convinced enough that the memory is real that it will try and use it, which causes the device to reboot.

Full dmesg and /proc/meminfo to follow:

# dmesg
    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.154 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16325-88151b8303)) #0 SMP PREEMPT Sun Oct 24 09:01:35 2021
[    0.000000] CPU: ARMv7 Processor [410fc073] revision 3 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: UniElec U7623-02 eMMC (512M RAM)
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] On node 0 totalpages: 262144
[    0.000000]   Normal zone: 1728 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 196608 pages, LIFO batch:63
[    0.000000]   HighMem zone: 65536 pages, LIFO batch:15
[    0.000000] percpu: Embedded 15 pages/cpu s30348 r8192 d22900 u61440
[    0.000000] pcpu-alloc: s30348 r8192 d22900 u61440 alloc=15*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260416
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p3 rootfstype=squashfs,ext4 rootwait
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 1027496K/1048576K available (7168K kernel code, 223K rwdata, 1008K rodata, 1024K init, 241K bss, 21080K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] 	Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from 0xc0a00bc4 with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 13.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2ff89eacb, max_idle_ns: 440795202429 ns
[    0.000005] sched_clock: 56 bits at 13MHz, resolution 76ns, wraps every 4398046511101ns
[    0.000016] Switching to timer-based delay loop, resolution 76ns
[    0.000182] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 147020034397 ns
[    0.000197] sched_clock: 32 bits at 13MHz, resolution 76ns, wraps every 165191050201ns
[    0.000478] Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=130000)
[    0.000492] pid_max: default: 32768 minimum: 301
[    0.000667] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.000684] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.001483] CPU: Testing write buffer coherency: ok
[    0.002442] Setting up static identity map for 0x80100000 - 0x80100060
[    0.002575] rcu: Hierarchical SRCU implementation.
[    0.002983] smp: Bringing up secondary CPUs ...
[    0.004888] smp: Brought up 1 node, 4 CPUs
[    0.004905] SMP: Total of 4 processors activated (104.00 BogoMIPS).
[    0.004912] CPU: All CPU(s) started in SVC mode.
[    0.011250] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 3
[    0.011612] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.011636] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.011813] pinctrl core: initialized pinctrl subsystem
[    0.012751] NET: Registered protocol family 16
[    0.013007] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.013900] No ATAGs?
[    0.092449] usbcore: registered new interface driver usbfs
[    0.092512] usbcore: registered new interface driver hub
[    0.092565] usbcore: registered new device driver usb
[    0.093171] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.094160] clocksource: Switched to clocksource arch_sys_counter
[    0.094986] thermal_sys: Registered thermal governor 'step_wise'
[    0.095422] NET: Registered protocol family 2
[    0.095592] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.096672] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.096708] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.096779] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.096891] TCP: Hash tables configured (established 8192 bind 8192)
[    0.097010] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.097059] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.097307] NET: Registered protocol family 1
[    0.097343] PCI: CLS 0 bytes, default 64
[    0.098549] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    0.104118] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.104131] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.138805] bounce: pool size: 64 pages
[    0.138864] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    1.154651] mtk-scpsys 10006000.scpsys: Failed to power on domain mfg
[    1.154669] ------------[ cut here ]------------
[    1.154682] WARNING: CPU: 0 PID: 1 at drivers/soc/mediatek/mtk-scpsys.c:457 0xc04a2d28
[    1.154689] Modules linked in:
[    1.154703] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.154 #0
[    1.154710] Hardware name: Mediatek Cortex-A7 (Device Tree)
[    1.154727] Function entered at [<c010e9bc>] from [<c010b040>]
[    1.154736] Function entered at [<c010b040>] from [<c074a088>]
[    1.154744] Function entered at [<c074a088>] from [<c011c708>]
[    1.154752] Function entered at [<c011c708>] from [<c011c774>]
[    1.154760] Function entered at [<c011c774>] from [<c04a2d28>]
[    1.154768] Function entered at [<c04a2d28>] from [<c04d34ac>]
[    1.154776] Function entered at [<c04d34ac>] from [<c04d17b0>]
[    1.154784] Function entered at [<c04d17b0>] from [<c04d1a98>]
[    1.154791] Function entered at [<c04d1a98>] from [<c04d1d40>]
[    1.154798] Function entered at [<c04d1d40>] from [<c04d1da0>]
[    1.154806] Function entered at [<c04d1da0>] from [<c04cfc38>]
[    1.154813] Function entered at [<c04cfc38>] from [<c04d0bbc>]
[    1.154820] Function entered at [<c04d0bbc>] from [<c04d25a4>]
[    1.154828] Function entered at [<c04d25a4>] from [<c0102720>]
[    1.154835] Function entered at [<c0102720>] from [<c0a00f3c>]
[    1.154844] Function entered at [<c0a00f3c>] from [<c075ff08>]
[    1.154851] Function entered at [<c075ff08>] from [<c01010e8>]
[    1.154859] Exception stack(0xef071fb0 to 0xef071ff8)
[    1.154869] 1fa0:                                     00000000 00000000 00000000 00000000
[    1.154881] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.154891] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.154906] ---[ end trace 1cb9714c2b11ce8b ]---
[    1.155483] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    1.157858] printk: console [ttyS0] disabled
[    1.178120] 11004000.serial: ttyS0 at MMIO 0x11004000 (irq = 198, base_baud = 1625000) is a ST16650V2
[    1.798754] printk: console [ttyS0] enabled
[    1.803605] mtk_rng 1020f000.rng: registered RNG driver
[    1.803750] random: fast init done
[    1.812474] random: crng init done
[    1.813349] loop: module loaded
[    1.819989] mt6323-regulator mt6323-regulator: Chip ID = 0x2023
[    1.835488] libphy: Fixed MDIO Bus: probed
[    1.862772] libphy: mdio: probed
[    1.866171] mt7530 mdio-bus:00: MT7530 adapts as multi-chip module
[    1.872764] mtk_soc_eth 1b100000.ethernet: generated random MAC address 52:19:d7:02:8c:43
[    1.881484] mtk_soc_eth 1b100000.ethernet eth0: mediatek frame engine at 0xf08e0000, irq 204
[    1.891188] xhci-mtk 1a1c0000.usb: xHCI Host Controller
[    1.896519] xhci-mtk 1a1c0000.usb: new USB bus registered, assigned bus number 1
[    1.907002] xhci-mtk 1a1c0000.usb: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000290010
[    1.916166] xhci-mtk 1a1c0000.usb: irq 202, io mem 0x1a1c0000
[    1.922087] xhci-mtk 1a1c0000.usb: xHCI Host Controller
[    1.927349] xhci-mtk 1a1c0000.usb: new USB bus registered, assigned bus number 2
[    1.934769] xhci-mtk 1a1c0000.usb: Host supports USB 3.0 SuperSpeed
[    1.941666] hub 1-0:1.0: USB hub found
[    1.945494] hub 1-0:1.0: 1 port detected
[    1.949852] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.958461] hub 2-0:1.0: USB hub found
[    1.962241] hub 2-0:1.0: 1 port detected
[    1.966820] i2c /dev entries driver
[    1.970849] mtk-thermal 1100b000.thermal: Device not calibrated, using default calibration values
[    1.980797] mtk-wdt 10007000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    1.989055] cpu cpu0: dummy supplies not allowed for exclusive requests
[    1.997655] sdhci: Secure Digital Host Controller Interface driver
[    2.003830] sdhci: Copyright(c) Pierre Ossman
[    2.009888] mediatek-mt2701-pinctrl 1000b000.pinctrl: not freeing pin 111 (MSDC0_DAT7) as part of deactivating group MSDC0_DAT7 - it is already used for some other setting
[    2.025270] mediatek-mt2701-pinctrl 1000b000.pinctrl: not freeing pin 112 (MSDC0_DAT6) as part of deactivating group MSDC0_DAT6 - it is already used for some other setting
[    2.040575] mediatek-mt2701-pinctrl 1000b000.pinctrl: not freeing pin 113 (MSDC0_DAT5) as part of deactivating group MSDC0_DAT5 - it is already used for some other setting
[    2.055876] mediatek-mt2701-pinctrl 1000b000.pinctrl: not freeing pin 114 (MSDC0_DAT4) as part of deactivating group MSDC0_DAT4 - it is already used for some other setting
[    2.071172] mediatek-mt2701-pinctrl 1000b000.pinctrl: not freeing pin 118 (MSDC0_DAT3) as part of deactivating group MSDC0_DAT3 - it is already used for some other setting
[    2.086510] mediatek-mt2701-pinctrl 1000b000.pinctrl: not freeing pin 119 (MSDC0_DAT2) as part of deactivating group MSDC0_DAT2 - it is already used for some other setting
[    2.101809] mediatek-mt2701-pinctrl 1000b000.pinctrl: not freeing pin 120 (MSDC0_DAT1) as part of deactivating group MSDC0_DAT1 - it is already used for some other setting
[    2.117105] mediatek-mt2701-pinctrl 1000b000.pinctrl: not freeing pin 121 (MSDC0_DAT0) as part of deactivating group MSDC0_DAT0 - it is already used for some other setting
[    2.132401] mediatek-mt2701-pinctrl 1000b000.pinctrl: not freeing pin 116 (MSDC0_CMD) as part of deactivating group MSDC0_CMD - it is already used for some other setting
[    2.147523] mediatek-mt2701-pinctrl 1000b000.pinctrl: not freeing pin 117 (MSDC0_CLK) as part of deactivating group MSDC0_CLK - it is already used for some other setting
[    2.162644] mediatek-mt2701-pinctrl 1000b000.pinctrl: not freeing pin 115 (MSDC0_RSTB) as part of deactivating group MSDC0_RSTB - it is already used for some other setting
[    2.203500] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.212032] NET: Registered protocol family 10
[    2.217487] Segment Routing with IPv6
[    2.221259] NET: Registered protocol family 17
[    2.225964] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    2.239206] 8021q: 802.1Q VLAN Support v1.8
[    2.243597] ThumbEE CPU extension supported.
[    2.248059] Registering SWP/SWPB emulation handler
[    2.278483] mtk-pcie 1a140000.pcie: host bridge /pcie@1a140000 ranges:
[    2.285151] mtk-pcie 1a140000.pcie:    IO 0x1a160000..0x1a16ffff -> 0x1a160000
[    2.292423] mtk-pcie 1a140000.pcie:   MEM 0x60000000..0x6fffffff -> 0x60000000
[    2.329697] mmc0: new high speed MMC card at address 0001
[    2.336085] mmcblk0: mmc0:0001 8GTF4R 7.28 GiB 
[    2.341214] mmcblk0boot0: mmc0:0001 8GTF4R partition 1 4.00 MiB
[    2.348550] mmcblk0boot1: mmc0:0001 8GTF4R partition 2 4.00 MiB
[    2.354746] mmcblk0rpmb: mmc0:0001 8GTF4R partition 3 512 KiB, chardev (249:0)
[    2.362979]  mmcblk0: p1 p2 p3
[    2.402703] mtk-pcie 1a140000.pcie: Port1 link down
[    2.423731] mtk-pcie 1a140000.pcie: PCI host bridge to bus 0000:00
[    2.429939] pci_bus 0000:00: root bus resource [bus 00-ff]
[    2.435434] pci_bus 0000:00: root bus resource [io  0x0000-0xffff] (bus address [0x1a160000-0x1a16ffff])
[    2.444916] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    2.451973] pci 0000:00:02.0: [14c3:0801] type 01 class 0x060400
[    2.458029] pci 0000:00:02.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    2.464373] pci 0000:00:02.0: supports D1
[    2.468376] pci 0000:00:02.0: PME# supported from D0 D1 D3hot
[    2.475775] PCI: bus0: Fast back to back transfers disabled
[    2.481346] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.489507] pci 0000:01:00.0: [14c3:7615] type 00 class 0x000280
[    2.495564] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[    2.504094] PCI: bus1: Fast back to back transfers disabled
[    2.509692] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    2.516336] pci 0000:00:02.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    2.523117] pci 0000:00:02.0: BAR 1: assigned [mem 0x60100000-0x6010ffff]
[    2.529919] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    2.537242] pci 0000:00:02.0: PCI bridge to [bus 01]
[    2.542202] pci 0000:00:02.0:   bridge window [mem 0x60000000-0x600fffff]
[    2.549169] pcieport 0000:00:02.0: enabling device (0140 -> 0142)
[    2.555451] pcieport 0000:00:02.0: PME: Signaling with IRQ 214
[    2.561584] pcieport 0000:00:02.0: AER: enabled with IRQ 214
[    2.567587] mt7530 mdio-bus:00: MT7530 adapts as multi-chip module
[    2.582575] libphy: dsa slave smi: probed
[    2.586870] mt7530 mdio-bus:00 lan0 (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY]
[    2.595927] mt7530 mdio-bus:00 lan1 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY]
[    2.604901] mt7530 mdio-bus:00 lan2 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY]
[    2.613825] mt7530 mdio-bus:00 lan3 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY]
[    2.622808] mt7530 mdio-bus:00 wan (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY]
[    2.631872] mt7530 mdio-bus:00: configuring for fixed/trgmii link mode
[    2.642462] mt7530 mdio-bus:00: Link is Up - 1Gbps/Full - flow control off
[    2.649444] DSA: tree 0 setup
[    2.653093] hctosys: unable to open rtc device (rtc0)
[    2.661009] VFS: Mounted root (squashfs filesystem) readonly on device 179:3.
[    2.669073] Freeing unused kernel memory: 1024K
[    2.714286] Run /sbin/init as init process
[    2.893560] init: Console is alive
[    2.897785] init: - watchdog -
[    3.095813] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.148934] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.158192] SCSI subsystem initialized
[    3.165079] libata version 3.00 loaded.
[    3.168556] ehci-fsl: Freescale EHCI Host controller driver
[    3.174772] ehci-platform: EHCI generic platform driver
[    3.181519] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    3.189425] ohci-platform: OHCI generic platform driver
[    3.196221] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.214045] init: - preinit -
[    3.531876] mtk_soc_eth 1b100000.ethernet eth0: configuring for fixed/trgmii link mode
[    3.539968] mtk_soc_eth 1b100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[    3.930120] device eth0 entered promiscuous mode
[    3.935353] mt7530 mdio-bus:00 lan1: configuring for phy/gmii link mode
[    3.942289] 8021q: adding VLAN 0 to HW filter on device lan1
[    8.125123] mount_root: rootdisk overlay filesystem has not been formatted yet
[    8.495336] F2FS-fs (loop0): Found nat_bits in checkpoint
[    8.512910] F2FS-fs (loop0): Mounted with checkpoint version = 351ed69f
[    8.520130] mount_root: overlay filesystem has not been fully initialized yet
[    8.527709] mount_root: switching to f2fs overlay
[    8.553813] insmod: module is already loaded - nls_cp437
[    8.562108] insmod: module is already loaded - nls_iso8859-1
[    8.570819] insmod: module is already loaded - fat
[    8.578426] insmod: module is already loaded - vfat
[    8.808416] urandom-seed: Seed file not found (/etc/urandom.seed)
[    8.880562] device eth0 left promiscuous mode
[    8.890274] procd: - early -
[    8.893219] procd: - watchdog -
[    9.418511] procd: - watchdog -
[    9.422505] procd: - ubus -
[    9.480076] procd: - init -
[    9.798024] urngd: v1.0.2 started.
[    9.804378] kmodloader: loading kernel modules from /etc/modules.d/*
[    9.866356] xt_time: kernel timezone is -0000
[    9.879078] PPP generic driver version 2.4.2
[    9.884805] NET: Registered protocol family 24
[    9.900457] kmodloader: done loading kernel modules from /etc/modules.d/*
[   12.287473] mtk_soc_eth 1b100000.ethernet eth0: Link is Down
[   12.303512] mtk_soc_eth 1b100000.ethernet eth0: configuring for fixed/trgmii link mode
[   12.311664] mtk_soc_eth 1b100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   12.312961] device eth0 entered promiscuous mode
[   12.325846] mt7530 mdio-bus:00 lan0: configuring for phy/gmii link mode
[   12.332956] 8021q: adding VLAN 0 to HW filter on device lan0
[   12.341073] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   12.347944] br-lan: port 1(lan0) entered blocking state
[   12.353211] br-lan: port 1(lan0) entered disabled state
[   12.359408] device lan0 entered promiscuous mode
[   12.377543] mt7530 mdio-bus:00 lan1: configuring for phy/gmii link mode
[   12.384545] 8021q: adding VLAN 0 to HW filter on device lan1
[   12.392647] br-lan: port 2(lan1) entered blocking state
[   12.398424] br-lan: port 2(lan1) entered disabled state
[   12.404459] device lan1 entered promiscuous mode
[   12.415846] mt7530 mdio-bus:00 lan2: configuring for phy/gmii link mode
[   12.422846] 8021q: adding VLAN 0 to HW filter on device lan2
[   12.431071] br-lan: port 3(lan2) entered blocking state
[   12.436510] br-lan: port 3(lan2) entered disabled state
[   12.442571] device lan2 entered promiscuous mode
[   12.454108] mt7530 mdio-bus:00 lan3: configuring for phy/gmii link mode
[   12.461191] 8021q: adding VLAN 0 to HW filter on device lan3
[   12.469392] br-lan: port 4(lan3) entered blocking state
[   12.474779] br-lan: port 4(lan3) entered disabled state
[   12.481018] device lan3 entered promiscuous mode
[   12.500040] mt7530 mdio-bus:00 wan: configuring for phy/gmii link mode
[   12.507065] 8021q: adding VLAN 0 to HW filter on device wan
[   16.474653] mt7530 mdio-bus:00 lan0: Link is Up - 1Gbps/Full - flow control rx/tx
[   16.482177] br-lan: port 1(lan0) entered blocking state
[   16.487434] br-lan: port 1(lan0) entered forwarding state
[   16.493694] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   16.634726] mt7530 mdio-bus:00 wan: Link is Up - 1Gbps/Full - flow control rx/tx
[   16.644441] IPv6: ADDRCONF(NETDEV_CHANGE): wan: link becomes ready
[   33.114233] vusb: disabling
[   33.117042] vmc: disabling
[   33.119749] vmch: disabling
[   33.122543] vgp1: disabling
[   33.125540] vcamaf: disabling
[   93.424765] mt7530 mdio-bus:00 lan0: Link is Down
[   93.429566] br-lan: port 1(lan0) entered disabled state
[   95.503636] mt7530 mdio-bus:00 lan0: Link is Up - 1Gbps/Full - flow control rx/tx
[   95.511157] br-lan: port 1(lan0) entered blocking state
[   95.516413] br-lan: port 1(lan0) entered forwarding state

# cat /proc/meminfo
MemTotal:        1028520 kB
MemFree:          943576 kB
MemAvailable:     931696 kB
Buffers:           20404 kB
Cached:            29064 kB
SwapCached:            0 kB
Active:            16068 kB
Inactive:          34716 kB
Active(anon):       9396 kB
Inactive(anon):       24 kB
Active(file):       6672 kB
Inactive(file):    34692 kB
Unevictable:           0 kB
Mlocked:               0 kB
HighTotal:        262144 kB
HighFree:         240604 kB
LowTotal:         766376 kB
LowFree:          702972 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          1316 kB
Mapped:             2888 kB
Shmem:              8104 kB
KReclaimable:       6520 kB
Slab:              19424 kB
SReclaimable:       6520 kB
SUnreclaim:        12904 kB
KernelStack:         656 kB
PageTables:          284 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:      514260 kB
Committed_AS:      14148 kB
VmallocTotal:     245760 kB
VmallocUsed:        4284 kB
VmallocChunk:          0 kB
Percpu:              432 kB

Problem exists on snapshot too.

I've temporarily worked around the issue by explicitly setting the RAM size on the Linux boot command line:

# fw_printenv bootargs
bootargs=earlycon=uart8250,mmio32,0x11004000=console=ttyS0,115200 root=/dev/mmcblk0p65 
# fw_setenv bootargs "earlycon=uart8250,mmio32,0x11004000=console=ttyS0,115200 root=/dev/mmcblk0p65 mem=512M"

This at least prevents the ramdisk from being able to exceed available memory. But I can't get it to work in release, only in snapshot (can't get uboot tools to work in release)

So I am still interested in any advice anyone has on diagnosing and fixing the problem.

EDIT: In case anyone else ever needs it, /etc/fw_env.config for the u7623 with release 21.02.1 is

/dev/mmcblk0p2 0x14800 0x1000 0x0800