From: Wolfgang Denk Date: Thu, 27 May 2010 21:49:58 +0200 Subject: [U-Boot] [PATCH] [RFC] memsize.c: adapt get_ram_size() for address spaces >32 bit In-Reply-To: <20100527185909.GG31271@leila.ping.de> References: <1274983869-9173-1-git-send-email-wd@denx.de> <20100527185909.GG31271@leila.ping.de> Message-ID: <20100527194958.27266EAC238@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Wolfgang Wegner, In message <20100527185909.GG31271@leila.ping.de> you wrote: > > as the systems I was working on always had far less memory, I can > not comment much on the extension you propose here, but as Timur > Tabi's comments seem to go in a direction which could lead to a > bigger overhaul/discussion, I would like to add 2C from my point > of view on coldfire... > > - MCF53xx/MCF5445x both simply lock up if non-existent memory is > accessed. So if the SDRAM controller is set up for a too big size > of memory, get_ram_size() will fail. I assume this applies to > most coldfire devices. The design of get_ram_size() is based on the assumption that you start with a "big enough" mapping. Usually we map twice the maximum possible size that actually can be fit. > - How about systems/configurations using CONFIG_MONITOR_IS_IN_RAM? Here you obviously cannot use this. What some ARM systems are doing right now is plain wrong. get_ram_size() must always and only be called _before_ the code is running from RAM. > - at least in the coldfire world, CONFIG_SYS_SDRAM_SIZE is quite > often used for cache setup in the assembly code. This contradicts > changing/setting the SDRAM size at runtime... You may want to change this :-) Note that we have plans underway to rework the ARM architecture to do proper relocation including auto-sizing of the RAM. Other architectures are invited to follow. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Never underestimate the bandwidth of a station wagon full of tapes. -- Dr. Warren Jackson, Director, UTCS