From: Milton Miller <miltonm@bga.com>
To: Jon Loeliger <jdl@jdl.com>
Cc: linuxppc-dev@ozlabs.org, David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH 00/11] dtc: some fixes, and make asm labels for data
Date: Sat, 7 Jul 2007 01:18:45 -0500 (CDT) [thread overview]
Message-ID: <dtc-5-00.miltonm@bga.com> (raw)
The following series adds the features of labeling memory reserve
slots and labeling specific bytes or cells of property data. When
translating from dts to asm, a global symbol is created with the
name matching the label in the dts file.
With these features a program does not need to understand the
flattened device tree headers, offsets, layouts, or alignments to
modify a property's contents. Instead it can read or write to the
bytes or words addressed by a global symbol.
In addition the series contains 3 fixes to the compiler (one major
- incorrect output, one recognising an input error, and one compiler
warning), a source dtc for use as a testcase, and two formatting
changes to the generated assembly.
I verified the label placement in the asm output and compared the
dts to dtb output with outptut of dts to asm after cc -c ond objcopy
-o binary, the difference was trailing padding of the assembled
version. I also compared the dts to dts output with the dtb to dts
of the assembled version. Although I did not include the assembled
output with the testcase, it should be placed in the test directory
when the samples there are upgraded to version 17.
I have not studied the tests directory since the new libfdt test
suite was merged to evaluate how to test the labels point at the
property.
I choose not to attempt writing the labels when generating dts
output at this time, although I did consider it. The code currently
resolves node references to phandles creating the properties if
needed, so creating dts from dts is already a lossy operation. I
felt there was no benefit in preserving the labels until there is
a method to read and write some kind of symbol or map file of labels
with dtb input and therefore couldn't justify writing the code to
split the data as it is output. Such code could be used to avoid
formatting a list of strings as list of cells or bytes.
I did not provide a method to label the address and size fields of
a memory reserve entry. Although it could be implemented, I didn't
deem it necessary as there is no header before the address field
and placing a label on the size field of a reserve created with the
start-end syntax would be misleading.
I did not include a prefix when generating the labels, matching the
existing labels output on node and property tags. If code is later
added to change the _dt label prefix used in the header to allow
multiple trees to be linked in one program, a prefix should be added
to the labels to create a a seperate namespace for each dts.
milton
next reply other threads:[~2007-07-07 6:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-07 6:18 Milton Miller [this message]
2007-07-07 6:18 ` [PATCH 01/11] dtc: fix asm for version 17 Milton Miller
2007-07-18 1:56 ` David Gibson
2007-07-07 6:18 ` [PATCH 02/11] dtc: move declaration of yyerror Milton Miller
2007-07-19 5:02 ` David Gibson
2007-07-07 6:18 ` [PATCH 03/11] dtc: complain about unparsed digits in cell lists Milton Miller
2007-07-18 2:01 ` David Gibson
2007-07-07 6:18 ` [PATCH 04/11] dtc: implement labels on memory reserve slots Milton Miller
2007-07-07 6:18 ` [PATCH 05/11] dtc: clean up grow_data_for() Milton Miller
2007-07-07 6:18 ` [PATCH 06/11] dtc: allow a label: in any dts context Milton Miller
2007-07-07 6:18 ` [PATCH 07/11] dtc: implement labels on property data Milton Miller
2007-07-07 6:18 ` [PATCH 08/11] dtc: store labels in asscending order Milton Miller
2007-07-07 6:18 ` [PATCH 10/11] dtc: align header comments in asm output Milton Miller
2007-07-07 6:18 ` [PATCH 09/11] dtc: add a testcase with labels Milton Miller
2007-07-07 6:18 ` [PATCH 11/11] dtc: format memory reserve as pairs on two lines Milton Miller
2007-07-07 19:24 ` [PATCH 00/11] dtc: some fixes, and make asm labels for data Jon Loeliger
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=dtc-5-00.miltonm@bga.com \
--to=miltonm@bga.com \
--cc=david@gibson.dropbear.id.au \
--cc=jdl@jdl.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).