summaryrefslogtreecommitdiff
path: root/static/freebsd/man9/bus_activate_resource.9 3.html
diff options
context:
space:
mode:
Diffstat (limited to 'static/freebsd/man9/bus_activate_resource.9 3.html')
-rw-r--r--static/freebsd/man9/bus_activate_resource.9 3.html115
1 files changed, 0 insertions, 115 deletions
diff --git a/static/freebsd/man9/bus_activate_resource.9 3.html b/static/freebsd/man9/bus_activate_resource.9 3.html
deleted file mode 100644
index e9e89e4c..00000000
--- a/static/freebsd/man9/bus_activate_resource.9 3.html
+++ /dev/null
@@ -1,115 +0,0 @@
-<table class="head">
- <tr>
- <td class="head-ltitle">BUS_ACTIVATE_RESOURCE(9)</td>
- <td class="head-vol">Kernel Developer's Manual</td>
- <td class="head-rtitle">BUS_ACTIVATE_RESOURCE(9)</td>
- </tr>
-</table>
-<div class="manual-text">
-<section class="Sh">
-<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
-<p class="Pp"><code class="Nm">bus_activate_resource</code>,
- <code class="Nm">bus_deactivate_resource</code> &#x2014;
- <span class="Nd">activate or deactivate a resource</span></p>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
-<p class="Pp"><code class="In">#include
- &lt;<a class="In">sys/param.h</a>&gt;</code>
- <br/>
- <code class="In">#include &lt;<a class="In">sys/bus.h</a>&gt;</code></p>
-<p class="Pp">
- <br/>
- <code class="In">#include &lt;<a class="In">machine/bus.h</a>&gt;</code>
- <br/>
- <code class="In">#include &lt;<a class="In">sys/rman.h</a>&gt;</code>
- <br/>
- <code class="In">#include
- &lt;<a class="In">machine/resource.h</a>&gt;</code></p>
-<p class="Pp"><var class="Ft">int</var>
- <br/>
- <code class="Fn">bus_activate_resource</code>(<var class="Fa">device_t
- dev</var>, <var class="Fa">struct resource *r</var>);</p>
-<p class="Pp"><var class="Ft">int</var>
- <br/>
- <code class="Fn">bus_deactivate_resource</code>(<var class="Fa">device_t
- dev</var>, <var class="Fa">struct resource *r</var>);</p>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
-<p class="Pp">These functions activate or deactivate a previously allocated
- resource. In general, resources must be activated before they can be
- accessed by the driver. Bus drivers may perform additional actions to ensure
- that the resource is ready to be accessed. For example, the PCI bus driver
- enables memory decoding in a PCI device's command register when activating a
- memory resource.</p>
-<p class="Pp">The arguments are as follows:</p>
-<dl class="Bl-tag">
- <dt><var class="Fa">dev</var></dt>
- <dd>The device that requests ownership of the resource. Before allocation, the
- resource is owned by the parent bus.</dd>
- <dt><var class="Fa">r</var></dt>
- <dd>A pointer to the <var class="Vt">struct resource</var> returned by
- <a class="Xr">bus_alloc_resource(9)</a>.</dd>
-</dl>
-<section class="Ss">
-<h2 class="Ss" id="Resource_Mapping"><a class="permalink" href="#Resource_Mapping">Resource
- Mapping</a></h2>
-<p class="Pp">Resources which can be mapped for CPU access by a
- <a class="Xr">bus_space(9)</a> tag and handle will create a mapping of the
- entire resource when activated. The tag and handle for this mapping are
- stored in <var class="Fa">r</var> and can be retrieved via
- <a class="Xr">rman_get_bustag(9)</a> and
- <a class="Xr">rman_get_bushandle(9)</a>. These can be used with the
- <a class="Xr">bus_space(9)</a> API to access device registers or memory
- described by <var class="Fa">r</var>. If the mapping is associated with a
- virtual address, the virtual address can be retrieved via
- <a class="Xr">rman_get_virtual(9)</a>.</p>
-<p class="Pp">This implicit mapping can be disabled by passing the
- <code class="Dv">RF_UNMAPPED</code> flag to
- <a class="Xr">bus_alloc_resource(9)</a>. A driver may use this if it wishes
- to allocate its own mappings of a resource using
- <a class="Xr">bus_map_resource(9)</a>.</p>
-<p class="Pp" id="bus_read_4">A wrapper API for <a class="Xr">bus_space(9)</a>
- is also provided that accepts the associated resource as the first argument
- in place of the <a class="Xr">bus_space(9)</a> tag and handle. The functions
- in this wrapper API are named similarly to the
- <a class="Xr">bus_space(9)</a> API except that &#x201C;_space&#x201D; is
- removed from their name. For example,
- <a class="permalink" href="#bus_read_4"><code class="Fn">bus_read_4</code></a>()
- can be used in place of
- <a class="permalink" href="#bus_space_read_4"><code class="Fn" id="bus_space_read_4">bus_space_read_4</code></a>().
- The wrapper API is preferred in new drivers.</p>
-<p class="Pp">These two statements both read a 32-bit register at the start of a
- resource:</p>
-<div class="Bd Pp Li">
-<pre> bus_space_read_4(rman_get_bustag(res), rman_get_bushandle(res), 0);
- bus_read_4(res, 0);</pre>
-</div>
-</section>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
- VALUES</a></h1>
-<p class="Pp">Zero is returned on success, otherwise an error is returned.</p>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
- ALSO</a></h1>
-<p class="Pp"><a class="Xr">bus_alloc_resource(9)</a>,
- <a class="Xr">bus_map_resource(9)</a>, <a class="Xr">bus_space(9)</a>,
- <a class="Xr">device(9)</a>, <a class="Xr">driver(9)</a></p>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
-<p class="Pp">This manual page was written by <span class="An">Warner
- Losh</span>
- &lt;<a class="Mt" href="mailto:imp@FreeBSD.org">imp@FreeBSD.org</a>&gt;.</p>
-</section>
-</div>
-<table class="foot">
- <tr>
- <td class="foot-date">March 13, 2024</td>
- <td class="foot-os">FreeBSD 15.0</td>
- </tr>
-</table>