public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] PPC: Record uboot's relocated address in RAM and show in bdinfo.
Date: Mon, 18 Jan 2010 11:44:23 +0100	[thread overview]
Message-ID: <m23a23n14o.fsf@ohwell.denx.de> (raw)
In-Reply-To: <4B509E5E.8090002@RuggedCom.com> (Richard Retanubun's message of "Fri, 15 Jan 2010 11:57:02 -0500")

Hi Richard,

> Detlev Zundel wrote:
> <snip>
>>
>> Please excuse my ignorance, but why not simply remove the #ifdef
>> CONFIG_AMIGAONEG3SE in board_init_f?  Actually I was hoping to remove
>> the Amigaone special case.
>>
>> Cheers
>>   Detlev
>>
> I prefer getting the data from board_init_r because we really are
> running from RAM at that point; dest_addr is a passed in function
> param.

I see, thanks for the explanation.

> In board_init_f, the addr variable is just what the calculated address
> is. If we must do the copy there I'd like to move the gd->relocaddr =
> addr to just before the call to relocate_code, that way if the
> calculation code got reworked/refactored, we always copy the correct
> addr variable.

Yes, I also agree - if we want to have it in _f, we should move the
assignment.

> Plus the line: debug ("Now running in RAM - U-Boot at: %08lx\n", dest_addr); in board_init_r
>
> Is the de-facto place where documentations that I've seen refer to for
> figuring out where u-boot is relocated, so making the assignment there
> makes it clearer.
>
> All these leads to my preference of getting it from board_init_r.

Actually I do not have a strong preference myself.  The only thing I
could think of is that an earlier assignment discloses the information
also when debugging problems in relocation.  On the other hand if you
_do_ debug the relocation it is unlikely that you need the variable, so
this argument does not tip the scale in any direction.

> I'll be happy to submit a V2 that takes out the CONFIG_AMIGAONEG3SE
> copy operation in board_init_f as well, but I can't confirm if that
> does not break the AMIGAONE board.

Yes, please send such a follow-on patch.  Not being able to test a
change is rather the norm in U-Boot, so it is acceptable to simply CC
the relevant maintainer ("Thomas Frieden
<ThomasF@hyperion-entertainment.com>") and if no NACK is seen include
the changes anyway at some point.

Thanks
  Detlev

-- 
It's like manually inflatable airbags -- people will never
think to use it in time to actually get any help from it.
             -- Miles Bader in <20030607122005.GA1086@gnu.org>
--
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:[~2010-01-18 10:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-15 15:25 [U-Boot] [PATCH] PPC: Record uboot's relocated address in RAM and show in bdinfo Richard Retanubun
2010-01-15 16:13 ` Detlev Zundel
2010-01-15 16:57   ` Richard Retanubun
2010-01-18 10:44     ` Detlev Zundel [this message]
2010-01-18 10:50       ` Joakim Tjernlund
2010-01-18 14:12       ` [U-Boot] [PATCH V2] " Richard Retanubun
2010-01-19 14:28         ` Detlev Zundel
     [not found]           ` <4B55C9FF.7060000@RuggedCom.com>
     [not found]             ` <m2iqawg0fj.fsf@ohwell.denx.de>
2010-01-25 18:31               ` [U-Boot] [PATCH V3] " richardretanubun at ruggedcom.com
2010-02-02 17:38                 ` Detlev Zundel
2010-03-11 22:49                 ` Wolfgang Denk

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=m23a23n14o.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox