diff options
Diffstat (limited to 'static/netbsd/man9/man9.x86/tsc.9 3.html')
| -rw-r--r-- | static/netbsd/man9/man9.x86/tsc.9 3.html | 102 |
1 files changed, 0 insertions, 102 deletions
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> — <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 - <<a class="In">x86/x86/tsc.h</a>></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 (“read time stamp counter”) 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 - “hotplugging”, “hibernation”, 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> |
