From mboxrd@z Thu Jan 1 00:00:00 1970 From: Detlev Zundel Date: Fri, 21 Aug 2009 15:42:50 +0200 Subject: [U-Boot] Mips: start.S Questions In-Reply-To: <574bb010908210608h3e77eb4fj5f510754eb2333be@mail.gmail.com> (Peter Belm's message of "Fri, 21 Aug 2009 14:08:03 +0100") References: <574bb010908210434j5e3bcc4cqb96604c345f01046@mail.gmail.com> <574bb010908210553v7dd8570cnfa6d85978b531e10@mail.gmail.com> <574bb010908210608h3e77eb4fj5f510754eb2333be@mail.gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Peter, > Why should it? ?I presume the CPU starts at _start, so it will "b > reset", i.e. branch (jump) to "reset" and be happy. ?Its only if the CPU > jumps to one the reserved vectors that it will loop. ?And well, as they > are reserved, this is a legal thing to do, no? ?As the purple port > works, I'm pretty sure they do not usually get jumped to there ;) > > > I knew I must be missing something, I didn't see that the reset definition > comes straight under all the other vector calls, so _start just runs through > all the vectors if for some reason reset returns (twice) and would get trapped > because of RVECENT(romReserved,2). It seems to me that you may still be missing the point that a "b reset" is an unconditional jump, not a call, i.e. we will never return to the next instruction. A call would be a "bal reset", i.e. "branch and link" which puts the address of the next instruction into the $ra register. One would return with "jr $ra". As I'm not really into MIPS, please don't ask me why MIPS has branch *and* jump mnemonics - I don't see how they designate different concepts. Cheers Detlev -- Q: What is a compact city? A: It's a city that can be guarded by finitely many near-sighted policemen. -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de