From: Scott Wood Date: Thu, 27 May 2010 14:03:40 -0500 Subject: [U-Boot] [PATCH] powerpc: add support for the Freescale P1022DS reference board In-Reply-To: <4BFEB922.9040106@freescale.com> References: <1274392909-16422-1-git-send-email-timur@freescale.com> <20100520223324.50594CCF026@gemini.denx.de> <4BFC1736.5030902@freescale.com> <20100526201014.97886EAC238@gemini.denx.de> <4BFD837D.2040508@freescale.com> <20100527070235.E8812EAC238@gemini.denx.de> <4BFE823A.1080409@freescale.com> <20100527181118.3C9F7EAC238@gemini.denx.de> <4BFEB922.9040106@freescale.com> Message-ID: <20100527190340.GA5915@schlenkerla.am.freescale.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, May 27, 2010 at 01:25:38PM -0500, Timur Tabi wrote: > Wolfgang Denk wrote: > > > Do you think this is an unreasonable request? A quick fix takes me > > less than it takes to write this email (see following patch). > > Fixing get_ram_size() is not a quick fix. We would need to implement a > temporary TLB mechanism for accessing memory above 2GB, and a machine check > handler for handling memory access to non-existent RAM. Passing the actual, known size of RAM (why guess when we know?) as "maxsize" should eliminate the machine check problem[1] -- you'd just be using it as a not particularly exhaustive memory tester. I don't see why it should be mandatory. It also doesn't handle non-power-of-two sized memory -- don't rely on the value it returns. -Scott [1] It's worse than machine checks, what if some I/O device is mapped directly after RAM? IIRC people have run into this sort of problem doing this type of memory sizing on PCs.