mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Alexander Shiyan <shc_work@mail.ru>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] ARM: Use armlinux_bootparams address for DTB
Date: Tue, 9 Jul 2013 20:11:31 +0200	[thread overview]
Message-ID: <20130709181131.GC516@pengutronix.de> (raw)
In-Reply-To: <1373392840.824667706@f353.mail.ru>

On Tue, Jul 09, 2013 at 10:00:41PM +0400, Alexander Shiyan wrote:
> > On Tue, Jul 09, 2013 at 04:56:40PM +0400, Alexander Shiyan wrote:
> > > In some cases, the address of the devicetree, which is obtained
> > > dynamically, may be located in the kernel text area, which leads
> > > to malfunction of the devicetree. The patch uses the address of
> > > the devicetree, designed for the board, if it possible.
> > > 
> > > Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> > > ---
> > >  arch/arm/lib/armlinux.c | 20 ++++++++++++--------
> > >  1 file changed, 12 insertions(+), 8 deletions(-)
> > > 
> > > diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c
> > > index 40a63ea..12fb06d 100644
> > > --- a/arch/arm/lib/armlinux.c
> > > +++ b/arch/arm/lib/armlinux.c
> > > @@ -261,16 +261,20 @@ void start_linux(void *adr, int swap, unsigned long initrd_address,
> > >  		unsigned long initrd_size, void *oftree)
> > >  {
> > >  	void (*kernel)(int zero, int arch, void *params) = adr;
> > > -	void *params = NULL;
> > >  	int architecture;
> > >  
> > >  	if (oftree) {
> > > -		printf("booting Linux kernel with devicetree\n");
> > 
> > This is a useful information that gets removed here. Could you keep it?
> 
> Yes, but I think this is duplicate previous message "using internal devicetree".

Not really a duplicate since the 'internal devicetree' message will only
come if we are using an internal devicetree (i.e. no devicetree
specified on the commandline).
We could move the message to common/bootm.c instead of removing it.

> 
> > > -		params = oftree;
> > > -	} else {
> > > +		if (armlinux_bootparams) {
> > > +			struct fdt_header *header = oftree;
> > > +
> > > +			printf("Relocate DTB to 0x%p\n", armlinux_bootparams);
> > 
> > This is more useful for verbose mode, but I think not for the normal
> > case.
> 
> This is note about address, since barebox reports us address of devicetree
> before and it different than armlinux_params. Remove anyway?

My idea was not to remove them but encapsulate it in bootm_verbose().
That's not so easy though since this code is called from non bootm code.

We could add an additional verbose argument to this function.

Often the boot code is critical. During normal boot you don't want to
see many messages because they add to the boot time, but when something
doesn't work one is happy about every line that comes out, so I think
it's worth it to pass a verbose parameter around.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2013-07-09 18:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-09 12:56 Alexander Shiyan
2013-07-09 17:54 ` Sascha Hauer
2013-07-09 18:00   ` Alexander Shiyan
2013-07-09 18:11     ` Sascha Hauer [this message]

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=20130709181131.GC516@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=shc_work@mail.ru \
    /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