• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1\documentclass[a4paper,twocolumn]{article}
2
3\usepackage{abstract}
4\usepackage{xspace}
5\usepackage{amssymb}
6\usepackage{latexsym}
7\usepackage{tabularx}
8\usepackage[T1]{fontenc}
9\usepackage{calc}
10\usepackage{listings}
11\usepackage{color}
12\usepackage{url}
13
14\title{Device trees everywhere}
15
16\author{David Gibson \texttt{<{dwg}{@}{au1.ibm.com}>}\\
17  Benjamin Herrenschmidt \texttt{<{benh}{@}{kernel.crashing.org}>}\\
18  \emph{OzLabs, IBM Linux Technology Center}}
19
20\newcommand{\R}{\textsuperscript{\textregistered}\xspace}
21\newcommand{\tm}{\textsuperscript{\texttrademark}\xspace}
22\newcommand{\tge}{$\geqslant$}
23%\newcommand{\ditto}{\textquotedbl\xspace}
24
25\newcommand{\fixme}[1]{$\bigstar$\emph{\textbf{\large #1}}$\bigstar$\xspace}
26
27\newcommand{\ppc}{\mbox{PowerPC}\xspace}
28\newcommand{\of}{Open Firmware\xspace}
29\newcommand{\benh}{Ben Herrenschmidt\xspace}
30\newcommand{\kexec}{\texttt{kexec()}\xspace}
31\newcommand{\dtbeginnode}{\texttt{OF\_DT\_BEGIN\_NODE\xspace}}
32\newcommand{\dtendnode}{\texttt{OF\_DT\_END\_NODE\xspace}}
33\newcommand{\dtprop}{\texttt{OF\_DT\_PROP\xspace}}
34\newcommand{\dtend}{\texttt{OF\_DT\_END\xspace}}
35\newcommand{\dtc}{\texttt{dtc}\xspace}
36\newcommand{\phandle}{\texttt{linux,phandle}\xspace}
37\begin{document}
38
39\maketitle
40
41\begin{abstract}
42  We present a method for booting a \ppc{}\R Linux\R kernel on an
43  embedded machine.  To do this, we supply the kernel with a compact
44  flattened-tree representation of the system's hardware based on the
45  device tree supplied by Open Firmware on IBM\R servers and Apple\R
46  Power Macintosh\R machines.
47
48  The ``blob'' representing the device tree can be created using \dtc
49  --- the Device Tree Compiler --- that turns a simple text
50  representation of the tree into the compact representation used by
51  the kernel.  The compiler can produce either a binary ``blob'' or an
52  assembler file ready to be built into a firmware or bootwrapper
53  image.
54
55  This flattened-tree approach is now the only supported method of
56  booting a \texttt{ppc64} kernel without Open Firmware, and we plan
57  to make it the only supported method for all \texttt{powerpc}
58  kernels in the future.
59\end{abstract}
60
61\section{Introduction}
62
63\subsection{OF and the device tree}
64
65Historically, ``everyday'' \ppc machines have booted with the help of
66\of (OF), a firmware environment defined by IEEE1275 \cite{IEEE1275}.
67Among other boot-time services, OF maintains a device tree that
68describes all of the system's hardware devices and how they're
69connected.  During boot, before taking control of memory management,
70the Linux kernel uses OF calls to scan the device tree and transfer it
71to an internal representation that is used at run time to look up
72various device information.
73
74The device tree consists of nodes representing devices or
75buses\footnote{Well, mostly.  There are a few special exceptions.}.
76Each node contains \emph{properties}, name--value pairs that give
77information about the device.  The values are arbitrary byte strings,
78and for some properties, they contain tables or other structured
79information.
80
81\subsection{The bad old days}
82
83Embedded systems, by contrast, usually have a minimal firmware that
84might supply a few vital system parameters (size of RAM and the like),
85but nothing as detailed or complete as the OF device tree.  This has
86meant that the various 32-bit \ppc embedded ports have required a
87variety of hacks spread across the kernel to deal with the lack of
88device tree.  These vary from specialised boot wrappers to parse
89parameters (which are at least reasonably localised) to
90CONFIG-dependent hacks in drivers to override normal probe logic with
91hardcoded addresses for a particular board.  As well as being ugly of
92itself, such CONFIG-dependent hacks make it hard to build a single
93kernel image that supports multiple embedded machines.
94
95Until relatively recently, the only 64-bit \ppc machines without OF
96were legacy (pre-POWER5\R) iSeries\R machines.  iSeries machines often
97only have virtual IO devices, which makes it quite simple to work
98around the lack of a device tree.  Even so, the lack means the iSeries
99boot sequence must be quite different from the pSeries or Macintosh,
100which is not ideal.
101
102The device tree also presents a problem for implementing \kexec.  When
103the kernel boots, it takes over full control of the system from OF,
104even re-using OF's memory.  So, when \kexec comes to boot another
105kernel, OF is no longer around for the second kernel to query.
106
107\section{The Flattened Tree}
108
109In May 2005 \benh implemented a new approach to handling the device
110tree that addresses all these problems.  When booting on OF systems,
111the first thing the kernel runs is a small piece of code in
112\texttt{prom\_init.c}, which executes in the context of OF.  This code
113walks the device tree using OF calls, and transcribes it into a
114compact, flattened format.  The resulting device tree ``blob'' is then
115passed to the kernel proper, which eventually unflattens the tree into
116its runtime form.  This blob is the only data communicated between the
117\texttt{prom\_init.c} bootstrap and the rest of the kernel.
118
119When OF isn't available, either because the machine doesn't have it at
120all or because \kexec has been used, the kernel instead starts
121directly from the entry point taking a flattened device tree.  The
122device tree blob must be passed in from outside, rather than generated
123by part of the kernel from OF.  For \kexec, the userland
124\texttt{kexec} tools build the blob from the runtime device tree
125before invoking the new kernel.  For embedded systems the blob can
126come either from the embedded bootloader, or from a specialised
127version of the \texttt{zImage} wrapper for the system in question.
128
129\subsection{Properties of the flattened tree}
130
131The flattened tree format should be easy to handle, both for the
132kernel that parses it and the bootloader that generates it.  In
133particular, the following properties are desirable:
134
135\begin{itemize}
136\item \emph{relocatable}: the bootloader or kernel should be able to
137  move the blob around as a whole, without needing to parse or adjust
138  its internals.  In practice that means we must not use pointers
139  within the blob.
140\item \emph{insert and delete}: sometimes the bootloader might want to
141  make tweaks to the flattened tree, such as deleting or inserting a
142  node (or whole subtree).  It should be possible to do this without
143  having to effectively regenerate the whole flattened tree.  In
144  practice this means limiting the use of internal offsets in the blob
145  that need recalculation if a section is inserted or removed with
146  \texttt{memmove()}.
147\item \emph{compact}: embedded systems are frequently short of
148  resources, particularly RAM and flash memory space.  Thus, the tree
149  representation should be kept as small as conveniently possible.
150\end{itemize}
151
152\subsection{Format of the device tree blob}
153\label{sec:format}
154
155\begin{figure}[htb!]
156  \centering
157  \footnotesize
158  \begin{tabular}{r|c|l}
159    \multicolumn{1}{r}{\textbf{Offset}}& \multicolumn{1}{c}{\textbf{Contents}} \\\cline{2-2}
160    \texttt{0x00} & \texttt{0xd00dfeed} & magic number \\\cline{2-2}
161    \texttt{0x04} & \emph{totalsize} \\\cline{2-2}
162    \texttt{0x08} & \emph{off\_struct} & \\\cline{2-2}
163    \texttt{0x0C} & \emph{off\_strs} & \\\cline{2-2}
164    \texttt{0x10} & \emph{off\_rsvmap} & \\\cline{2-2}
165    \texttt{0x14} & \emph{version} \\\cline{2-2}
166    \texttt{0x18} & \emph{last\_comp\_ver} & \\\cline{2-2}
167    \texttt{0x1C} & \emph{boot\_cpu\_id} & \tge v2 only\\\cline{2-2}
168    \texttt{0x20} & \emph{size\_strs} & \tge v3 only\\\cline{2-2}
169    \multicolumn{1}{r}{\vdots} & \multicolumn{1}{c}{\vdots} & \\\cline{2-2}
170    \emph{off\_rsvmap} & \emph{address0} & memory reserve \\
171    + \texttt{0x04} & ...& table \\\cline{2-2}
172    + \texttt{0x08} & \emph{len0} & \\
173    + \texttt{0x0C} & ...& \\\cline{2-2}
174    \vdots & \multicolumn{1}{c|}{\vdots} & \\\cline{2-2}
175    & \texttt{0x00000000}- & end marker\\
176    & \texttt{00000000} & \\\cline{2-2}
177    & \texttt{0x00000000}- & \\
178    & \texttt{00000000} & \\\cline{2-2}
179    \multicolumn{1}{r}{\vdots} & \multicolumn{1}{c}{\vdots} & \\\cline{2-2}
180    \emph{off\_strs} & \texttt{'n' 'a' 'm' 'e'} & strings block \\
181    + \texttt{0x04} & \texttt{~0~ 'm' 'o' 'd'} & \\
182    + \texttt{0x08} & \texttt{'e' 'l' ~0~ \makebox[\widthof{~~~}]{\textrm{...}}} & \\
183    \vdots & \multicolumn{1}{c|}{\vdots} & \\\cline{2-2}
184    \multicolumn{1}{r}{+ \emph{size\_strs}} \\
185    \multicolumn{1}{r}{\vdots} & \multicolumn{1}{c}{\vdots} & \\\cline{2-2}
186    \emph{off\_struct} & \dtbeginnode & structure block \\\cline{2-2}
187    + \texttt{0x04} & \texttt{'/' ~0~ ~0~ ~0~}  & root node\\\cline{2-2}
188    + \texttt{0x08} & \dtprop & \\\cline{2-2}
189    + \texttt{0x0C} & \texttt{0x00000005} & ``\texttt{model}''\\\cline{2-2}
190    + \texttt{0x10} & \texttt{0x00000008} & \\\cline{2-2}
191    + \texttt{0x14} & \texttt{'M' 'y' 'B' 'o'} & \\
192    + \texttt{0x18} & \texttt{'a' 'r' 'd' ~0~} & \\\cline{2-2}
193    \vdots & \multicolumn{1}{c|}{\vdots} & \\\cline{2-2}
194    & \texttt{\dtendnode} \\\cline{2-2}
195    & \texttt{\dtend} \\\cline{2-2}
196    \multicolumn{1}{r}{\vdots} & \multicolumn{1}{c}{\vdots} & \\\cline{2-2}
197    \multicolumn{1}{r}{\emph{totalsize}} \\
198  \end{tabular}
199  \caption{Device tree blob layout}
200  \label{fig:blob-layout}
201\end{figure}
202
203The format for the blob we devised, was first described on the
204\texttt{linuxppc64-dev} mailing list in \cite{noof1}.  The format has
205since evolved through various revisions, and the current version is
206included as part of the \dtc (see \S\ref{sec:dtc}) git tree,
207\cite{dtcgit}.
208
209Figure \ref{fig:blob-layout} shows the layout of the blob of data
210containing the device tree.  It has three sections of variable size:
211the \emph{memory reserve table}, the \emph{structure block} and the
212\emph{strings block}.  A small header gives the blob's size and
213version and the locations of the three sections, plus a handful of
214vital parameters used during early boot.
215
216The memory reserve map section gives a list of regions of memory that
217the kernel must not use\footnote{Usually such ranges contain some data
218structure initialised by the firmware that must be preserved by the
219kernel.}.  The list is represented as a simple array of (address,
220size) pairs of 64 bit values, terminated by a zero size entry.  The
221strings block is similarly simple, consisting of a number of
222null-terminated strings appended together, which are referenced from
223the structure block as described below.
224
225The structure block contains the device tree proper.  Each node is
226introduced with a 32-bit \dtbeginnode tag, followed by the node's name
227as a null-terminated string, padded to a 32-bit boundary.  Then
228follows all of the properties of the node, each introduced with a
229\dtprop tag, then all of the node's subnodes, each introduced with
230their own \dtbeginnode tag.  The node ends with an \dtendnode tag, and
231after the \dtendnode for the root node is an \dtend tag, indicating
232the end of the whole tree\footnote{This is redundant, but included for
233ease of parsing.}.  The structure block starts with the \dtbeginnode
234introducing the description of the root node (named \texttt{/}).
235
236Each property, after the \dtprop, has a 32-bit value giving an offset
237from the beginning of the strings block at which the property name is
238stored.  Because it's common for many nodes to have properties with
239the same name, this approach can substantially reduce the total size
240of the blob.  The name offset is followed by the length of the
241property value (as a 32-bit value) and then the data itself padded to
242a 32-bit boundary.
243
244\subsection{Contents of the tree}
245\label{sec:treecontents}
246
247Having seen how to represent the device tree structure as a flattened
248blob, what actually goes into the tree?  The short answer is ``the
249same as an OF tree''.  On OF systems, the flattened tree is
250transcribed directly from the OF device tree, so for simplicity we
251also use OF conventions for the tree on other systems.
252
253In many cases a flat tree can be simpler than a typical OF provided
254device tree.  The flattened tree need only provide those nodes and
255properties that the kernel actually requires; the flattened tree
256generally need not include devices that the kernel can probe itself.
257For example, an OF device tree would normally include nodes for each
258PCI device on the system.  A flattened tree need only include nodes
259for the PCI host bridges; the kernel will scan the buses thus
260described to find the subsidiary devices.  The device tree can include
261nodes for devices where the kernel needs extra information, though:
262for example, for ISA devices on a subsidiary PCI/ISA bridge, or for
263devices with unusual interrupt routing.
264
265Where they exist, we follow the IEEE1275 bindings that specify how to
266describe various buses in the device tree (for example,
267\cite{IEEE1275-pci} describe how to represent PCI devices).  The
268standard has not been updated for a long time, however, and lacks
269bindings for many modern buses and devices.  In particular, embedded
270specific devices such as the various System-on-Chip buses are not
271covered.  We intend to create new bindings for such buses, in keeping
272with the general conventions of IEEE1275 (a simple such binding for a
273System-on-Chip bus was included in \cite{noof5} a revision of
274\cite{noof1}).
275
276One complication arises for representing ``phandles'' in the flattened
277tree.  In OF, each node in the tree has an associated phandle, a
27832-bit integer that uniquely identifies the node\footnote{In practice
279usually implemented as a pointer or offset within OF memory.}.  This
280handle is used by the various OF calls to query and traverse the tree.
281Sometimes phandles are also used within the tree to refer to other
282nodes in the tree.  For example, devices that produce interrupts
283generally have an \texttt{interrupt-parent} property giving the
284phandle of the interrupt controller that handles interrupts from this
285device.  Parsing these and other interrupt related properties allows
286the kernel to build a complete representation of the system's
287interrupt tree, which can be quite different from the tree of bus
288connections.
289
290In the flattened tree, a node's phandle is represented by a special
291\phandle property.  When the kernel generates a flattened tree from
292OF, it adds a \phandle property to each node, containing the phandle
293retrieved from OF.  When the tree is generated without OF, however,
294only nodes that are actually referred to by phandle need to have this
295property.
296
297Another complication arises because nodes in an OF tree have two
298names.  First they have the ``unit name'', which is how the node is
299referred to in an OF path.  The unit name generally consists of a
300device type followed by an \texttt{@} followed by a \emph{unit
301address}.  For example \texttt{/memory@0} is the full path of a memory
302node at address 0, \texttt{/ht@0,f2000000/pci@1} is the path of a PCI
303bus node, which is under a HyperTransport\tm bus node.  The form of
304the unit address is bus dependent, but is generally derived from the
305node's \texttt{reg} property.  In addition, nodes have a property,
306\texttt{name}, whose value is usually equal to the first path of the
307unit name. For example, the nodes in the previous example would have
308\texttt{name} properties equal to \texttt{memory} and \texttt{pci},
309respectively.  To save space in the blob, the current version of the
310flattened tree format only requires the unit names to be present.
311When the kernel unflattens the tree, it automatically generates a
312\texttt{name} property from the node's path name.
313
314\section{The Device Tree Compiler}
315\label{sec:dtc}
316
317\begin{figure}[htb!]
318  \centering
319  \begin{lstlisting}[frame=single,basicstyle=\footnotesize\ttfamily,
320    tabsize=3,numbers=left,xleftmargin=2em]
321/memreserve/ 0x20000000-0x21FFFFFF;
322
323/ {
324	model = "MyBoard";
325	compatible = "MyBoardFamily";
326	#address-cells = <2>;
327	#size-cells = <2>;
328
329	cpus {
330		#address-cells = <1>;
331		#size-cells = <0>;
332		PowerPC,970@0 {
333			device_type = "cpu";
334			reg = <0>;
335			clock-frequency = <5f5e1000>;
336			timebase-frequency = <1FCA055>;
337			linux,boot-cpu;
338			i-cache-size = <10000>;
339			d-cache-size = <8000>;
340		};
341	};
342
343	memory@0 {
344		device_type = "memory";
345		memreg: reg = <00000000 00000000
346		               00000000 20000000>;
347	};
348
349	mpic@0x3fffdd08400 {
350		/* Interrupt controller */
351		/* ... */
352	};
353
354	pci@40000000000000 {
355		/* PCI host bridge */
356		/* ... */
357	};
358
359	chosen {
360		bootargs = "root=/dev/sda2";
361		linux,platform = <00000600>;
362		interrupt-controller =
363			< &/mpic@0x3fffdd08400 >;
364	};
365};
366\end{lstlisting}
367  \caption{Example \dtc source}
368  \label{fig:dts}
369\end{figure}
370
371As we've seen, the flattened device tree format provides a convenient
372way of communicating device tree information to the kernel.  It's
373simple for the kernel to parse, and simple for bootloaders to
374manipulate.  On OF systems, it's easy to generate the flattened tree
375by walking the OF maintained tree.  However, for embedded systems, the
376flattened tree must be generated from scratch.
377
378Embedded bootloaders are generally built for a particular board.  So,
379it's usually possible to build the device tree blob at compile time
380and include it in the bootloader image.  For minor revisions of the
381board, the bootloader can contain code to make the necessary tweaks to
382the tree before passing it to the booted kernel.
383
384The device trees for embedded boards are usually quite simple, and
385it's possible to hand construct the necessary blob by hand, but doing
386so is tedious.  The ``device tree compiler'', \dtc{}\footnote{\dtc can
387be obtained from \cite{dtcgit}.}, is designed to make creating device
388tree blobs easier by converting a text representation of the tree
389into the necessary blob.
390
391\subsection{Input and output formats}
392
393As well as the normal mode of compiling a device tree blob from text
394source, \dtc can convert a device tree between a number of
395representations.  It can take its input in one of three different
396formats:
397\begin{itemize}
398\item source, the normal case.  The device tree is described in a text
399  form, described in \S\ref{sec:dts}.
400\item blob (\texttt{dtb}), the flattened tree format described in
401  \S\ref{sec:format}.  This mode is useful for checking a pre-existing
402  device tree blob.
403\item filesystem (\texttt{fs}), input is a directory tree in the
404  layout of \texttt{/proc/device-tree} (roughly, a directory for each
405  node in the device tree, a file for each property).  This is useful
406  for building a blob for the device tree in use by the currently
407  running kernel.
408\end{itemize}
409
410In addition, \dtc can output the tree in one of three different
411formats:
412\begin{itemize}
413\item blob (\texttt{dtb}), as in \S\ref{sec:format}.  The most
414  straightforward use of \dtc is to compile from ``source'' to
415  ``blob'' format.
416\item source (\texttt{dts}), as in \S\ref{sec:dts}.  If used with blob
417  input, this allows \dtc to act as a ``decompiler''.
418\item assembler source (\texttt{asm}).  \dtc can produce an assembler
419  file, which will assemble into a \texttt{.o} file containing the
420  device tree blob, with symbols giving the beginning of the blob and
421  its various subsections.  This can then be linked directly into a
422  bootloader or firmware image.
423\end{itemize}
424
425For maximum applicability, \dtc can both read and write any of the
426existing revisions of the blob format.  When reading, \dtc takes the
427version from the blob header, and when writing it takes a command line
428option specifying the desired version.  It automatically makes any
429necessary adjustments to the tree that are necessary for the specified
430version.  For example, formats before 0x10 require each node to have
431an explicit \texttt{name} property.  When \dtc creates such a blob, it
432will automatically generate \texttt{name} properties from the unit
433names.
434
435\subsection{Source format}
436\label{sec:dts}
437
438The ``source'' format for \dtc is a text description of the device
439tree in a vaguely C-like form.  Figure \ref{fig:dts} shows an
440example.  The file starts with \texttt{/memreserve/} directives, which
441gives address ranges to add to the output blob's memory reserve table,
442then the device tree proper is described.
443
444Nodes of the tree are introduced with the node name, followed by a
445\texttt{\{} ... \texttt{\};} block containing the node's properties
446and subnodes.  Properties are given as just {\emph{name} \texttt{=}
447  \emph{value}\texttt{;}}.  The property values can be given in any
448of three forms:
449\begin{itemize}
450\item \emph{string} (for example, \texttt{"MyBoard"}).  The property
451  value is the given string, including terminating NULL.  C-style
452  escapes (\verb+\t+, \verb+\n+, \verb+\0+ and so forth) are allowed.
453\item \emph{cells} (for example, \texttt{<0 8000 f0000000>}).  The
454  property value is made up of a list of 32-bit ``cells'', each given
455  as a hex value.
456\item \emph{bytestring} (for example, \texttt{[1234abcdef]}).  The
457  property value is given as a hex bytestring.
458\end{itemize}
459
460Cell properties can also contain \emph{references}.  Instead of a hex
461number, the source can give an ampersand (\texttt{\&}) followed by the
462full path to some node in the tree.  For example, in Figure
463\ref{fig:dts}, the \texttt{/chosen} node has an
464\texttt{interrupt-controller} property referring to the interrupt
465controller described by the node \texttt{/mpic@0x3fffdd08400}.  In the
466output tree, the value of the referenced node's phandle is included in
467the property.  If that node doesn't have an explicit phandle property,
468\dtc will automatically create a unique phandle for it.  This approach
469makes it easy to create interrupt trees without having to explicitly
470assign and remember phandles for the various interrupt controller
471nodes.
472
473The \dtc source can also include ``labels'', which are placed on a
474particular node or property.  For example, Figure \ref{fig:dts} has a
475label ``\texttt{memreg}'' on the \texttt{reg} property of the node
476\texttt{/memory@0}.  When using assembler output, corresponding labels
477in the output are generated, which will assemble into symbols
478addressing the part of the blob with the node or property in question.
479This is useful for the common case where an embedded board has an
480essentially fixed device tree with a few variable properties, such as
481the size of memory.  The bootloader for such a board can have a device
482tree linked in, including a symbol referring to the right place in the
483blob to update the parameter with the correct value determined at
484runtime.
485
486\subsection{Tree checking}
487
488Between reading in the device tree and writing it out in the new
489format, \dtc performs a number of checks on the tree:
490\begin{itemize}
491\item \emph{syntactic structure}:  \dtc checks that node and property
492  names contain only allowed characters and meet length restrictions.
493  It checks that a node does not have multiple properties or subnodes
494  with the same name.
495\item \emph{semantic structure}: In some cases, \dtc checks that
496  properties whose contents are defined by convention have appropriate
497  values.  For example, it checks that \texttt{reg} properties have a
498  length that makes sense given the address forms specified by the
499  \texttt{\#address-cells} and \texttt{\#size-cells} properties.  It
500  checks that properties such as \texttt{interrupt-parent} contain a
501  valid phandle.
502\item \emph{Linux requirements}:  \dtc checks that the device tree
503  contains those nodes and properties that are required by the Linux
504  kernel to boot correctly.
505\end{itemize}
506
507These checks are useful to catch simple problems with the device tree,
508rather than having to debug the results on an embedded kernel.  With
509the blob input mode, it can also be used for diagnosing problems with
510an existing blob.
511
512\section{Future Work}
513
514\subsection{Board ports}
515
516The flattened device tree has always been the only supported way to
517boot a \texttt{ppc64} kernel on an embedded system.  With the merge of
518\texttt{ppc32} and \texttt{ppc64} code it has also become the only
519supported way to boot any merged \texttt{powerpc} kernel, 32-bit or
52064-bit.  In fact, the old \texttt{ppc} architecture exists mainly just
521to support the old ppc32 embedded ports that have not been migrated
522to the flattened device tree approach.  We plan to remove the
523\texttt{ppc} architecture eventually, which will mean porting all the
524various embedded boards to use the flattened device tree.
525
526\subsection{\dtc features}
527
528While it is already quite usable, there are a number of extra features
529that \dtc could include to make creating device trees more convenient:
530\begin{itemize}
531\item \emph{better tree checking}: Although \dtc already performs a
532  number of checks on the device tree, they are rather haphazard.  In
533  many cases \dtc will give up after detecting a minor error early and
534  won't pick up more interesting errors later on.  There is a
535  \texttt{-f} parameter that forces \dtc to generate an output tree
536  even if there are errors.  At present, this needs to be used more
537  often than one might hope, because \dtc is bad at deciding which
538  errors should really be fatal, and which rate mere warnings.
539\item \emph{binary include}: Occasionally, it is useful for the device
540  tree to incorporate as a property a block of binary data for some
541  board-specific purpose.  For example, many of Apple's device trees
542  incorporate bytecode drivers for certain platform devices.  \dtc's
543  source format ought to allow this by letting a property's value be
544  read directly from a binary file.
545\item \emph{macros}: it might be useful for \dtc to implement some
546  sort of macros so that a tree containing a number of similar devices
547  (for example, multiple identical ethernet controllers or PCI buses)
548  can be written more quickly.  At present, this can be accomplished
549  in part by running the source file through CPP before compiling with
550  \dtc.  It's not clear whether ``native'' support for macros would be
551  more useful.
552\end{itemize}
553
554\bibliographystyle{amsplain}
555\bibliography{dtc-paper}
556
557\section*{About the authors}
558
559David Gibson has been a member of the IBM Linux Technology Center,
560working from Canberra, Australia, since 2001.  Recently he has worked
561on Linux hugepage support and performance counter support for ppc64,
562as well as the device tree compiler.  In the past, he has worked on
563bringup for various ppc and ppc64 embedded systems, the orinoco
564wireless driver, ramfs, and a userspace checkpointing system
565(\texttt{esky}).
566
567Benjamin Herrenschmidt was a MacOS developer for about 10 years, but
568ultimately saw the light and installed Linux on his Apple PowerPC
569machine.  After writing a bootloader, BootX, for it in 1998, he
570started contributing to the PowerPC Linux port in various areas,
571mostly around the support for Apple machines. He became official
572PowerMac maintainer in 2001. In 2003, he joined the IBM Linux
573Technology Center in Canberra, Australia, where he ported the 64 bit
574PowerPC kernel to Apple G5 machines and the Maple embedded board,
575among others things.  He's a member of the ppc64 development ``team''
576and one of his current goals is to make the integration of embedded
577platforms smoother and more maintainable than in the 32-bit PowerPC
578kernel.
579
580\section*{Legal Statement}
581
582This work represents the view of the author and does not necessarily
583represent the view of IBM.
584
585IBM, \ppc, \ppc Architecture, POWER5, pSeries and iSeries are
586trademarks or registered trademarks of International Business Machines
587Corporation in the United States and/or other countries.
588
589Apple and Power Macintosh are a registered trademarks of Apple
590Computer Inc. in the United States, other countries, or both.
591
592Linux is a registered trademark of Linus Torvalds.
593
594Other company, product, and service names may be trademarks or service
595marks of others.
596
597\end{document}
598