diff options
Diffstat (limited to 'static/netbsd/man4/man4.prep/nvram.4 3.html')
| -rw-r--r-- | static/netbsd/man4/man4.prep/nvram.4 3.html | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/static/netbsd/man4/man4.prep/nvram.4 3.html b/static/netbsd/man4/man4.prep/nvram.4 3.html new file mode 100644 index 00000000..b4823126 --- /dev/null +++ b/static/netbsd/man4/man4.prep/nvram.4 3.html @@ -0,0 +1,89 @@ +<table class="head"> + <tr> + <td class="head-ltitle">NVRAM(4)</td> + <td class="head-vol">Device Drivers Manual (prep)</td> + <td class="head-rtitle">NVRAM(4)</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">nvram</code> — <span class="Nd">PReP nvram + interface</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 + <<a class="In">machine/nvram.h</a>></code></p> +</section> +<section class="Sh"> +<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1> +<p class="Pp">The file <code class="Nm">/dev/nvram</code> is an interface to the + PReP NVRAM, including the Global Environment Area. This interface is highly + stylized; ioctls are used for all operations. These ioctls refer to + individual variables in the Global Environment Area and their values.</p> +<p class="Pp">The calls that take and/or return a variable use a pointer to an + <code class="Li">int</code> variable for this purpose; others use a pointer + to an <code class="Li">struct pnviocdesc</code> descriptor, which contains a + variable and two counted strings. The first string comprises the fields + <code class="Li">pnv_namelen</code> (an <code class="Li">int</code>) and + <code class="Li">pnv_name</code> (a <code class="Li">char *</code>), giving + the name of a field. The second string comprises the fields + <code class="Li">pnv_buflen</code> and <code class="Li">pnv_buf</code>, used + analogously. These two counted strings work in a + “value-result” fashion. At entry to the ioctl, the counts are + expected to reflect the buffer size; on return, the counts are updated to + reflect the buffer contents.</p> +<p class="Pp">The following ioctls are supported:</p> +<dl class="Bl-tag"> + <dt>PNVIOCGETNEXTNAME</dt> + <dd>Takes a variable name and returns the name of the following variable. If a + <code class="Dv">NULL</code> is passed as the variable name, the first + variable name will be returned. If the last variable is given as an + argument, the ioctl will return <code class="Er">EINVAL</code>.</dd> + <dt id="PNVIOCGET"><a class="permalink" href="#PNVIOCGET"><code class="Dv">PNVIOCGET</code></a></dt> + <dd>Fills in the value of the named property for the given variable. If no + such property is associated with that variable, the value length is set to + -1. If the named property exists but has no value, the value length is set + to 0.</dd> + <dt id="PNVIOCSET"><a class="permalink" href="#PNVIOCSET"><code class="Dv">PNVIOCSET</code></a></dt> + <dd>Writes the given value under the given name.</dd> + <dt id="PNVIOCGETNUMGE"><a class="permalink" href="#PNVIOCGETNUMGE"><code class="Dv">PNVIOCGETNUMGE</code></a></dt> + <dd>Returns the number of variables in the Global Environment Area.</dd> +</dl> +</section> +<section class="Sh"> +<h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1> +<p class="Pp"><span class="Pa">/dev/nvram</span></p> +</section> +<section class="Sh"> +<h1 class="Sh" id="ERRORS"><a class="permalink" href="#ERRORS">ERRORS</a></h1> +<p class="Pp">The following may result in rejection of an operation:</p> +<dl class="Bl-tag"> + <dt id="EINVAL">[<a class="permalink" href="#EINVAL"><code class="Er">EINVAL</code></a>]</dt> + <dd>The given variable name does not exist; or the buffer set up to retrieve + values from the nvram was not large enough to hold the result.</dd> +</dl> +</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">ioctl(2)</a></p> +<p class="Pp"><span class="Pa">PowerPC Reference Platform Specification Version + 1.1, Section 5.5</span></p> +</section> +<section class="Sh"> +<h1 class="Sh" id="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h1> +<p class="Pp">Due to limitations within the <code class="Nm">nvram</code> + itself, these functions run at elevated priority and may adversely affect + system performance.</p> +<p class="Pp"><code class="Dv">PNVIOCSET</code> is not currently supported, + making the <code class="Nm">nvram</code> driver read-only at this time.</p> +</section> +</div> +<table class="foot"> + <tr> + <td class="foot-date">March 1, 2007</td> + <td class="foot-os">NetBSD 10.1</td> + </tr> +</table> |
