linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jon Loeliger <jdl@freescale.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: "linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>
Subject: DTC: write_dt_blob() question
Date: Wed, 13 Jul 2005 11:16:32 -0500	[thread overview]
Message-ID: <1121271391.21013.4.camel@cashmere.sps.mot.com> (raw)

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?

Thanks,
jdl

             reply	other threads:[~2005-07-13 16:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-13 16:16 Jon Loeliger [this message]
2005-07-14  1:28 ` DTC: write_dt_blob() question David Gibson

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=1121271391.21013.4.camel@cashmere.sps.mot.com \
    --to=jdl@freescale.com \
    --cc=david@gibson.dropbear.id.au \
    --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).