linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: "Mark A. Greer" <mgreer@mvista.com>
Cc: linuxppc-dev <Linuxppc-dev@ozlabs.org>
Subject: Re: dtc: .quad asm directive generation
Date: Tue, 14 Mar 2006 14:31:35 +1100	[thread overview]
Message-ID: <20060314033135.GA24168@localhost.localdomain> (raw)
In-Reply-To: <20060313212105.GA11995@mag.az.mvista.com>

On Mon, Mar 13, 2006 at 02:21:05PM -0700, Mark A. Greer wrote:
> Hi David,
> 
> I'm playing around with moving some 32-bit embedded platforms (that don't
> have OF or dev-tree-aware uboot) to the powerpc tree.  Basically, I make an
> initial .dts file for that platform then dtc-compile it using:
> 
> dtc -I dts -O asm -o <platform>.S -V 16 <platform>.dts
> 
> Then I build the <platform>.S file with the normal bootwrapper/kernel build.
> 
> The problem I'm having is that dtc generates some .quad directives that
> is causing my 32-bit assembler to choke (.quad not supported).  Do we need
> a 32-bit switch for dtc or should I be giving some sort of switch to
> gcc(version 3.4.3)/gas(version 2.15.94) to make it work?

[snip]
> dtc asm output:
> ---------------
> 
> /* autogenerated by dtc, do not edit */
> 
> <snip>
> 
> dt_reserve_map:
> _dt_reserve_map:
> 	.quad	0, _dt_blob_start
> 	.quad	0, _dt_blob_end - _dt_blob_start
> /* Memory reserve map from source file */
> 	.quad	0
> 	.quad	0
> 
> <snip>

Oh, bother.  I guess I never tried with a 32-bit only assembler.  Um,
a number of observations are applicable here:
	- The flattened tree spec defines the memory range fields to
be 64-bit quantities, always, so these things shouldn't just become
".long" for 32-bit targets.
	- For the "spacer" 0 entries, we can and should just replace
the .quad with two ".long" directives, easy change.
	- The autogenerated entry reserving the tree itself, however,
is trickier.  It genuinely needs to be a .quad for 64-bit targets.  So
I guess we'd have to have a 32/64 bit target option.  Yuck.
	- IIRC BenH was contemplating revising the spec so that the
range for the device tree is reserved implicitly, like the range for
the kernel image, so it wouldn't have to be listed in the blob.  This
would sidestep the problem, though we would have to change dtc to omit
this entry, at least for suitable output blob versions.
	- I've been thinking for a while, that the whole memory
reserve thing needs some work in dtc.  The fact that the range for the
tree blob is included automatically for asm output, but not for blob
output is a wart, at least.  I was thinking about instead of
automatically generating it, including a new keyword, or form for the
/memreserve/ directive that will generate this range if necessary /
possible.  I never got around to implementing that, though.

And finally, as of, well right about now, until October or so, I'm
expecting to be unavailable, off travelling and things.  In the
interim Jon Loeliger of Freescale has agreed to be dtc maintainer.

-- 
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

  reply	other threads:[~2006-03-14  3:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-13 21:21 dtc: .quad asm directive generation Mark A. Greer
2006-03-14  3:31 ` David Gibson [this message]
2006-03-14 23:52   ` Mark A. Greer
2006-03-15  0:06     ` Jon Loeliger
2006-03-15 17:49       ` Mark A. Greer
2006-03-16  0:00       ` Mark A. Greer
2006-03-16  0:49         ` David Gibson
2006-03-16  1:59           ` Mark A. Greer
2006-03-16  2:05             ` David Gibson
2006-03-16  0:56         ` Stephen Rothwell

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=20060314033135.GA24168@localhost.localdomain \
    --to=david@gibson.dropbear.id.au \
    --cc=Linuxppc-dev@ozlabs.org \
    --cc=mgreer@mvista.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).