summaryrefslogtreecommitdiff
path: root/static/netbsd/man9/man9.x86
diff options
context:
space:
mode:
Diffstat (limited to 'static/netbsd/man9/man9.x86')
-rw-r--r--static/netbsd/man9/man9.x86/rdmsr.9 3.html87
-rw-r--r--static/netbsd/man9/man9.x86/tsc.9 3.html102
2 files changed, 0 insertions, 189 deletions
diff --git a/static/netbsd/man9/man9.x86/rdmsr.9 3.html b/static/netbsd/man9/man9.x86/rdmsr.9 3.html
deleted file mode 100644
index e964d37b..00000000
--- a/static/netbsd/man9/man9.x86/rdmsr.9 3.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<table class="head">
- <tr>
- <td class="head-ltitle">RDMSR(9)</td>
- <td class="head-vol">Kernel Developer's Manual (x86)</td>
- <td class="head-rtitle">RDMSR(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">msr</code>, <code class="Nm">rdmsr</code>,
- <code class="Nm">rdmsr_safe</code>, <code class="Nm">wrmsr</code> &#x2014;
- <span class="Nd">functions for x86 MSRs</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">x86/cpufunc.h</a>&gt;</code></p>
-<p class="Pp"><var class="Ft">uint64_t</var>
- <br/>
- <code class="Fn">rdmsr</code>(<var class="Fa" style="white-space: nowrap;">u_int
- msr</var>);</p>
-<p class="Pp"><var class="Ft">int</var>
- <br/>
- <code class="Fn">rdmsr_safe</code>(<var class="Fa" style="white-space: nowrap;">u_int
- msr</var>, <var class="Fa" style="white-space: nowrap;">uint64_t
- *valp</var>);</p>
-<p class="Pp"><var class="Ft">void</var>
- <br/>
- <code class="Fn">wrmsr</code>(<var class="Fa" style="white-space: nowrap;">u_int
- msr</var>, <var class="Fa" style="white-space: nowrap;">uint64_t
- val</var>);</p>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
-<p class="Pp">The <code class="Dv">RDMSR</code> instruction reads from a x86
- model-specific register (<code class="Dv">MSR</code>). Conversely, the
- <code class="Dv">WRMSR</code> instruction is used to write to a
- <code class="Dv">MSR</code>. In <span class="Ux">NetBSD</span> the
- <a class="permalink" href="#rdmsr"><code class="Fn" id="rdmsr">rdmsr</code></a>(),
- <code class="Fn">rdmsr_safe</code>(), and
- <a class="permalink" href="#wrmsr"><code class="Fn" id="wrmsr">wrmsr</code></a>()
- functions are used to access <code class="Dv">MSRs</code>. The header
- <code class="In">&lt;<a class="In">x86/specialreg.h</a>&gt;</code> includes
- definitions for some of the commonly used MSRs, that is, control registers
- that are present in some x86 processor models but unavailable in others.</p>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="FUNCTIONS"><a class="permalink" href="#FUNCTIONS">FUNCTIONS</a></h1>
-<dl class="Bl-tag">
- <dt><code class="Fn">rdmsr</code>(<var class="Fa">msr</var>)</dt>
- <dd>Returns the value read from <var class="Fa">msr</var>.</dd>
- <dt><code class="Fn">rdmsr_safe</code>(<var class="Fa">msr</var>,
- <var class="Fa">valp</var>)</dt>
- <dd>The <code class="Fn">rdmsr_safe</code>() function is a safer variant of
- <code class="Fn">rdmsr</code>(). Upon successful completion, the function
- returns zero and the value read from the register
- <var class="Fa">msr</var> is returned in <var class="Fa">valp</var>. If a
- fault occurs while accessing <var class="Fa">msr</var>,
- <code class="Fn">rdmsr_safe</code>() returns
- <code class="Dv">EFAULT</code>.</dd>
- <dt><code class="Fn">wrmsr</code>(<var class="Fa">msr</var>,
- <var class="Fa">val</var>)</dt>
- <dd>The <code class="Fn">wrmsr</code>() function writes
- <var class="Fa">val</var> to the register <var class="Fa">msr</var>.</dd>
-</dl>
-<p class="Pp" id="rdmsr_safe">Note that even though
- <a class="permalink" href="#rdmsr_safe"><code class="Fn">rdmsr_safe</code></a>()
- provides support for reading <code class="Dv">MSRs</code> in a safe manner,
- it is still a good practice to always verify that the given model-specific
- register is present by using the <code class="Dv">CPUID</code> instruction,
- available in <span class="Ux">NetBSD</span> via
- <a class="permalink" href="#x86_cpuid"><code class="Fn" id="x86_cpuid">x86_cpuid</code></a>().</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">rdtsc(9)</a>,
- <a class="Xr">x86/x86_msr_xcall(9)</a></p>
-</section>
-</div>
-<table class="foot">
- <tr>
- <td class="foot-date">February 17, 2017</td>
- <td class="foot-os">NetBSD 10.1</td>
- </tr>
-</table>
diff --git a/static/netbsd/man9/man9.x86/tsc.9 3.html b/static/netbsd/man9/man9.x86/tsc.9 3.html
deleted file mode 100644
index cf839df4..00000000
--- a/static/netbsd/man9/man9.x86/tsc.9 3.html
+++ /dev/null
@@ -1,102 +0,0 @@
-<table class="head">
- <tr>
- <td class="head-ltitle">TSC(9)</td>
- <td class="head-vol">Kernel Developer's Manual (x86)</td>
- <td class="head-rtitle">TSC(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">tsc</code> &#x2014; <span class="Nd">Time Stamp
- Counter</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">x86/x86/tsc.h</a>&gt;</code></p>
-<p class="Pp"><var class="Ft">uint64_t</var>
- <br/>
- <code class="Fn">rdtsc</code>(<var class="Fa" style="white-space: nowrap;">void</var>);</p>
-<p class="Pp"><var class="Ft">void</var>
- <br/>
- <code class="Fn">tsc_tc_init</code>(<var class="Fa" style="white-space: nowrap;">void</var>);</p>
-<p class="Pp"><var class="Ft">void</var>
- <br/>
- <code class="Fn">tsc_sync_ap</code>(<var class="Fa" style="white-space: nowrap;">struct
- cpu_info *ci</var>);</p>
-<p class="Pp"><var class="Ft">void</var>
- <br/>
- <code class="Fn">tsc_sync_bp</code>(<var class="Fa" style="white-space: nowrap;">struct
- cpu_info *ci</var>);</p>
-<p class="Pp"><var class="Ft">void</var>
- <br/>
- <code class="Fn">tsc_sync_drift</code>(<var class="Fa" style="white-space: nowrap;">int64_t
- drift</var>);</p>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
-<p class="Pp">The time stamp counter (TSC) is a hardware counter found in all
- contemporary x86 processors. The counter is implemented as a 64-bit
- model-specific register (MSR) that is incremented at every clock cycle. The
- RDTSC (&#x201C;read time stamp counter&#x201D;) register has been present
- since the original Pentium.</p>
-<p class="Pp">Already because of the access method, TSC provides a low-overhead
- and high-resolution way to obtain CPU timing information. This traditional
- premise was violated when such factors as system sleep states, CPU
- &#x201C;hotplugging&#x201D;, &#x201C;hibernation&#x201D;, and CPU frequency
- scaling were introduced to the x86 lineage. This was however mainly a short
- abruption: in many new x86 CPUs the time stamp counter is again invariant
- with respect to the stability of the clock frequency. Care should be however
- taken in implementations that rely on this assumption.</p>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="FUNCTIONS"><a class="permalink" href="#FUNCTIONS">FUNCTIONS</a></h1>
-<dl class="Bl-tag">
- <dt id="rdtsc"><a class="permalink" href="#rdtsc"><code class="Fn">rdtsc</code></a>(<var class="Fa"></var>)</dt>
- <dd>The <code class="Fn">rdtsc</code>() function returns the value read from
- <code class="Dv">RDTSC</code>.</dd>
- <dt id="tsc_tc_init"><a class="permalink" href="#tsc_tc_init"><code class="Fn">tsc_tc_init</code></a>(<var class="Fa"></var>)</dt>
- <dd>The <code class="Fn">tsc_tc_init</code>() function initializes the TSC as
- a <a class="Xr">timecounter(9)</a>. The function is called early in the
- boot process when the processors attach.</dd>
- <dt><code class="Fn">tsc_sync_bp</code>(<var class="Fa">ci</var>)</dt>
- <dd>The <code class="Fn">tsc_sync_bp</code>() function synchronizes the
- counter for the boot processor (BP). The supplied <var class="Fa">ci</var>
- must refer to the BP itself. The <code class="Nm">tsc</code> interface
- takes internally care of such issues as out-of-order execution, where
- instructions are not necessarily performed in the order of execution,
- possibly causing a misleading cycle count.</dd>
- <dt><code class="Fn">tsc_sync_ap</code>(<var class="Fa">ci</var>)</dt>
- <dd>The <code class="Fn">tsc_sync_ap</code>() function synchronize the counter
- for the application processor <var class="Fa">ci</var>. Interrupts must be
- off at machine-level when the function is called.
- <p class="Pp" id="tsc_sync_ap">It is necessary to call both
- <a class="permalink" href="#tsc_sync_ap"><code class="Fn">tsc_sync_ap</code></a>()
- and
- <a class="permalink" href="#tsc_sync_bp"><code class="Fn" id="tsc_sync_bp">tsc_sync_bp</code></a>()
- during the boot, but additional synchronization may be required also
- during runtime. As an example, the TSC needs to be synchronized for all
- processors when the system resumes from an <a class="Xr">acpi(4)</a>
- sleep state.</p>
- </dd>
- <dt id="tsc_sync_drift"><a class="permalink" href="#tsc_sync_drift"><code class="Fn">tsc_sync_drift</code></a>(<var class="Fa">drift</var>)</dt>
- <dd>Finally, the <code class="Fn">tsc_sync_drift</code>() function records
- <var class="Fa">drift</var>, measured in clock cycles. This is called when
- the APs attach.</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">gettimeofday(2)</a>, <a class="Xr">hpet(4)</a>,
- <a class="Xr">hz(9)</a>, <a class="Xr">timecounter(9)</a>,
- <a class="Xr">x86/rdmsr(9)</a></p>
-</section>
-</div>
-<table class="foot">
- <tr>
- <td class="foot-date">February 17, 2017</td>
- <td class="foot-os">NetBSD 10.1</td>
- </tr>
-</table>