linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Milton Miller <miltonm@bga.com>
Cc: linuxppc-dev@ozlabs.org, jdl@jdl.com
Subject: Re: [PATCH] dtc: parse NOP in dtb input
Date: Tue, 12 Jun 2007 14:31:04 +1000	[thread overview]
Message-ID: <20070612043104.GB4198@localhost.localdomain> (raw)
In-Reply-To: <311814492916b8b45674.846930886.miltonm@bga.com>

On Sat, Jun 09, 2007 at 11:21:31PM -0500, Milton Miller wrote:
> Version 16 and later of the flat device tree format allow NOPs
> to be placed in the tree.  When processing dtb input, dtc must
> recognise them.
> 
> Previously it would produce the error message
> FATAL ERROR: Invalid opcode word 00000004 in device tree blob
> 
> Signed-off-by: Milton Miller <miltonm@bga.com>
> --- 
> 
> I was trying to look at the output of convert_flattree_inplace
> when I found this.  ftdump.c was able to process the input,
> producing // [NOP] comments when encountered.

Oops, we didn't parse NOPs already.  That's a bit of an oversight.

[snip]
> @@ -774,6 +775,13 @@ static struct node *unflatten_tree(struc
>  			die("Premature OF_DT_END in device tree blob\n");
>  			break;
>  
> +		case OF_DT_NOP:
> +			if (flags & FTF_NOPS)
> +				break;
> +
> +			die("OF_DT_NOP in device tree blob\n");
> +			break;
> +

Actually, I think we should accept the NOPs (with at most a warning)
on all DTB versions.  They may not have been defined for the early
versions, but they're not ambiguous.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

      parent reply	other threads:[~2007-06-12  4:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-10  4:21 [PATCH] dtc: parse NOP in dtb input Milton Miller
2007-06-11 13:41 ` Jon Loeliger
2007-06-12  4:31 ` 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=20070612043104.GB4198@localhost.localdomain \
    --to=david@gibson.dropbear.id.au \
    --cc=jdl@jdl.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=miltonm@bga.com \
    /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).