Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Apr 2026 11:04:24 +0000
From:      bugzilla-noreply@freebsd.org
To:        doc@FreeBSD.org
Subject:   [Bug 294793] ofw(4) manpage
Message-ID:  <bug-294793-9-hUgsfzUsIl@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-294793-9@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294793

B1nc0d3x <b1nc0d3x@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #270120|0                           |1
           is patch|                            |

--- Comment #1 from B1nc0d3x <b1nc0d3x@gmail.com> ---
Comment on attachment 270120
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=270120
Manpage for ofw(4)

>.\"-
>.\" Copyright (c) 2025 Kyle Crenshaw <b1nc0d3x>
>.\" All rights reserved.
>.\"
>.\" Redistribution and use in source and binary forms, with or without
>.\" modification, are permitted provided that the following conditions
>.\" are met:
>.\" 1. Redistributions of source code must retain the above copyright
>.\"    notice, this list of conditions and the following disclaimer.
>.\" 2. Redistributions in binary form must reproduce the above copyright
>.\"    notice, this list of conditions and the following disclaimer in the
>.\"    documentation and/or other materials provided with the distribution.
>.\"
>.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
>.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
>.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
>.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
>.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
>.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
>.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
>.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
>.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
>.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>.\"
>.Dd April 25, 2025
>.Dt OFW 4
>.Os
>.Sh NAME
>.Nm ofw
>.Nd Open Firmware device tree bus
>.Sh SYNOPSIS
>.Cd "options FDT"
>.Sh DESCRIPTION
>The
>.Nm
>driver, also known as
>.Nm ofwbus ,
>is a pseudo-bus that enumerates top-level devices from the
>Open Firmware device tree and attaches them as children in the
>.Xr newbus 9
>device hierarchy.
>There is at most one
>.Nm ofwbus
>instance in the system; it attaches directly as a child of the root nexus.
>.Pp
>Open Firmware
>.Pq OF
>is a platform-independent firmware interface described by
>IEEE Std 1275-1994.
>It provides a hierarchical device tree that describes the hardware
>resources present on a system.
>Nodes in the tree represent devices and buses; each node carries a set of
>named properties that encode addresses, interrupt routing, and other
>configuration data.
>.Pp
>The
>.Nm
>driver iterates over the direct children of the Open Firmware root node
>and instantiates a
>.Xr newbus 9
>device for each one.
>Child drivers use the kernel OFW interface
>.Pq see Xr OF_getprop 9 , Xr OF_child 9
>to query device tree properties and configure their hardware.
>.Pp
>The following OFW backend implementations are supported:
>.Bl -tag -width "ofw_32bit"
>.It Cm ofw_std
>Standard IEEE 1275 client-interface, used on platforms where
>Open Firmware is directly callable from supervisor mode
>.Pq e.g., 32-bit PowerPC .
>.It Cm ofw_real
>Real-mode Open Firmware interface, used on platforms where the firmware
>must be called in real (physical) addressing mode
>.Pq e.g., some 64-bit PowerPC implementations .
>.It Cm ofw_32bit
>32-bit compatibility Open Firmware interface for 64-bit platforms
>that provide a 32-bit firmware call ABI.
>.It Cm ofw_fdt
>Flattened Device Tree
>.Pq FDT
>backend.
>This is selected when the
>.Cd "options FDT"
>kernel option is set.
>Instead of a live firmware call interface,
>.Cm ofw_fdt
>interprets a static binary device tree blob
>.Pq DTB
>passed by the bootloader.
>This backend is used on ARM, ARM64, and RISC-V platforms.
>.El
>.Pp
>The backend is selected early during boot, before newbus initialisation,
>by calling
>.Fn OF_install
>with the appropriate name string, then
>.Fn OF_init
>with the firmware entry point or device tree blob address as a cookie.
>.Pp
>A userspace interface to the device tree is provided by the
>.Pa /dev/openfirm
>character device; see
>.Xr openfirm 4
>for a description of the
>.Xr ioctl 2
>operations it supports.
>The
>.Xr ofwdump 8
>utility may be used to examine the device tree from the command line.
>.Sh FILES
>.Bl -tag -width ".Pa /dev/openfirm" -compact
>.It Pa /dev/openfirm
>Userspace interface to the Open Firmware device tree
>.El
>.Sh SEE ALSO
>.Xr fdt 4 ,
>.Xr openfirm 4 ,
>.Xr simplebus 4 ,
>.Xr ofwdump 8 ,
>.Xr OF_child 9 ,
>.Xr OF_getprop 9 ,
>.Xr OF_node_from_xref 9
>.Sh STANDARDS
>.Rs
>.%Q "IEEE Standards Organization"
>.%B "IEEE Std 1275-1994: IEEE Standard for Boot (Initialization Configuration) Firmware: Core Requirements and Practices"
>.%O "ISBN 1-55937-426-8"
>.Re
>.Sh HISTORY
>Open Firmware support first appeared in
>.Fx 5.0 .
>The
>.Cm ofw_fdt
>backend was added in
>.Fx 9.0 .
>.Sh AUTHORS
>.An -nosplit
>The
>.Nm
>driver was written by
>.An Benno Rice Aq Mt benno@FreeBSD.org .
>The
>.Cm ofw_fdt
>backend was written by
>.An Rafal Jaworowski
>under sponsorship from the
>.Fx
>Foundation.
>This manual page was written by
>.An Kyle Crenshaw <b1nc0d3x> Aq Mt b1nc0d3x@gmail.com .

-- 
You are receiving this mail because:
You are on the CC list for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-294793-9-hUgsfzUsIl>