From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Tue, 8 Apr 2008 21:52:52 +0200 Subject: [U-Boot-Users] [PATCH] Make MPC83xx one step closer to full relocation. In-Reply-To: <1207663498.5826.56.camel@gentoo-jocke.transmode.se> References: <20080408115806.6358424842@gemini.denx.de> <200804081525.36771.sr@denx.de> <1207663498.5826.56.camel@gentoo-jocke.transmode.se> Message-ID: <200804082152.53399.sr@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 On Tuesday 08 April 2008, Joakim Tjernlund wrote: > > On 4xx execution always starts at 0xfffffffc (last lword in 32bit address > > space). This location holds a jump to _start for 405 PPC's and to > > _start_440 for 440 PPC's. 440 PPC's need some extended initialization > > (TLB setup etc) and later jump to the 4xx common _start. > > OK, then it is like I suspected. What if you rename _start to > _common_start. Make _start equal _common_start for 405 and rename > _start_440 to _start, i.e make sure that _start is defined where you > start executing after the jump. As I mentioned earlier, _start_440 is mapped to 0xfffff000 via the linker script since the jump from 0xfffffffc can't be too long (because of the 4k shadow TLB entry). So renaming _start_440 to _start won't help here. It can be done, but frankly I don't have the time for it currently. > > I'm an linker script dyslexic. So no idea if we can handle this solely in > > the linker script or if we need a new common symbol in the PPC start.S's. > > Both ways should be doable I think. A linker script would probably look > something like(pseudo diff below): > .text : > { > + _monitor_base = . ; > + PROVIDE (_monitor_base = .); > cpu/mpc83xx/start.o (.text) > > And then add a > GOT_ENTRY(_monitor_base) > in start.S The disadvantage I see is that I need to change the linker scripts for all boards for such a solution. Doesn't sound like fun. So for now, I would really like to see the old version with the ugly CFG_MONITOR_BASE back so that 4xx board can be used again. Best regards, Stefan ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================