xref: /freebsd/usr.sbin/ofwdump/ofwdump.8 (revision 61e21613)
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.Dd October 23, 2023
25.Dt OFWDUMP 8
26.Os
27.Sh NAME
28.Nm ofwdump
29.Nd examine the Open Firmware device tree
30.Sh SYNOPSIS
31.Nm
32.Fl a
33.Op Fl p | P Ar property
34.Op Fl R | S
35.Nm
36.Op Fl p | P Ar property
37.Op Fl r
38.Op Fl R | S
39.Op Fl -
40.Ar nodes
41.Sh DESCRIPTION
42The
43.Nm
44utility is used to examine the Open Firmware device tree.
45In the first synopsis form, the complete device tree is printed; in the
46second form, only the selected
47.Ar nodes
48will be examined.
49.Pp
50The following options are available:
51.Bl -tag -width ".Fl P Ar property"
52.It Fl a
53Print the complete device tree.
54.It Fl p
55Print all available properties.
56.It Fl P Ar property
57Only print properties of the given name.
58.It Fl R
59Print properties in
60.Dq raw
61format, i.e., omit all headings and indentation and just write the
62property values unaltered to the standard output.
63This is intended to be used with the
64.Fl P
65option to extract the value of a single property.
66.It Fl S
67Print properties as strings; this is analogous to the
68.Fl R
69option, except that each property is only output to the first
70.Dv NUL
71character, and that newline is appended to each.
72.It Fl r
73Recursively print all children of the specified nodes.
74.El
75.Sh EXAMPLES
76Print the complete device tree:
77.Pp
78.Dl "ofwdump -a"
79.Pp
80Print the complete device subtree of the
81.Dq Li /pci
82node, including all available properties:
83.Pp
84.Dl "ofwdump -pr /pci"
85.Pp
86Print the
87.Dq Li compatible
88property of the
89.Dq Li /pci
90node as plain string:
91.Pp
92.Dl "ofwdump -P compatible -S /pci"
93.Sh SEE ALSO
94.Xr openfirm 4
95.Sh HISTORY
96The
97.Nm
98utility first appeared in
99.Fx 5.0 .
100.Sh AUTHORS
101The
102.Nm
103utility
104was written by
105.An Thomas Moestl Aq Mt tmm@FreeBSD.org .
106