⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pentiumalib.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/pentiumALib.html - generated by refgen from ../i86/pentiumALib.s --> <title> pentiumALib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>VxWorks Reference Manual :  Libraries</i></a></p></blockquote><h1>pentiumALib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>pentiumALib</strong> - Pentium and PentiumPro specific routines </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./pentiumALib.html#pentiumCr4Get">pentiumCr4Get</a></i>(&nbsp;)</b>  -  get contents of CR4 register<br><b><i><a href="./pentiumALib.html#pentiumCr4Set">pentiumCr4Set</a></i>(&nbsp;)</b>  -  sets specified value to the CR4 register<br><b><i><a href="./pentiumALib.html#pentiumPmcStart">pentiumPmcStart</a></i>(&nbsp;)</b>  -  start both PMC0 and PMC1<br><b><i><a href="./pentiumALib.html#pentiumPmcStop">pentiumPmcStop</a></i>(&nbsp;)</b>  -  stop both PMC0 and PMC1<br><b><i><a href="./pentiumALib.html#pentiumPmcStop1">pentiumPmcStop1</a></i>(&nbsp;)</b>  -  stop PMC1<br><b><i><a href="./pentiumALib.html#pentiumPmcGet">pentiumPmcGet</a></i>(&nbsp;)</b>  -  get the contents of PMC0 and PMC1<br><b><i><a href="./pentiumALib.html#pentiumPmcGet0">pentiumPmcGet0</a></i>(&nbsp;)</b>  -  get the contents of PMC0<br><b><i><a href="./pentiumALib.html#pentiumPmcGet1">pentiumPmcGet1</a></i>(&nbsp;)</b>  -  get the contents of PMC1<br><b><i><a href="./pentiumALib.html#pentiumPmcReset">pentiumPmcReset</a></i>(&nbsp;)</b>  -  reset both PMC0 and PMC1<br><b><i><a href="./pentiumALib.html#pentiumPmcReset0">pentiumPmcReset0</a></i>(&nbsp;)</b>  -  reset PMC0<br><b><i><a href="./pentiumALib.html#pentiumPmcReset1">pentiumPmcReset1</a></i>(&nbsp;)</b>  -  reset PMC1<br><b><i><a href="./pentiumALib.html#pentiumTscGet64">pentiumTscGet64</a></i>(&nbsp;)</b>  -  get 64Bit TSC (Timestamp Counter)<br><b><i><a href="./pentiumALib.html#pentiumTscGet32">pentiumTscGet32</a></i>(&nbsp;)</b>  -  get the lower half of the 64Bit TSC (Timestamp Counter)<br><b><i><a href="./pentiumALib.html#pentiumTscReset">pentiumTscReset</a></i>(&nbsp;)</b>  -  reset the TSC (Timestamp Counter)<br><b><i><a href="./pentiumALib.html#pentiumMsrGet">pentiumMsrGet</a></i>(&nbsp;)</b>  -  get the contents of the specified MSR (Model Specific Register)<br><b><i><a href="./pentiumALib.html#pentiumMsrSet">pentiumMsrSet</a></i>(&nbsp;)</b>  -  set a value to the specified MSR (Model Specific Registers)<br><b><i><a href="./pentiumALib.html#pentiumTlbFlush">pentiumTlbFlush</a></i>(&nbsp;)</b>  -  flush TLBs (Translation Lookaside Buffers)<br><b><i><a href="./pentiumALib.html#pentiumSerialize">pentiumSerialize</a></i>(&nbsp;)</b>  -  execute a serializing instruction CPUID<br><b><i><a href="./pentiumALib.html#pentiumBts">pentiumBts</a></i>(&nbsp;)</b>  -  execute atomic compare-and-exchange instruction to set a bit<br><b><i><a href="./pentiumALib.html#pentiumBtc">pentiumBtc</a></i>(&nbsp;)</b>  -  execute atomic compare-and-exchange instruction to clear a bit<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This module contains Pentium and PentiumPro specific routines written in assembly language.<p></blockQuote><h4>MCA (Machine Check Architecture)</h4><blockQuote>The Pentium processor introduced a new exception called the machine-check exception (interrupt-18).  This exception is used to signal hardware-relatederrors, such as a parity error on a read cycle.  The PentiumPro processorextends the types of errors that can be detected and that generate a machine-check exception.  It also provides a new machine-check architecture thatrecords information about a machine-check error and provides the basis for anextended error logging capability.<p>MCA is enabled and its status registers are cleared zero in <b><i><a href="./sysLib.html#sysHwInit">sysHwInit</a></i>(&nbsp;)</b>.Its registers are accessed by <b><i><a href="./pentiumALib.html#pentiumMsrSet">pentiumMsrSet</a></i>(&nbsp;)</b> and <b><i><a href="./pentiumALib.html#pentiumMsrGet">pentiumMsrGet</a></i>(&nbsp;)</b>.<p></blockQuote><h4>PMC (Performance Monitoring Counters)</h4><blockQuote>The PentiumPro processor has two performance-monitoring counters for use inmonitoring internal hardware operations.  These counters are duration or eventcounters that can be programmed to count any of approximately 100 differenttypes of events, such as the number of instructions decoded, number of interrupts received, or number of cache loads.<p>There are nine routines to interface the PMC.  These nine routines are:<pre>  STATUS pentiumPmcStart         (         int pmcEvtSel0;        /* performance event select register 0 */         int pmcEvtSel1;        /* performance event select register 1 */         )  void   pentiumPmcStop (void)  void   pentiumPmcStop1 (void)  void   pentiumPmcGet         (         long long int * pPmc0; /* performance monitoring counter 0 */         long long int * pPmc1; /* performance monitoring counter 1 */         )  void   pentiumPmcGet0         (         long long int * pPmc0; /* performance monitoring counter 0 */         )  void   pentiumPmcGet1         (         long long int * pPmc1; /* performance monitoring counter 1 */         )  void   pentiumPmcReset (void)  void   pentiumPmcReset0 (void)  void   pentiumPmcReset1 (void)</pre><b><i><a href="./pentiumALib.html#pentiumPmcStart">pentiumPmcStart</a></i>(&nbsp;)</b> starts both PMC0 and PMC1. <b><i><a href="./pentiumALib.html#pentiumPmcStop">pentiumPmcStop</a></i>(&nbsp;)</b> stops them, and <b><i><a href="./pentiumALib.html#pentiumPmcStop1">pentiumPmcStop1</a></i>(&nbsp;)</b> stops only PMC1.  <b><i><a href="./pentiumALib.html#pentiumPmcGet">pentiumPmcGet</a></i>(&nbsp;)</b> gets contents of PMC0 and PMC1.  <b><i><a href="./pentiumALib.html#pentiumPmcGet0">pentiumPmcGet0</a></i>(&nbsp;)</b> getscontents of PMC0, and <b><i><a href="./pentiumALib.html#pentiumPmcGet1">pentiumPmcGet1</a></i>(&nbsp;)</b> gets contents of PMC1.<b><i><a href="./pentiumALib.html#pentiumPmcReset">pentiumPmcReset</a></i>(&nbsp;)</b> resets both PMC0 and PMC1.  <b><i><a href="./pentiumALib.html#pentiumPmcReset0">pentiumPmcReset0</a></i>(&nbsp;)</b> resetsPMC0, and <b><i><a href="./pentiumALib.html#pentiumPmcReset1">pentiumPmcReset1</a></i>(&nbsp;)</b> resets PMC1.PMC is enabled in <b><i><a href="./sysLib.html#sysHwInit">sysHwInit</a></i>(&nbsp;)</b>.  Selected events in the default configurationare PMC0 = number of hardware interrupts received and PMC1 = number of misaligned data memory references.<p></blockQuote><h4>MSR (Model Specific Register)</h4><blockQuote>The concept of model-specific registers (MSRs) to control hardware functionsin the processor or to monitor processor activity was introduced in the PentiumPro processor.  The new registers control the debug extensions, the performance counters, the machine-check exception capability, the machinecheck architecture, and the MTRRs.  The MSRs can be read and written to usingthe RDMSR and WRMSR instructions, respectively.<p>There are two routines to interface the MSR.  These two routines are:<pre>  void pentiumMsrGet       (       int address,             /* MSR address */       long long int * pData    /* MSR data */       )  void pentiumMsrSet       (       int address,             /* MSR address */       long long int * pData    /* MSR data */       )</pre><b><i><a href="./pentiumALib.html#pentiumMsrGet">pentiumMsrGet</a></i>(&nbsp;)</b> get contents of the specified MSR, and <b><i><a href="./pentiumALib.html#pentiumMsrSet">pentiumMsrSet</a></i>(&nbsp;)</b> sets value to the specified MSR.<p></blockQuote><h4>TSC (Time Stamp Counter)</h4><blockQuote>The PentiumPro processor provides a 64-bit time-stamp counter that is incremented every processor clock cycle.  The counter is incremented evenwhen the processor is halted by the HLT instruction or the external STPCLK#pin.  The time-stamp counter is set to 0 following a hardware reset of theprocessor.  The RDTSC instruction reads the time stamp counter and is guaranteed to return a monotonically increasing unique value whenever executed, except for 64-bit counter wraparound.  Intel guarantees, architecturally, that the time-stamp counter frequency and configuration willbe such that it will not wraparound within 10 years after being reset to 0.The period for counter wrap is several thousands of years in the PentiumProand Pentium processors.<p>There are three routines to interface the TSC.  These three routines are:<pre>  void pentiumTscReset (void)  void pentiumTscGet32 (void)  void pentiumTscGet64       (       long long int * pTsc     /* TSC */       )</pre><b><i><a href="./pentiumALib.html#pentiumTscReset">pentiumTscReset</a></i>(&nbsp;)</b> resets the TSC.  <b><i><a href="./pentiumALib.html#pentiumTscGet32">pentiumTscGet32</a></i>(&nbsp;)</b> gets the lower half of the64Bit TSC, and <b><i><a href="./pentiumALib.html#pentiumTscGet64">pentiumTscGet64</a></i>(&nbsp;)</b> gets the entire 64Bit TSC.<p>Four other routines are provided in this library.  They are:<pre>  void   pentiumTlbFlush (void)  void   pentiumSerialize (void)  STATUS pentiumBts         (         char * pFlag                   /* flag address */         )  STATUS pentiumBtc (pFlag)         (         char * pFlag                   /* flag address */         )</pre><b><i><a href="./pentiumALib.html#pentiumTlbFlush">pentiumTlbFlush</a></i>(&nbsp;)</b> flushes TLBs (Translation Lookaside Buffers). <b><i><a href="./pentiumALib.html#pentiumSerialize">pentiumSerialize</a></i>(&nbsp;)</b> does serialization by executing CPUID instruction.<b><i><a href="./pentiumALib.html#pentiumBts">pentiumBts</a></i>(&nbsp;)</b> executes an atomic compare-and-exchange instruction to set a bit.<b><i><a href="./pentiumALib.html#pentiumBtc">pentiumBtc</a></i>(&nbsp;)</b> executes an atomic compare-and-exchange instruction to clear a bit.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./pentiumALib.html#top">pentiumALib</a></b>, <i>Pentium, PentiumPro Family Developer's Manual </i><hr><a name="pentiumCr4Get"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>pentiumCr4Get</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>pentiumCr4Get</i>(&nbsp;)</strong> - get contents of CR4 register</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int pentiumCr4Get (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets the contents of the CR4 register.<p></blockquote><h4>RETURNS</h4><blockquote><p>Contents of CR4 register.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./pentiumALib.html#top">pentiumALib</a></b><hr><a name="pentiumCr4Set"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>pentiumCr4Set</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>pentiumCr4Set</i>(&nbsp;)</strong> - sets specified value to the CR4 register</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void pentiumCr4Set    (    ) int cr4; /* value to write CR4 register */</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets a specified value to the CR4 register.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./pentiumALib.html#top">pentiumALib</a></b><hr><a name="pentiumPmcStart"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>pentiumPmcStart</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>pentiumPmcStart</i>(&nbsp;)</strong> - start both PMC0 and PMC1</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS pentiumPmcStart    (    ) int pmcEvtSel0; /* Performance Event Select Register 0 */ int pmcEvtSel1; /* Performance Event Select Register 1 */</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine starts both PMC0 (Performance Monitoring Counter 0) and PMC1by writing specified events to Performance Event Select Registers. The first parameter is a content of Performance Event Select Register 0,and the second parameter is for the Performance Event Select Register 1.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR if PMC is already started.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./pentiumALib.html#top">pentiumALib</a></b><hr><a name="pentiumPmcStop"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>pentiumPmcStop</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>pentiumPmcStop</i>(&nbsp;)</strong> - stop both PMC0 and PMC1</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void pentiumPmcStop (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine stops both PMC0 (Performance Monitoring Counter 0) and PMC1by clearing two Performance Event Select Registers.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./pentiumALib.html#top">pentiumALib</a></b><hr><a name="pentiumPmcStop1"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>pentiumPmcStop1</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>pentiumPmcStop1</i>(&nbsp;)</strong> - stop PMC1</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void pentiumPmcStop1 (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine stops only PMC1 (Performance Monitoring Counter 1)by clearing the Performance Event Select Register 1.Note, clearing the Performance Event Select Register 0 stops both counters,PMC0 and PMC1.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./pentiumALib.html#top">pentiumALib</a></b><hr><a name="pentiumPmcGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>pentiumPmcGet</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>pentiumPmcGet</i>(&nbsp;)</strong> - get the contents of PMC0 and PMC1</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void pentiumPmcGet    (    ) long long int * pPmc0; /* Performance Monitoring Counter 0 */ long long int * pPmc1; /* Performance Monitoring Counter 1 */</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets the contents of both PMC0 (Performance Monitoring Counter 0)and PMC1.  The first parameter is a pointer of 64Bit variable to storethe content of the Counter 0, and the second parameter is for the Counter 1.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./pentiumALib.html#top">pentiumALib</a></b><hr><a name="pentiumPmcGet0"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>pentiumPmcGet0</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>pentiumPmcGet0</i>(&nbsp;)</strong> - get the contents of PMC0</p></blockquote><h4>SYNOPSIS</h4><blockquote><p>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -