All of lore.kernel.org
 help / color / mirror / Atom feed
From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] Mips: start.S Questions
Date: Fri, 21 Aug 2009 14:40:43 +0200	[thread overview]
Message-ID: <m21vn59w6s.fsf@ohwell.denx.de> (raw)
In-Reply-To: <574bb010908210434j5e3bcc4cqb96604c345f01046@mail.gmail.com> (Peter Belm's message of "Fri, 21 Aug 2009 12:34:29 +0100")

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

  reply	other threads:[~2009-08-21 12:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-21 11:34 [U-Boot] Mips: start.S Questions Peter Belm
2009-08-21 12:40 ` Detlev Zundel [this message]
2009-08-21 12:53   ` Peter Belm
2009-08-21 13:02     ` Detlev Zundel
2009-08-21 13:08       ` Peter Belm
2009-08-21 13:42         ` Detlev Zundel
2009-08-21 13:46           ` Peter Belm
2009-08-21 13:05     ` Chetan Nanda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m21vn59w6s.fsf@ohwell.denx.de \
    --to=dzu@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.