xref: /freebsd/usr.sbin/ofwdump/ofwdump.8 (revision fcb560670601b2a4d87bb31d7531c8dcc37ee71b)
1.\" Copyright (c) 2002 by Thomas Moestl <tmm@FreeBSD.org>.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16.\" IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
17.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
20.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
21.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
22.\" USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23.\"
24.\" $FreeBSD$
25.\"
26.Dd October 18, 2002
27.Dt OFWDUMP 8
28.Os
29.Sh NAME
30.Nm ofwdump
31.Nd examine the Open Firmware device tree
32.Sh SYNOPSIS
33.Nm
34.Fl a
35.Op Fl p | P Ar property
36.Op Fl R | S
37.Nm
38.Op Fl p | P Ar property
39.Op Fl r
40.Op Fl R | S
41.Op Fl -
42.Ar nodes
43.Sh DESCRIPTION
44The
45.Nm
46utility is used to examine the Open Firmware device tree.
47In the first synopsis form, the complete device tree is printed; in the
48second form, only the selected
49.Ar nodes
50will be examined.
51.Pp
52The following options are available:
53.Bl -tag -width ".Fl P Ar property"
54.It Fl a
55Print the complete device tree.
56.It Fl p
57Print all available properties.
58.It Fl P Ar property
59Only print properties of the given name.
60.It Fl R
61Print properties in
62.Dq raw
63format, i.e., omit all headings and indentation and just write the
64property values unaltered to the standard output.
65This is intended to be used with the
66.Fl P
67option to extract the value of a single property.
68.It Fl S
69Print properties as strings; this is analogous to the
70.Fl R
71option, except that each property is only output to the first
72.Dv NUL
73character, and that newline is appended to each.
74.It Fl r
75Recursively print all children of the specified nodes.
76.El
77.Sh EXAMPLES
78Print the complete device tree:
79.Pp
80.Dl "ofwdump -a"
81.Pp
82Print the complete device subtree of the
83.Dq Li /pci
84node, including all available properties:
85.Pp
86.Dl "ofwdump -pr /pci"
87.Pp
88Print the
89.Dq Li compatible
90property of the
91.Dq Li /pci
92node as plain string:
93.Pp
94.Dl "ofwdump -P compatible -S /pci"
95.Sh SEE ALSO
96.Xr eeprom 8
97.Sh HISTORY
98The
99.Nm
100utility first appeared in
101.Fx 5.0 .
102.Sh AUTHORS
103The
104.Nm
105utility
106was written by
107.An Thomas Moestl Aq Mt tmm@FreeBSD.org .
108