From mboxrd@z Thu Jan 1 00:00:00 1970 From: Detlev Zundel Date: Fri, 21 Aug 2009 14:40:43 +0200 Subject: [U-Boot] Mips: start.S Questions In-Reply-To: <574bb010908210434j5e3bcc4cqb96604c345f01046@mail.gmail.com> (Peter Belm's message of "Fri, 21 Aug 2009 12:34:29 +0100") References: <574bb010908210434j5e3bcc4cqb96604c345f01046@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, > I've figured out most of the boot process by following through the code, but > I have a few questions about start.S: > > 1. Calls to RVECENT and XVEVENT: what exactly do these do? RVECENT just > branches to the first parameter f, and does nothing with the second > parameter. These macros are used to setup up "reserved vector entries" - and "exception vector entries". >> Yet the first argument passed is romReserved which is defined: This is not quite correct. "romReserved" is only used for the, well, reserved entries. There are other parameters passed, these two are pretty important for example: _start: RVECENT(reset,0) /* U-boot entry point */ RVECENT(reset,1) /* software reboot */ And they will yield calls to "reset". >> romReserved: >> b romReserved > > Isn't that just an infinite loop? Yep - but the vectors are reserved, so they should never be jumped to. > 2. What are these for?: > >> #ifdef CONFIG_PURPLE >> /* 0xbfc00400 */ >> .word 0xdc870000 >> .word 0xfca70000 >> .word 0x20840008....etc.. Absolutely no idea :) Maybe some magic stuff needed by some other hardware? I advise to ignore this unless you find something comparable in the boot code you have for your CPU. Cheers Detlev -- Some people unfortunately like jumping up and down about spaces but not code. [...] I'd rather read good poetry written in very bad hand writing than bad poetry written in beautiful handwriting, and I think the same is true of code. -- Alan Cox <20090701130018.115ce0ea@lxorguk.ukuu.org.uk> -- 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