From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Schinagl Date: Sat, 19 Oct 2013 01:11:00 +0200 Subject: [U-Boot] [RFC] ARM: U-boot and 2 GiB of ram with get_ram_size only being long In-Reply-To: <20131018202659.28E95380627@gemini.denx.de> References: <524DDE54.7090709@schinagl.nl> <52521F5B.4090002@schinagl.nl> <20131015091241.48901e5c@lilith> <1381859853.7979.696.camel@snotra.buserror.net> <20131017082748.06618979@lilith> <52607AF9.7050302@schinagl.nl> <1382114601.7979.843.camel@snotra.buserror.net> <20131018202659.28E95380627@gemini.denx.de> Message-ID: <5261C004.9010900@schinagl.nl> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 10/18/13 22:26, Wolfgang Denk wrote: > Dear Scott Wood, > > In message <1382114601.7979.843.camel@snotra.buserror.net> you wrote: >> >> Did you see my other mail in this thread? This patch is sort of OK for >> raising the get_ram_size() limit from 1 GiB to 2 GiB (with an increased >> risk of false positives from I/O), but it can't go beyond that on >> 32-bit. A better approach would be to get the RAM size from the memory >> controller, which is what we do on many Freescale PPC boards. > > This is NOT a better approach. Reading the memory controller just > tells you what is supposed to be there, i. e. what you programmed into > the controller. get_ram_size() shows you what is _actually_ there, > which may be a totally different thing, for example when different RAM > chips can be fit on the board, or when the working area of the RAM is > not the same as the actual chip size, for example due to hardware > errors (shorts or interruptions on the address lines, etc.). > > get_ram_size() is a very efficient memory test that detects 95% or > more of all RAM related hardware issues. But is my patch acceptable and does it fix the phys_size_t = long vs phys_size_t = unsigned long 'issue'. Does this patch fix that or make it worse? And if so, how would that needed to be fixed. Oliver > > Best regards, > > Wolfgang Denk >