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 15:02:20 +0200	[thread overview]
Message-ID: <m2skfl8gmb.fsf@ohwell.denx.de> (raw)
In-Reply-To: <574bb010908210553v7dd8570cnfa6d85978b531e10@mail.gmail.com> (Peter Belm's message of "Fri, 21 Aug 2009 13:53:47 +0100")

Hi Peter,

>     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:
>
>
> The thing I don't get is if you expand the RVECENT macro into the code wouldn't
> you get this:
>
> _start:
> ??? b reset; nop ?? /* U-boot entry point */
> ??? b reset; nop ?? /* software reboot */
>
> ??? b romReserved
> ??? b romReserved
>
> ....
>
> romReserved:
> ??? b romReserved
>
> So wouldn't it get stuck in an infinite loop straight away, calling romReserved
> recursively? I'm obviously overlooking something I think.

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 ;)

> And what's the point of passing the second parameter (0-127) to RVECENT when
> it's not used?

This is only making life easier in the "create table" part of the code
not to miss one of the defined vectors.  So it really serves only
documentary functions. 

Cheers
  Detlev

-- 
Lobbing insults is not a useful technique for reaching understanding.
                                        -- Thomas Bushnell, BSG
--
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 13:02 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
2009-08-21 12:53   ` Peter Belm
2009-08-21 13:02     ` Detlev Zundel [this message]
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=m2skfl8gmb.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.