Adding support for ELECOM WRC-X3000GS2 (IPQ5018, 256M RAM)

Hello, I'm working to add support for ELECOM WRC-X3000GS2.

Specification

  • Qcom Profile: MP03.3
  • Qcom machid: 8040002
  • SoC: IPQ5018
  • RAM: DDR3 256MiB
  • Flash: SPI-NAND 128MiB (Macronix MX35UF1G24AD-Z4I)
  • Ethernet:
    • WAN: eth0 ---> Internal GbE PHY
    • LAN: eth1 ---> QCA8337 (4 ports)
  • WLAN:
    • 2.4GHz: IPQ5018
    • 5GHz: IPQ5018 + QCN6102

Repository

Information of stock fw

Problems

  • Reading as block device of spi-nand is broken

    When I trying to read from /dev/mtdblock* in spi-nand, the following errors are showed:

    root@OpenWrt:~# strings /dev/mtdblock10
    [26427.133154] mtdblock: MTD device '0:appsblenv' is NAND, please consider using UBI block devices instead.
    [26427.134125] I/O error, dev mtdblock10, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 2
    [26427.142240] I/O error, dev mtdblock10, sector 8 op 0x0:(READ) flags 0x80700 phys_seg 3 prio class 2
    [26427.151427] I/O error, dev mtdblock10, sector 16 op 0x0:(READ) flags 0x80700 phys_seg 2 prio class 2
    [26427.160440] I/O error, dev mtdblock10, sector 24 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
    [26427.169619] I/O error, dev mtdblock10, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
    [26427.178083] Buffer I/O error on dev mtdblock10, logical block 0, async page read
    

    This (MX35UF1G24AD) flash is handled with oob size=64 on the stock firmware, but it's registered with oob=128 in the Linux Kernel.
    (The official datasheet: Number of Spare Bytes per Page: 128-byte)

  • pd-* initialization failed

    Initialization of pd-1 and pd-2 failed due to the following errors:

    [   12.623005] ath11k c000000.wifi: ipq5018 hw1.0
    [   12.623051] ath11k c000000.wifi: FW memory mode: 2
    [   12.751176] remoteproc remoteproc1: powering up pd-1
    [   12.751369] remoteproc remoteproc1: Booting fw image ath11k/IPQ5018/hw1.0/q6_fw.mdt, size 1820
    [   12.755226] remoteproc remoteproc0: powering up cd00000.remoteproc
    [   12.763715] remoteproc remoteproc0: Booting fw image ath11k/IPQ5018/hw1.0/q6_fw.mdt, size 1820
    [   12.894405] remoteproc remoteproc0: remote processor cd00000.remoteproc is now up
    [   12.894508] ------------[ cut here ]------------
    [   12.901036] Failed to get suitable pool for pd-1
    [   12.905589] WARNING: CPU: 0 PID: 937 at kernel/dma/pool.c:279 dma_alloc_from_pool+0x108/0x1a0
    [   12.910177] Modules linked in: ath11k_ahb(O+) ath11k(O) pppox ppp_generic nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject nft_redir nft_quota nft_numgen nft_nat nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_fib_ipv6 nft_fib_ipv4 nft_fib nft_ct nft_chain_nat nf_tables nf_nat nf_flow_table nf_conntrack mac80211(O) cfg80211(O) slhc qrtr_smd qrtr qmi_helpers(O) nfnetlink nf_reject_ipv6 nf_reject_ipv4 nf_log_syslog nf_defrag_ipv6 nf_defrag_ipv4 mdio_netlink(O) libcrc32c hwmon crc_ccitt compat(O) sha512_generic sha512_arm64 seqiv sha3_generic jitterentropy_rng drbg michael_mic hmac geniv cmac leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_qcom qca_nss_dp(O) qca_ssdk(O) gpio_button_hotplug(O) ext4 mbcache jbd2 crc32c_generic
    [   12.962164] CPU: 0 PID: 937 Comm: kmodloader Tainted: G           O       6.6.74 #0
    [   12.984392] Hardware name: ELECOM WRC-X3000GS2 (DT)
    [   12.991942] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [   12.996804] pc : dma_alloc_from_pool+0x108/0x1a0
    [   13.003747] lr : dma_alloc_from_pool+0x108/0x1a0
    [   13.008608] sp : ffffffc0820ab540
    [   13.013207] x29: ffffffc0820ab540 x28: ffffffc0820ab5f8 x27: ffffffc080a36000
    [   13.016422] x26: ffffffc0800a6030 x25: ffffffc0814cc000 x24: fffffffe00000000
    [   13.023540] x23: ffffffc080a365b8 x22: 0000000000042000 x21: 0000000000041784
    [   13.030659] x20: 0000000000000000 x19: ffffff8000163e80 x18: 00000000000000ec
    [   13.037777] x17: 6e20736920636f72 x16: 7065746f6d65722e x15: ffffffc0813dbdf0
    [   13.044895] x14: 00000000000002c4 x13: 00000000000000ec x12: 00000000ffffffea
    [   13.052013] x11: 00000000ffffefff x10: ffffffc081433df0 x9 : ffffffc0813dbd98
    [   13.059130] x8 : 0000000000017fe8 x7 : c0000000ffffefff x6 : 0000000000057fa8
    [   13.066249] x5 : 0000000000000fff x4 : 0000000000000000 x3 : ffffffc0820ab340
    [   13.073366] x2 : ffffffc0813dbd30 x1 : ffffffc0813dbd30 x0 : 0000000000000024
    [   13.080487] Call trace:
    [   13.087599]  dma_alloc_from_pool+0x108/0x1a0
    [   13.089857]  dma_direct_alloc+0x168/0x2fc
    [   13.094371]  dma_alloc_attrs+0x84/0xc4
    [   13.098276]  __qcom_mdt_load.isra.0+0x2dc/0x48c
    [   13.101923]  qcom_mdt_load_pd_seg+0x34/0x44
    [   13.106350]  wcss_pd_load+0x64/0x7c
    [   13.110515]  rproc_start+0x30/0x1b8
    [   13.113988]  rproc_boot+0x184/0x500
    [   13.117460]  0xffffffc0799fa10c
    [   13.120932]  ath11k_core_init+0x50/0xfc [ath11k]
    [   13.124059]  0xffffffc0799faa34
    [   13.128917]  platform_probe+0x68/0xc4
    [   13.131783]  really_probe+0x148/0x2b0
    [   13.135602]  __driver_probe_device+0x78/0x128
    [   13.139250]  driver_probe_device+0x40/0xdc
    [   13.143590]  __driver_attach+0x90/0x160
    [   13.147582]  bus_for_each_dev+0x64/0xa4
    [   13.151314]  driver_attach+0x24/0x30
    [   13.155134]  bus_add_driver+0xe4/0x208
    [   13.158953]  driver_register+0x5c/0x124
    [   13.162512]  __platform_driver_register+0x28/0x34
    [   13.166246]  init_module+0x24/0x1000 [ath11k_ahb]
    [   13.171108]  do_one_initcall+0x6c/0x1fc
    [   13.175794]  do_init_module+0x58/0x1d8
    [   13.179440]  load_module+0x18ac/0x1940
    [   13.183258]  __do_sys_init_module+0x218/0x264
    [   13.186993]  __arm64_sys_init_module+0x1c/0x28
    [   13.191419]  invoke_syscall.constprop.0+0x5c/0x108
    [   13.195760]  do_el0_svc+0x40/0xc8
    [   13.200532]  el0_svc+0x28/0x9c
    [   13.203918]  el0t_64_sync_handler+0x120/0x12c
    [   13.206870]  el0t_64_sync+0x178/0x17c
    [   13.211299] ---[ end trace 0000000000000000 ]---
    [   13.215068] qcom-q6-mpd pd-1: Error in dma alloc ptr: 268164
    [   13.219640] remoteproc remoteproc1: Failed to load program segments: -12
    [   13.226020] ath11k c000000.wifi: failed to boot the remote processor Q6
    [   13.232035] ath11k c000000.wifi: failed to power up :-12
    [   13.270813] ath11k c000000.wifi: failed to create soc core: -12
    [   13.270866] ath11k c000000.wifi: failed to init core: -12
    [   13.275854] ath11k: probe of c000000.wifi failed with error -12
    [   13.281308] ath11k b00a040.wifi1: Multipd architecture - userpd: 2
    [   13.287369] ath11k b00a040.wifi1: qcn6122 hw1.0
    [   13.293147] ath11k b00a040.wifi1: FW memory mode: 2
    [   13.349639] remoteproc remoteproc2: powering up pd-2
    [   13.349952] remoteproc remoteproc2: Booting fw image ath11k/IPQ5018/hw1.0/q6_fw.mdt, size 1820
    [   13.353831] ------------[ cut here ]------------
    [   13.362165] Failed to get suitable pool for pd-2
    [   13.366905] WARNING: CPU: 0 PID: 937 at kernel/dma/pool.c:279 dma_alloc_from_pool+0x108/0x1a0
    [   13.371492] Modules linked in: ath11k_ahb(O+) ath11k(O) pppox ppp_generic nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject nft_redir nft_quota nft_numgen nft_nat nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_fib_ipv6 nft_fib_ipv4 nft_fib nft_ct nft_chain_nat nf_tables nf_nat nf_flow_table nf_conntrack mac80211(O) cfg80211(O) slhc qrtr_smd qrtr qmi_helpers(O) nfnetlink nf_reject_ipv6 nf_reject_ipv4 nf_log_syslog nf_defrag_ipv6 nf_defrag_ipv4 mdio_netlink(O) libcrc32c hwmon crc_ccitt compat(O) sha512_generic sha512_arm64 seqiv sha3_generic jitterentropy_rng drbg michael_mic hmac geniv cmac leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_qcom qca_nss_dp(O) qca_ssdk(O) gpio_button_hotplug(O) ext4 mbcache jbd2 crc32c_generic
    [   13.423478] CPU: 0 PID: 937 Comm: kmodloader Tainted: G        W  O       6.6.74 #0
    [   13.445706] Hardware name: ELECOM WRC-X3000GS2 (DT)
    [   13.453255] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [   13.458117] pc : dma_alloc_from_pool+0x108/0x1a0
    [   13.465059] lr : dma_alloc_from_pool+0x108/0x1a0
    [   13.469921] sp : ffffffc0820ab540
    [   13.474520] x29: ffffffc0820ab540 x28: ffffffc0820ab5f8 x27: ffffffc080a36000
    [   13.477735] x26: ffffffc0800a6030 x25: ffffffc0814cc000 x24: fffffffe00000000
    [   13.484854] x23: ffffffc080a365b8 x22: 000000000005c000 x21: 000000000005b3c4
    [   13.491972] x20: 0000000000000000 x19: ffffff8000163e80 x18: 000000000000012e
    [   13.499090] x17: 36712f302e317768 x16: 2f38313035515049 x15: ffffffc0813dbdf0
    [   13.506208] x14: 000000000000038a x13: 000000000000012e x12: 00000000ffffffea
    [   13.513326] x11: 00000000ffffefff x10: ffffffc081433df0 x9 : ffffffc0813dbd98
    [   13.520444] x8 : 0000000000017fe8 x7 : c0000000ffffefff x6 : 0000000000057fa8
    [   13.527562] x5 : 0000000000000fff x4 : 0000000000000000 x3 : ffffffc0820ab340
    [   13.534680] x2 : ffffffc0813dbd30 x1 : ffffffc0813dbd30 x0 : 0000000000000024
    [   13.541799] Call trace:
    [   13.548911]  dma_alloc_from_pool+0x108/0x1a0
    [   13.551170]  dma_direct_alloc+0x168/0x2fc
    [   13.555684]  dma_alloc_attrs+0x84/0xc4
    [   13.559589]  __qcom_mdt_load.isra.0+0x2dc/0x48c
    [   13.563237]  qcom_mdt_load_pd_seg+0x34/0x44
    [   13.567664]  wcss_pd_load+0x64/0x7c
    [   13.571829]  rproc_start+0x30/0x1b8
    [   13.575301]  rproc_boot+0x184/0x500
    [   13.578773]  0xffffffc0799fa10c
    [   13.582245]  ath11k_core_init+0x50/0xfc [ath11k]
    [   13.585373]  0xffffffc0799faa34
    [   13.590232]  platform_probe+0x68/0xc4
    [   13.593096]  really_probe+0x148/0x2b0
    [   13.596916]  __driver_probe_device+0x78/0x128
    [   13.600562]  driver_probe_device+0x40/0xdc
    [   13.604903]  __driver_attach+0x90/0x160
    [   13.608895]  bus_for_each_dev+0x64/0xa4
    [   13.612628]  driver_attach+0x24/0x30
    [   13.616447]  bus_add_driver+0xe4/0x208
    [   13.620267]  driver_register+0x5c/0x124
    [   13.623826]  __platform_driver_register+0x28/0x34
    [   13.627560]  init_module+0x24/0x1000 [ath11k_ahb]
    [   13.632421]  do_one_initcall+0x6c/0x1fc
    [   13.637108]  do_init_module+0x58/0x1d8
    [   13.640752]  load_module+0x18ac/0x1940
    [   13.644571]  __do_sys_init_module+0x218/0x264
    [   13.648305]  __arm64_sys_init_module+0x1c/0x28
    [   13.652732]  invoke_syscall.constprop.0+0x5c/0x108
    [   13.657073]  do_el0_svc+0x40/0xc8
    [   13.661847]  el0_svc+0x28/0x9c
    [   13.665231]  el0t_64_sync_handler+0x120/0x12c
    [   13.668185]  el0t_64_sync+0x178/0x17c
    [   13.672613] ---[ end trace 0000000000000000 ]---
    [   13.676334] qcom-q6-mpd pd-2: Error in dma alloc ptr: 373700
    [   13.680976] remoteproc remoteproc2: Failed to load program segments: -12
    [   13.686630] ath11k b00a040.wifi1: failed to boot the remote processor Q6
    [   13.693311] ath11k b00a040.wifi1: failed to power up :-12
    [   13.730756] ath11k b00a040.wifi1: failed to create soc core: -12
    [   13.730805] ath11k b00a040.wifi1: failed to init core: -12
    [   13.736163] ath11k: probe of b00a040.wifi1 failed with error -12
    

Please help

  • What is the exact oob size of MX35UF1G24AD?
  • How should I resolve the above pd-* problem? Or devices with 256MiB RAM are not supported?
1 Like

I succeeded to resolve this issue by adding coherent_pool=2M to bootargs.

I also faced to the crashing issue of QCN6102, but it was resolved by editing BDF (addr: 0x45c, val: 0x3 ---> 0x0).

ref:

Finally, I succeeded to make the wlan adapters working. But ath11k consumes too large memory spaces and too few spaces are usable for users. As a result, OOM killer kills some system processes when accessed to LuCI.
So I disabled Wi-Fi related peripherals and reserved memory for it...

General message when people ask is 512MB to be the bare minimum for IPQ wifi.

1 Like

I am just finishing the glinet b3000 port and i noticed they build images for the 256 profile devices. I see a couple things here that may provide you with some hints. Have a look and if its at all helpful I'll send you the full package to assist you.

first not sure if you have the memory layout. I've posted the 512/1000 but never posted the 256mb, tho you may already have it, here it is

/ {
	#ifdef __IPQ_MEM_PROFILE_256_MB__
	MP_256;
	#elif __IPQ_MEM_PROFILE_512_MB__
	MP_512;
	#else
	#endif

	memory {
		device_type = "memory";
		reg = <0x0 0x40000000 0x0 0x20000000>;
	};

	/*            256 MB Profile
	 * +=========+==============+========================+
	 * |        |              |                         |
	 * | Region | Start Offset |          Size           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |        |              |                         |
	 * |  NSS   |  0x40000000  |          8MB           |
	 * |        |              |                         |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * | Linux  |  0x40800000  | Depends on total memory |
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * +        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * | uboot  |  0x4A800000  |           2MB           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |  SBL   |  0x4AA00000  |           1MB           |
	 * +--------+--------------+-------------------------+
	 * |  smem  |  0x4AB00000  |           1MB           |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |   TZ   |  0x4AC00000  |           4MB           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
+	 * |   Q6   |  0x4B000000  | Refer target specific   |
+	 * | regions|              |  dts files              |
	 * +--------+--------------+-------------------------+
	 * |                                                 |
	 * |      Rest of the memory for Linux               |
	 * |                                                 |
	 * +=================================================+
	 */
	#ifdef __IPQ_MEM_PROFILE_256_MB__
	reserved-memory {
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		nss@40000000 {
			no-map;
			reg = <0x0 0x40000000 0x0 0x0800000>;
		};

		tzapp:tzapp@4a400000 {	/* TZAPPS */
			no-map;
		};

		uboot@4a800000 {
			no-map;
			reg = <0x0 0x4a800000 0x0 0x00200000>;
		};

		sbl@4aa00000 {
			no-map;
			reg = <0x0 0x4aa00000 0x0 0x00100000>;
		};

		smem_region:smem@4ab00000 {
			no-map;
			reg = <0x0 0x4ab00000 0x0 0x00100000>;
		};

		tz@4ac00000 {	/* TZ */
			no-map;
			reg = <0x0 0x4ac00000 0x0 0x00400000>;
		};

		bt_region: bt@7000000 {
			no-map;
			reg = <0x0 0x07000000 0x0 0x58000>;
		};
	};
	/*                      512 MB Profile
	 * +=========+==============+========================+
	 * |        |              |                         |
	 * | Region | Start Offset |          Size           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |        |              |                         |
	 * |  NSS   |  0x40000000  |          16MB           |
	 * |        |              |                         |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * | Linux  |  0x41000000  | Depends on total memory |
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * | uboot  |  0x4A800000  |           2MB           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |  SBL   |  0x4AA00000  |           1MB           |
	 * +--------+--------------+-------------------------+
	 * |  smem  |  0x4AB00000  |           1MB           |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |   TZ   |  0x4AC00000  |           4MB           |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |        |              |                         |
	 * |        |              |                         |
	 * |        |              |                         |
	 * |   Q6   |  0x4B000000  | Refer target specific   |
	 * | regions|              |  dts files              |
	 * |        |              |                         |
	 * +--------+--------------+-------------------------+
	 * |                                                 |
	 * |      Rest of the memory for Linux               |
	 * |                                                 |
	 * +=================================================+
	 */
	#else
	reserved-memory {
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		nss@40000000 {
			no-map;
			reg = <0x0 0x40000000 0x0 0x01000000>;
		};

		tzapp:tzapp@4a400000 {	/* TZAPPS */
			no-map;
		};

		uboot@4a800000 {
			no-map;
			reg = <0x0 0x4a800000 0x0 0x00200000>;
		};

		sbl@4aa00000 {
			no-map;
			reg = <0x0 0x4aa00000 0x0 0x00100000>;
		};

		smem_region:smem@4ab00000 {
			no-map;
			reg = <0x0 0x4ab00000 0x0 0x00100000>;
		};

		tz@4ac00000 {	/* TZ */
			no-map;
			reg = <0x0 0x4ac00000 0x0 0x00400000>;
		};

		bt_region: bt@7000000 {
			no-map;
			reg = <0x0 0x07000000 0x0 0x58000>;
		};
	};
	#endif
};

And there some stuff in the makefiles for the 256 as well. for ex

ifeq ($(CONFIG_LOWMEM_FLASH),)
define Image/Build/squashfs
	$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
	$$(if $$(CONFIG_DEBUG), ,$$(call sizecheck, $(IPQ50XX_ROOTFS_SIZE), $(KDIR)/root.squashfs))
endef
endif

hopefully it may help you in some way.

Goodluck

We could try play around with q6 memory allocation, do you have your code on github/gitlab somewhere? Perhaps there are other issues I can help spot

1 Like

Hm, I checked the current reserved-memory of WRC-X3000GS2 on OpenWrt, but it's probably already minimal:

        reserved-memory {
                #address-cells = <0x02>;
                #size-cells = <0x02>;
                ranges;

                tz_apps@4a400000 {
                        reg = <0x00 0x4a400000 0x00 0x400000>;
                        no-map;
                };

                bootloader@4a800000 {
                        reg = <0x00 0x4a800000 0x00 0x200000>;
                        no-map;
                };

                sbl@4aa00000 {
                        reg = <0x00 0x4aa00000 0x00 0x100000>;
                        no-map;
                };

                smem@4ab00000 {
                        compatible = "qcom,smem";
                        reg = <0x00 0x4ab00000 0x00 0x100000>;
                        no-map;
                        hwlocks = <0x06 0x03>;
                };

                tz@4ac00000 {
                        reg = <0x00 0x4ac00000 0x00 0x200000>;
                        no-map;
                };

                q6_mem_regions@4b000000 {
                        no-map;
                        reg = <0x00 0x4b000000 0x00 0x3000000>;
                        status = "disabled";
                        phandle = <0x2f>;
                };
        };

Well... Is it for flash storage and CONFIG_LOWMEM_FLASH != y?

Here.

But IMO, ath11k occupies a large amount of RAM in addition to q6_mem_regions, so it may be hard to enable Wi-Fi on this device unless we add something like ath10k-(ct-)smallbuffers to reduce consumption.

Wi-Fi (and q6_mem_regions) enabled:

Wi-Fi (and q6_mem_regions) disabled:

For 256M device, you need this patch: https://github.com/hzyitc/openwrt-redmi-ax3000/blob/ipq50xx-pr/package/kernel/mac80211/patches/ath11k/911-ath11k-reduce-dma-buffer-to-save-memeory.patch

2 Likes

Wow, thanks. I'll try it... :wink:

I tested with the patch @hzyitc provided and initramfs image:

/proc/meminfo, /proc/iomem (Wi-Fi disabled)
root@OpenWrt:~# cat /proc/meminfo
MemTotal:         235076 kB
MemFree:          153784 kB
MemAvailable:     131788 kB
Buffers:               0 kB
Cached:            33332 kB
SwapCached:            0 kB
Active:            36816 kB
Inactive:              0 kB
Active(anon):      36816 kB
Inactive(anon):        0 kB
Active(file):          0 kB
Inactive(file):        0 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          3484 kB
Mapped:             5432 kB
Shmem:             33332 kB
KReclaimable:       5160 kB
Slab:              15904 kB
SReclaimable:       5160 kB
SUnreclaim:        10744 kB
KernelStack:        1116 kB
PageTables:          680 kB
SecPageTables:         0 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:      117536 kB
Committed_AS:      44952 kB
VmallocTotal:   257687552 kB
VmallocUsed:        7136 kB
VmallocChunk:          0 kB
Percpu:              240 kB

root@OpenWrt:~# cat /proc/iomem
00088000-00088063 : 88000.mdio mdio@88000
00090000-00090063 : 90000.mdio mdio@90000
0009b000-0009b7ff : 9b000.clock-controller cmn
000a0000-000a0fff : a0000.qfprom qfprom@a0000
000e3000-000e3fff : e3000.rng rng@e3000
004a8000-004a8fff : 4a9000.thermal-sensor thermal-sensor@4a9000
004a9000-004a9fff : 4a9000.thermal-sensor thermal-sensor@4a9000
00704000-00723fff : 704000.dma-controller dma-controller@704000
0073a000-0073ffff : 73a000.crypto crypto@73a000
01000000-012fffff : 1000000.pinctrl pinctrl@1000000
01800000-0187ffff : 1800000.clock-controller clock-controller@1800000
01905000-01924fff : 1905000.hwlock hwlock@1905000
019475c4-019475c7 : 9b000.clock-controller tcsr
07884000-078a0fff : 7884000.dma-controller dma-controller@7884000
078af000-078af1ff : msm_serial
07984000-0799ffff : 7984000.dma dma@7984000
079b0000-079bffff : 79b0000.qpic-nand qpic-nand@79b0000
0b017000-0b01703f : b017000.watchdog watchdog@b017000
0b111000-0b111fff : b111000.mailbox mailbox@b111000
0b116000-0b11603f : b116000.clock clock@b116000
0b121000-0b121fff : arch_mem_timer
39c00000-39c0ffff : wan
39d00000-39d0ffff : eth0
40000000-4a3fffff : System RAM
  41010000-41a8ffff : Kernel code
  41a90000-4241ffff : reserved
  42420000-4254ffff : Kernel data
  4a3f6000-4a3fcfff : reserved
4a400000-4a9fffff : reserved
4aa00000-4aafffff : System RAM
4ab00000-4adfffff : reserved
4ae00000-4fffffff : System RAM
  4fa00000-4fdfffff : reserved
  4fe46000-4fec5fff : reserved
  4fec6000-4ff26fff : reserved
  4ff27000-4ff4cfff : reserved
  4ff4d000-4ff4dfff : reserved
  4ff4e000-4ff4ffff : reserved
  4ff50000-4ff60fff : reserved
  4ff61000-4ff7efff : reserved
  4ff7f000-4fffffff : reserved
/proc/meminfo, /proc/iomem (Wi-Fi enabled)
root@OpenWrt:~# cat /proc/meminfo
MemTotal:         186020 kB
MemFree:           73612 kB
MemAvailable:      51716 kB
Buffers:               0 kB
Cached:            33568 kB
SwapCached:            0 kB
Active:            36992 kB
Inactive:              0 kB
Active(anon):      36992 kB
Inactive(anon):        0 kB
Active(file):          0 kB
Inactive(file):        0 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          3424 kB
Mapped:             5404 kB
Shmem:             33568 kB
KReclaimable:       5356 kB
Slab:              21436 kB
SReclaimable:       5356 kB
SUnreclaim:        16080 kB
KernelStack:        1372 kB
PageTables:          664 kB
SecPageTables:         0 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:       93008 kB
Committed_AS:      45024 kB
VmallocTotal:   257687552 kB
VmallocUsed:        7412 kB
VmallocChunk:          0 kB
Percpu:              240 kB

root@OpenWrt:~# cat /proc/iomem
00088000-00088063 : 88000.mdio mdio@88000
00090000-00090063 : 90000.mdio mdio@90000
0009b000-0009b7ff : 9b000.clock-controller cmn
000a0000-000a0fff : a0000.qfprom qfprom@a0000
000e3000-000e3fff : e3000.rng rng@e3000
004a8000-004a8fff : 4a9000.thermal-sensor thermal-sensor@4a9000
004a9000-004a9fff : 4a9000.thermal-sensor thermal-sensor@4a9000
00704000-00723fff : 704000.dma-controller dma-controller@704000
0073a000-0073ffff : 73a000.crypto crypto@73a000
01000000-012fffff : 1000000.pinctrl pinctrl@1000000
01800000-0187ffff : 1800000.clock-controller clock-controller@1800000
01905000-01924fff : 1905000.hwlock hwlock@1905000
019475c4-019475c7 : 9b000.clock-controller tcsr
07884000-078a0fff : 7884000.dma-controller dma-controller@7884000
078af000-078af1ff : msm_serial
07984000-0799ffff : 7984000.dma dma@7984000
079b0000-079bffff : 79b0000.qpic-nand qpic-nand@79b0000
0b017000-0b01703f : b017000.watchdog watchdog@b017000
0b111000-0b111fff : b111000.mailbox mailbox@b111000
0b116000-0b11603f : b116000.clock clock@b116000
0b121000-0b121fff : arch_mem_timer
0c000000-0cffffff : c000000.wifi wifi@c000000
39c00000-39c0ffff : wan
39d00000-39d0ffff : eth0
40000000-4a3fffff : System RAM
  41010000-41a8ffff : Kernel code
  41a90000-4241ffff : reserved
  42420000-4254ffff : Kernel data
  4a3f6000-4a3fcfff : reserved
4a400000-4a9fffff : reserved
4aa00000-4aafffff : System RAM
4ab00000-4adfffff : reserved
4ae00000-4affffff : System RAM
4b000000-4dffffff : reserved
4e000000-4fffffff : System RAM
  4fa00000-4fdfffff : reserved
  4fe5e000-4feddfff : reserved
  4fede000-4ff3efff : reserved
  4ff3f000-4ff64fff : reserved
  4ff65000-4ff65fff : reserved
  4ff66000-4ff67fff : reserved
  4ff68000-4ff78fff : reserved
  4ff79000-4ff96fff : reserved
  4ff97000-4fffffff : reserved

Next problem:

  • instabillity of ethernet

    latency of ping sent to/from on-link devices often spikes (WAN/LAN)

    log
    root@OpenWrt:~# ping 192.168.1.4
    PING 192.168.1.4 (192.168.1.4): 56 data bytes
    64 bytes from 192.168.1.4: seq=0 ttl=128 time=0.829 ms
    64 bytes from 192.168.1.4: seq=1 ttl=128 time=0.785 ms
    64 bytes from 192.168.1.4: seq=2 ttl=128 time=255.599 ms
    64 bytes from 192.168.1.4: seq=3 ttl=128 time=0.757 ms
    64 bytes from 192.168.1.4: seq=4 ttl=128 time=0.843 ms
    64 bytes from 192.168.1.4: seq=5 ttl=128 time=319.881 ms
    64 bytes from 192.168.1.4: seq=6 ttl=128 time=0.847 ms
    64 bytes from 192.168.1.4: seq=7 ttl=128 time=0.793 ms
    64 bytes from 192.168.1.4: seq=8 ttl=128 time=0.858 ms
    64 bytes from 192.168.1.4: seq=9 ttl=128 time=0.804 ms
    64 bytes from 192.168.1.4: seq=10 ttl=128 time=377.160 ms
    64 bytes from 192.168.1.4: seq=11 ttl=128 time=0.770 ms
    64 bytes from 192.168.1.4: seq=12 ttl=128 time=0.791 ms
    64 bytes from 192.168.1.4: seq=13 ttl=128 time=462.614 ms
    64 bytes from 192.168.1.4: seq=14 ttl=128 time=477.179 ms
    64 bytes from 192.168.1.4: seq=15 ttl=128 time=0.935 ms
    64 bytes from 192.168.1.4: seq=16 ttl=128 time=512.785 ms
    64 bytes from 192.168.1.4: seq=17 ttl=128 time=529.616 ms
    64 bytes from 192.168.1.4: seq=18 ttl=128 time=537.666 ms
    64 bytes from 192.168.1.4: seq=19 ttl=128 time=548.486 ms
    64 bytes from 192.168.1.4: seq=20 ttl=128 time=0.868 ms
    64 bytes from 192.168.1.4: seq=21 ttl=128 time=0.786 ms
    64 bytes from 192.168.1.4: seq=22 ttl=128 time=0.785 ms
    64 bytes from 192.168.1.4: seq=23 ttl=128 time=0.744 ms
    64 bytes from 192.168.1.4: seq=24 ttl=128 time=122.305 ms
    64 bytes from 192.168.1.4: seq=25 ttl=128 time=0.817 ms
    64 bytes from 192.168.1.4: seq=26 ttl=128 time=0.804 ms
    64 bytes from 192.168.1.4: seq=27 ttl=128 time=0.798 ms
    64 bytes from 192.168.1.4: seq=28 ttl=128 time=0.778 ms
    64 bytes from 192.168.1.4: seq=29 ttl=128 time=0.763 ms
    64 bytes from 192.168.1.4: seq=30 ttl=128 time=2.089 ms
    64 bytes from 192.168.1.4: seq=31 ttl=128 time=0.892 ms
    64 bytes from 192.168.1.4: seq=32 ttl=128 time=1001.156 ms
    64 bytes from 192.168.1.4: seq=33 ttl=128 time=1.034 ms
    64 bytes from 192.168.1.4: seq=34 ttl=128 time=0.841 ms
    64 bytes from 192.168.1.4: seq=35 ttl=128 time=0.975 ms
    64 bytes from 192.168.1.4: seq=36 ttl=128 time=50.597 ms
    64 bytes from 192.168.1.4: seq=37 ttl=128 time=0.874 ms
    64 bytes from 192.168.1.4: seq=38 ttl=128 time=0.799 ms
    64 bytes from 192.168.1.4: seq=39 ttl=128 time=1001.153 ms
    64 bytes from 192.168.1.4: seq=40 ttl=128 time=1.044 ms
    64 bytes from 192.168.1.4: seq=41 ttl=128 time=1001.076 ms
    64 bytes from 192.168.1.4: seq=42 ttl=128 time=0.964 ms
    64 bytes from 192.168.1.4: seq=43 ttl=128 time=0.823 ms
    64 bytes from 192.168.1.4: seq=44 ttl=128 time=0.934 ms
    64 bytes from 192.168.1.4: seq=45 ttl=128 time=0.931 ms
    64 bytes from 192.168.1.4: seq=46 ttl=128 time=1001.229 ms
    64 bytes from 192.168.1.4: seq=47 ttl=128 time=1.111 ms
    64 bytes from 192.168.1.4: seq=48 ttl=128 time=0.826 ms
    64 bytes from 192.168.1.4: seq=49 ttl=128 time=0.899 ms
    64 bytes from 192.168.1.4: seq=50 ttl=128 time=0.892 ms
    64 bytes from 192.168.1.4: seq=51 ttl=128 time=0.874 ms
    64 bytes from 192.168.1.4: seq=52 ttl=128 time=1001.138 ms
    64 bytes from 192.168.1.4: seq=53 ttl=128 time=1.023 ms
    64 bytes from 192.168.1.4: seq=54 ttl=128 time=0.813 ms
    64 bytes from 192.168.1.4: seq=55 ttl=128 time=0.935 ms
    64 bytes from 192.168.1.4: seq=56 ttl=128 time=0.928 ms
    64 bytes from 192.168.1.4: seq=57 ttl=128 time=0.993 ms
    64 bytes from 192.168.1.4: seq=58 ttl=128 time=1001.127 ms
    64 bytes from 192.168.1.4: seq=59 ttl=128 time=1.034 ms
    64 bytes from 192.168.1.4: seq=60 ttl=128 time=0.806 ms
    64 bytes from 192.168.1.4: seq=61 ttl=128 time=0.910 ms
    64 bytes from 192.168.1.4: seq=62 ttl=128 time=43.803 ms
    64 bytes from 192.168.1.4: seq=63 ttl=128 time=1001.199 ms
    64 bytes from 192.168.1.4: seq=64 ttl=128 time=1.068 ms
    64 bytes from 192.168.1.4: seq=65 ttl=128 time=0.788 ms
    64 bytes from 192.168.1.4: seq=66 ttl=128 time=1001.211 ms
    64 bytes from 192.168.1.4: seq=67 ttl=128 time=1.093 ms
    64 bytes from 192.168.1.4: seq=68 ttl=128 time=1001.104 ms
    64 bytes from 192.168.1.4: seq=69 ttl=128 time=0.979 ms
    64 bytes from 192.168.1.4: seq=70 ttl=128 time=1001.087 ms
    64 bytes from 192.168.1.4: seq=71 ttl=128 time=0.977 ms