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.
Matthijs
BR and thanks, Nikolaus