Am 23.04.2017 um 11:27 schrieb H. Nikolaus Schaller hns@goldelico.com:
Hi Matthijs,
Am 23.04.2017 um 03:12 schrieb Matthijs van Duin matthijsvanduin@gmail.com:
If you use my u-boot (https://github.com/mvduin/u-boot) with CONFIG_DUAL_RANK_DDR3 set then it will configure ram to use both ranks, interleaved, hence both will get exercised then regardless of how much memory the kernel is configured to use, and regardless of whether it is an LPAE kernel or not.
The main patch for this is: https://github.com/mvduin/u-boot/commit/06e3cb0f3731763372ca437ac0775e040a7d...
This should suffice to test the memory itself.
Ok! Fine.
Making all 4GB available to the kernel right now still requires an LPAE kernel and telling it about the memory available via kernel parameters (I still need to check how to tell it via DT but classified that as non-urgent): mem=2032M@0x80000000 mem=2048M@0x200000000 or, if you're in an experimental mood: mem=2032M@0x80000000 mem=2064M@0x2FF000000 to get back the 16M stolen from the end of lowmem.
a simple solution could be to add it to CONFIG_CMDLINE for letux_lpae_defconfig. Basically U-Boot patches the memory {} entry in the FDT which is passed to the kernel. It already does that for different memory sizes (e.g. on OMAP3).
So if U-Boot detects and knows the correct memory dimensions it should already pass it to the kernel. But that may be broken. This is something I can look into.
Another (small) issue is that U-Boot seems not to detect the memory size automatically. At least with your patch above I get memory failed messages on 2GB boards while a 4GB board works and shows 2GB.
In the worst case we need two different U-Boot builds (e.g. a 2G and a 4GB config).
Any issues that arise as the result of this are presumably purely kernel issues.
No issues seen so far (well, testing 5 minutes is not enough):
Debian GNU/Linux 8 letux console
letux login: root Password: Last login: Sat Jan 1 00:23:28 UTC 2000 on console Linux letux 4.11.0-rc7-letux-lpae+ #1007 SMP PREEMPT Sun Apr 23 10:02:20 CEST 2017 armv7l
The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. root@letux:~# cat /proc/meminfo MemTotal: 4111824 kB MemFree: 3782000 kB MemAvailable: 3989228 kB Buffers: 12444 kB Cached: 255280 kB SwapCached: 0 kB Active: 152096 kB Inactive: 140064 kB Active(anon): 24604 kB Inactive(anon): 30732 kB Active(file): 127492 kB Inactive(file): 109332 kB Unevictable: 0 kB Mlocked: 0 kB HighTotal: 3388416 kB HighFree: 3134768 kB LowTotal: 723408 kB LowFree: 647232 kB SwapTotal: 0 kB SwapFree: 0 kB Dirty: 220 kB Writeback: 0 kB AnonPages: 24432 kB Mapped: 24708 kB Shmem: 30904 kB Slab: 22996 kB SReclaimable: 11932 kB SUnreclaim: 11064 kB KernelStack: 1624 kB PageTables: 784 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 2055912 kB Committed_AS: 180568 kB VmallocTotal: 245760 kB VmallocUsed: 0 kB VmallocChunk: 0 kB CmaTotal: 16384 kB CmaFree: 13696 kB root@letux:~#
BR and thanks!!!
Nikolaus