From: Wolfgang Denk Date: Tue, 18 Mar 2008 01:28:49 +0100 Subject: [U-Boot-Users] [RFC][MIPS] Remove mips_cache_lock In-Reply-To: Your message of "Mon, 17 Mar 2008 18:55:54 EST." Message-ID: <20080318002849.224C3246C5@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 In message you wrote: > > > Isn't the lock necessary to use the cache as memory for stack and > > initial data? > > This code has some problems: > > Cache locking is not consistent across MIPS implementations. Some > implementations do not support locking at all. The style of locking > varies - some support per line locking, others per way, etc, etc. > Some parts use bits in status registers instead of the cache ops. > > IIRC, some MIPS cache implementations require valid zeroed RAM to init > cache parity correctly. > > The cache never gets unlocked, so the code relies on whatever gets > loaded after u-boot to reinitialize the cache and clear the locks. This is most probably true. When this code was implemented first, it was most probably with a single CPU in mind. But simply deleting it is definitely not a good idea, as it would most probably break existing board support. 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 "In the long run, every program becomes rococo, and then rubble." - Alan Perlis