linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Jon Loeliger <jdl@freescale.com>
Cc: "linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>
Subject: Re: DTC: write_dt_blob() question
Date: Thu, 14 Jul 2005 11:28:33 +1000	[thread overview]
Message-ID: <20050714012833.GD15769@sneetch.ozlabs.ibm.com> (raw)
In-Reply-To: <1121271391.21013.4.camel@cashmere.sps.mot.com>

On Wed, Jul 13, 2005 at 11:16:32AM -0500, Jon Loeliger wrote:
> David,
> 
> Over in flattree.c's write_dt_blob() there is this code:
> 
> 	make_bph(&bph, vi, reservenum, dtbuf.len, strbuf.len);
> 
> 	/* Align the reserve map to an 8 byte boundary */
> 	for (i = vi->hdr_size; i < be32_to_cpu(bph.off_mem_rsvmap); i++)
> 		fputc(0, f);
> 
> 	fwrite(&bph, vi->hdr_size, 1, f);
> 	for (i = 0; i < reservenum+1; i++)
> 		fwrite(&re, sizeof(re), 1, f);
> 
> However, I think the boot_param_header should be emitted
> first, before the alignment:
> 
> 	make_bph(&bph, vi, reservenum, dtbuf.len, strbuf.len);
> 
> 	fwrite(&bph, vi->hdr_size, 1, f);
> 
> 	/* Align the reserve map to an 8 byte boundary */
> 	for (i = vi->hdr_size; i < be32_to_cpu(bph.off_mem_rsvmap); i++)
> 		fputc(0, f);
> 
> 	for (i = 0; i < reservenum+1; i++)
> 		fwrite(&re, sizeof(re), 1, f);
> 
> Thoughts?

Oops, yes, stupid screwup on my part.  I've really got to get this
testsuite thing going...

I've committed a fix for this, but it won't go up on the site until
I'm able to fix my laptop, unfortunately (disk died the other day).

-- 
David Gibson			| For every complex problem there is a
david@gibson.dropbear.id.au	| solution which is simple, neat and
				| wrong.
http://www.ozlabs.org/people/dgibson

      reply	other threads:[~2005-07-14  1:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-13 16:16 DTC: write_dt_blob() question Jon Loeliger
2005-07-14  1:28 ` David Gibson [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=20050714012833.GD15769@sneetch.ozlabs.ibm.com \
    --to=david@gibson.dropbear.id.au \
    --cc=jdl@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    /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;
as well as URLs for NNTP newsgroup(s).