xref: /freebsd/usr.sbin/ofwdump/ofwdump.8 (revision bcde15f5f894ece1f507ae997d17d810efae9c76)
11b6eef5bSThomas Moestl.\" Copyright (c) 2002 by Thomas Moestl <tmm@FreeBSD.org>.
21b6eef5bSThomas Moestl.\" All rights reserved.
31b6eef5bSThomas Moestl.\"
41b6eef5bSThomas Moestl.\" Redistribution and use in source and binary forms, with or without
51b6eef5bSThomas Moestl.\" modification, are permitted provided that the following conditions
61b6eef5bSThomas Moestl.\" are met:
71b6eef5bSThomas Moestl.\" 1. Redistributions of source code must retain the above copyright
81b6eef5bSThomas Moestl.\"    notice, this list of conditions and the following disclaimer.
91b6eef5bSThomas Moestl.\" 2. Redistributions in binary form must reproduce the above copyright
101b6eef5bSThomas Moestl.\"    notice, this list of conditions and the following disclaimer in the
111b6eef5bSThomas Moestl.\"    documentation and/or other materials provided with the distribution.
121b6eef5bSThomas Moestl.\"
131b6eef5bSThomas Moestl.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
141b6eef5bSThomas Moestl.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
151b6eef5bSThomas Moestl.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
161b6eef5bSThomas Moestl.\" IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
171b6eef5bSThomas Moestl.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
181b6eef5bSThomas Moestl.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
191b6eef5bSThomas Moestl.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
201b6eef5bSThomas Moestl.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
211b6eef5bSThomas Moestl.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
221b6eef5bSThomas Moestl.\" USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
231b6eef5bSThomas Moestl.\"
24*bcde15f5SMitchell Horne.Dd October 23, 2023
25748f8a50SRuslan Ermilov.Dt OFWDUMP 8
261b6eef5bSThomas Moestl.Os
271b6eef5bSThomas Moestl.Sh NAME
281b6eef5bSThomas Moestl.Nm ofwdump
291b6eef5bSThomas Moestl.Nd examine the Open Firmware device tree
301b6eef5bSThomas Moestl.Sh SYNOPSIS
311b6eef5bSThomas Moestl.Nm
321b6eef5bSThomas Moestl.Fl a
331b6eef5bSThomas Moestl.Op Fl p | P Ar property
341b6eef5bSThomas Moestl.Op Fl R | S
351b6eef5bSThomas Moestl.Nm
361b6eef5bSThomas Moestl.Op Fl p | P Ar property
371b6eef5bSThomas Moestl.Op Fl r
381b6eef5bSThomas Moestl.Op Fl R | S
391b6eef5bSThomas Moestl.Op Fl -
401b6eef5bSThomas Moestl.Ar nodes
411b6eef5bSThomas Moestl.Sh DESCRIPTION
421b6eef5bSThomas MoestlThe
431b6eef5bSThomas Moestl.Nm
441b6eef5bSThomas Moestlutility is used to examine the Open Firmware device tree.
451b6eef5bSThomas MoestlIn the first synopsis form, the complete device tree is printed; in the
461b6eef5bSThomas Moestlsecond form, only the selected
471b6eef5bSThomas Moestl.Ar nodes
481b6eef5bSThomas Moestlwill be examined.
491b6eef5bSThomas Moestl.Pp
501b6eef5bSThomas MoestlThe following options are available:
511b6eef5bSThomas Moestl.Bl -tag -width ".Fl P Ar property"
521b6eef5bSThomas Moestl.It Fl a
531b6eef5bSThomas MoestlPrint the complete device tree.
541b6eef5bSThomas Moestl.It Fl p
551b6eef5bSThomas MoestlPrint all available properties.
561b6eef5bSThomas Moestl.It Fl P Ar property
571b6eef5bSThomas MoestlOnly print properties of the given name.
581b6eef5bSThomas Moestl.It Fl R
591b6eef5bSThomas MoestlPrint properties in
601b6eef5bSThomas Moestl.Dq raw
6107bfccd7SRuslan Ermilovformat, i.e., omit all headings and indentation and just write the
6267001526SRuslan Ermilovproperty values unaltered to the standard output.
6367001526SRuslan ErmilovThis is intended to be used with the
641b6eef5bSThomas Moestl.Fl P
651b6eef5bSThomas Moestloption to extract the value of a single property.
661b6eef5bSThomas Moestl.It Fl S
671b6eef5bSThomas MoestlPrint properties as strings; this is analogous to the
681b6eef5bSThomas Moestl.Fl R
691b6eef5bSThomas Moestloption, except that each property is only output to the first
701b6eef5bSThomas Moestl.Dv NUL
711b6eef5bSThomas Moestlcharacter, and that newline is appended to each.
721b6eef5bSThomas Moestl.It Fl r
731b6eef5bSThomas MoestlRecursively print all children of the specified nodes.
741b6eef5bSThomas Moestl.El
751b6eef5bSThomas Moestl.Sh EXAMPLES
761b6eef5bSThomas MoestlPrint the complete device tree:
771b6eef5bSThomas Moestl.Pp
7867001526SRuslan Ermilov.Dl "ofwdump -a"
791b6eef5bSThomas Moestl.Pp
801b6eef5bSThomas MoestlPrint the complete device subtree of the
811b6eef5bSThomas Moestl.Dq Li /pci
821b6eef5bSThomas Moestlnode, including all available properties:
831b6eef5bSThomas Moestl.Pp
8467001526SRuslan Ermilov.Dl "ofwdump -pr /pci"
851b6eef5bSThomas Moestl.Pp
861b6eef5bSThomas MoestlPrint the
871b6eef5bSThomas Moestl.Dq Li compatible
881b6eef5bSThomas Moestlproperty of the
891b6eef5bSThomas Moestl.Dq Li /pci
901b6eef5bSThomas Moestlnode as plain string:
911b6eef5bSThomas Moestl.Pp
9267001526SRuslan Ermilov.Dl "ofwdump -P compatible -S /pci"
93*bcde15f5SMitchell Horne.Sh SEE ALSO
94*bcde15f5SMitchell Horne.Xr openfirm 4
951b6eef5bSThomas Moestl.Sh HISTORY
961b6eef5bSThomas MoestlThe
971b6eef5bSThomas Moestl.Nm
981b6eef5bSThomas Moestlutility first appeared in
991b6eef5bSThomas Moestl.Fx 5.0 .
1001b6eef5bSThomas Moestl.Sh AUTHORS
10167001526SRuslan ErmilovThe
1021b6eef5bSThomas Moestl.Nm
10367001526SRuslan Ermilovutility
1041b6eef5bSThomas Moestlwas written by
10501c2b8acSBaptiste Daroussin.An Thomas Moestl Aq Mt tmm@FreeBSD.org .
106