cachearchlib.html
来自「Vxworks API操作系统和驱动程序设计API。压缩的HTML文件」· HTML 代码 · 共 270 行
HTML
270 行
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/cacheArchLib.html - generated by refgen from cacheArchLib.c --> <title> cacheArchLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.htm"><i>VxWorks API Reference : OS Libraries</i></a></p></blockquote><h1>cacheArchLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cacheArchLib</strong> - architecture-specific cache management library </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./cacheArchLib.html#cacheArchLibInit">cacheArchLibInit</a>( )</b> - initialize the cache library<br><b><a href="./cacheArchLib.html#cacheArchClearEntry">cacheArchClearEntry</a>( )</b> - clear an entry from a cache (68K, x86)<br><b><a href="./cacheArchLib.html#cacheStoreBufEnable">cacheStoreBufEnable</a>( )</b> - enable the store buffer (MC68060 only)<br><b><a href="./cacheArchLib.html#cacheStoreBufDisable">cacheStoreBufDisable</a>( )</b> - disable the store buffer (MC68060 only)<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library contains architecture-specific cache library functions forthe following processor cache families: Motorola 68K, Intel x86,PowerPC, ARM, and the Solaris and Windows simulators. Each routine description indicates which architecture families support it. Within families, different members support different cache mechanisms; thus, some operations cannot beperformed by certain processors because they lack particular functionalities.In such cases, the routines in this library return ERROR. Processor-specificconstraints are addressed in the manual entries for routines in this library.If the caches are unavailable or uncontrollable, the routines return ERROR.The exception to this rule is the 68020;although the 68020 has no cache, data cache operations return OK.<p>The MIPS architecture family has cache-related routines in individual BSP libraries. See the reference pages for the individual libraries and routines.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>cacheLib.h</b>, <b>mmuLib.h</b> (ARM only)<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cacheLib.html#top">cacheLib</a></b>, <b><a href="./vmLib.html#top">vmLib</a></b><hr><a name="cacheArchLibInit"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>cacheArchLibInit( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cacheArchLibInit( )</strong> - initialize the cache library</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS cacheArchLibInit ( CACHE_MODE instMode, /* instruction cache mode */ CACHE_MODE dataMode /* data cache mode */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes the cache library for the following processor cache families: Motorola 68K, Intel x86, PowerPC ARM, and the Solaris and Windows simulators. It initializes the function pointers and configures the caches to the specified cache modes.<p></blockquote><h4>68K PROCESSORS</h4><blockquote><p>The caching modes vary for members of the 68K processor family:<p><table><tr valign=top><td align=left></blockquote><h4>68020</h4><blockquote><p></td><td align=left> <b>CACHE_WRITETHROUGH</b> </td><td align=left> (instruction cache only)</tr><tr valign=top><td align=left></tr><tr valign=top><td align=left></blockquote><h4>68030</h4><blockquote><p></td><td align=left> <b>CACHE_WRITETHROUGH</b> </td><td align=left></tr><tr valign=top><td align=left> </td><td align=left> <b>CACHE_BURST_ENABLE</b> </td><td align=left></tr><tr valign=top><td align=left> </td><td align=left> <b>CACHE_BURST_DISABLE</b> </td><td align=left></tr><tr valign=top><td align=left> </td><td align=left> <b>CACHE_WRITEALLOCATE</b> </td><td align=left> (data cache only)</tr><tr valign=top><td align=left> </td><td align=left> <b>CACHE_NO_WRITEALLOCATE</b> </td><td align=left> (data cache only)</tr><tr valign=top><td align=left></tr><tr valign=top><td align=left></blockquote><h4>68040</h4><blockquote><p></td><td align=left> <b>CACHE_WRITETHROUGH</b> </td><td align=left></tr><tr valign=top><td align=left> </td><td align=left> <b>CACHE_COPYBACK</b> </td><td align=left> (data cache only)</tr><tr valign=top><td align=left> </td><td align=left> <b>CACHE_INH_SERIAL</b> </td><td align=left> (data cache only)</tr><tr valign=top><td align=left> </td><td align=left> <b>CACHE_INH_NONSERIAL</b> </td><td align=left> (data cache only)</tr><tr valign=top><td align=left> </td><td align=left> <b>CACHE_BURST_ENABLE</b> </td><td align=left> (data cache only)</tr><tr valign=top><td align=left> </td><td align=left> <b>CACHE_NO_WRITEALLOCATE</b> </td><td align=left> (data cache only)</tr><tr valign=top><td align=left></tr><tr valign=top><td align=left></blockquote><h4>68060</h4><blockquote><p></td><td align=left> <b>CACHE_WRITETHROUGH</b> </td><td align=left></tr><tr valign=top><td align=left> </td><td align=left> <b>CACHE_COPYBACK</b> </td><td align=left> (data cache only)</tr><tr valign=top><td align=left> </td><td align=left> <b>CACHE_INH_PRECISE</b> </td><td align=left> (data cache only)</tr><tr valign=top><td align=left> </td><td align=left> <b>CACHE_INH_IMPRECISE</b> </td><td align=left> (data cache only)</tr><tr valign=top><td align=left> </td><td align=left> <b>CACHE_BURST_ENABLE</b> </td><td align=left> (data cache only)</tr><tr valign=top><td align=left></tr></tr></table>The write-through, copy-back, serial, non-serial, precise and non precisemodes change the state of the data transparent translation register (DTTR0)CM bits. Only DTTR0 is modified, since it typically maps DRAM space.<p></blockquote><h4>X86 PROCESSORS</h4><blockquote><p>The caching mode <b>CACHE_WRITETHROUGH</b> is available for the 486 family processors.The caching mode <b>CACHE_COPYBACK</b> becomes available for the P5(Pentium) family processors. The caching mode (<b>CACHE_COPYBACK</b> | <b>CACHE_SNOOP_ENABLE</b>) becomes available for the P6(PentiumPro, II, III) and P7(Pentium4) family processors.<p></blockquote><h4>POWER PC PROCESSORS</h4><blockquote><p>Modes should be set before caching is enabled. If two contradictory flags areset (for example, enable/disable), no action is taken for any of the input flags.<p></blockquote><h4>ARM PROCESSORS</h4><blockquote><p>The caching capabilities and modes vary for members of the ARM processorfamily. All caches are provided on-chip, so cache support is mostly anarchitecture issue, not a BSP issue. However, the memory map isBSP-specific and some functions need knowledge of the memory map, so theyhave to be provided in the BSP.<dl><dt>ARM7TDMI (In ARM or Thumb state)<dd>No cache or MMU at all. Dummy routine provided, so that<b>INCLUDE_CACHE_SUPPORT</b> can be defined (the default BSP configuration).<dt>ARM710A<dd>Combined instruction and data cache. Actually a write-through cache, butseparate write-buffer effectively makes this a copy-back cache if thewrite-buffer is enabled. Use write-through/copy-back argument to decidewhether to enable write buffer. Data and instruction cache modes must beidentical.<dt>ARM810<dd>Combined instruction and data cache. Write-through and copy-back cachemodes, but separate write-buffer effectively makes even write-through acopy-back cache as all writes are buffered, when cache is enabled. Dataand instruction cache modes must be identical.<p><dt>ARMSA110<dd>Separate instruction and data caches. Write-through and copy-back cachemode for data, but separate write-buffer effectively makes evenwrite-through a copy-back cache as all writes are buffered, when cacheis enabled.</dl><p></blockquote><h4>RETURNS</h4><blockquote><p>OK</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cacheArchLib.html#top">cacheArchLib</a></b><hr><a name="cacheArchClearEntry"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>cacheArchClearEntry( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cacheArchClearEntry( )</strong> - clear an entry from a cache (68K, x86)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS cacheArchClearEntry ( CACHE_TYPE cache, /* cache to clear entry for */ void * address /* entry to clear */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine clears a specified entry from the specified cache.<p>For 68040 processors, this routine clears the cache line from the cachein which the cache entry resides.<p>For the MC68060 processor, when the instruction cache is cleared (invalidated)the branch cache is also invalidated by the hardware. One line in the branchcache cannot be invalidated so each time the branch cache is entirelyinvalidated.<p>For 386 family processors do not have a cache, thus it does nothing. The 486, P5(Pentium), and P6(PentiumPro, II, III) family processors do have a cache but does not support a line by line cache control, thus it performs WBINVD instruction. The P7(Pentium4) family processors support the line by line cache control with CLFLUSH instruction, thus flushes the specified cache line.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the cache type is invalid or the cache controlis not supported.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cacheArchLib.html#top">cacheArchLib</a></b><hr><a name="cacheStoreBufEnable"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>cacheStoreBufEnable( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cacheStoreBufEnable( )</strong> - enable the store buffer (MC68060 only)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void cacheStoreBufEnable (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the ESB bit of the Cache Control Register (CACR) toenable the store buffer. To maximize performance, the four-entryfirst-in-first-out (FIFO) store buffer is used to defer pending writesto writethrough or cache-inhibited imprecise pages.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cacheArchLib.html#top">cacheArchLib</a></b><hr><a name="cacheStoreBufDisable"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>cacheStoreBufDisable( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cacheStoreBufDisable( )</strong> - disable the store buffer (MC68060 only)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void cacheStoreBufDisable (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine resets the ESB bit of the Cache Control Register (CACR) todisable the store buffer.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cacheArchLib.html#top">cacheArchLib</a></b></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?