[U-Boot] Mips: start.S Questions

Detlev Zundel dzu at denx.de
Fri Aug 21 14:40:43 CEST 2009


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 at 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


More information about the U-Boot mailing list