📄 vmlib.html
字号:
<b>S_vmLib_NOT_PAGE_ALIGNED</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./vmLib.html#top">vmLib</a></b><hr><a name="vmGlobalInfoGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>vmGlobalInfoGet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>vmGlobalInfoGet( )</strong> - get global virtual memory information (VxVMI Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>UINT8 *vmGlobalInfoGet (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine provides a description of those parts of the virtual memoryspace dedicated to global memory. The routine returns a pointer to anarray of UINT8. Each element of the array corresponds to a block ofvirtual memory, the size of which is architecture-dependent and can beobtained with a call to <b><a href="./vmLib.html#vmPageBlockSizeGet">vmPageBlockSizeGet</a>( )</b>. To determine if aparticular address is in global virtual memory, use the following code:<p><pre> UINT8 *globalPageBlockArray = vmGlobalInfoGet (); int pageBlockSize = vmPageBlockSizeGet (); if (globalPageBlockArray[addr/pageBlockSize]) ...</pre>The array pointed to by the returned pointer is guaranteed to be static aslong as no calls are made to <b><a href="./vmLib.html#vmGlobalMap">vmGlobalMap</a>( )</b> while the array is beingexamined. The information in the array can be used to determine whatportions of the virtual memory space are available for use as privatevirtual memory within a virtual memory context.<p>This routine is callable from interrupt level.<p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine is distributed as a component of the unbundled virtual memorysupport option, VxVMI.<p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to an array of UINT8.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./vmLib.html#top">vmLib</a></b>, <b><a href="./vmLib.html#vmPageBlockSizeGet">vmPageBlockSizeGet</a>( )</b><hr><a name="vmPageBlockSizeGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>vmPageBlockSizeGet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>vmPageBlockSizeGet( )</strong> - get the architecture-dependent page block size (VxVMI Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int vmPageBlockSizeGet (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns the size of a page block for the currentarchitecture. Each MMU architecture constructs translation tables suchthat a minimum number of pages are pre-defined when a new section of thetranslation table is built. This minimal group of pages is referred to asa "page block." This routine may be used in conjunction with<b><a href="./vmLib.html#vmGlobalInfoGet">vmGlobalInfoGet</a>( )</b> to examine the layout of global virtual memory.<p>This routine is callable from interrupt level.<p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine is distributed as a component of the unbundled virtual memorysupport option, VxVMI.<p></blockquote><h4>RETURNS</h4><blockquote><p>The page block size of the current architecture.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./vmLib.html#top">vmLib</a></b>, <b><a href="./vmLib.html#vmGlobalInfoGet">vmGlobalInfoGet</a>( )</b><hr><a name="vmTranslate"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>vmTranslate( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>vmTranslate( )</strong> - translate a virtual address to a physical address (VxVMI Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS vmTranslate ( VM_CONTEXT_ID context, /* context - NULL == currentContext */ void * virtualAddr, /* virtual address */ void * *physicalAddr /* place to put result */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine retrieves mapping information for a virtual address from thepage translation tables. If the specified virtual address has never beenmapped, the returned status can be either OK or ERROR; however, if it isOK, then the returned physical address will be -1. If <i>context</i> isspecified as NULL, the current context is used.<p>This routine is callable from interrupt level.<p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine is distributed as a component of the unbundled virtual memorysupport option, VxVMI.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the validation or translation fails.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./vmLib.html#top">vmLib</a></b><hr><a name="vmPageSizeGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>vmPageSizeGet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>vmPageSizeGet( )</strong> - return the page size (VxVMI Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int vmPageSizeGet (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns the architecture-dependent page size.<p>This routine is callable from interrupt level.<p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine is distributed as a component of the unbundled virtual memorysupport option, VxVMI.<p></blockquote><h4>RETURNS</h4><blockquote><p>The page size of the current architecture.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./vmLib.html#top">vmLib</a></b><hr><a name="vmCurrentGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>vmCurrentGet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>vmCurrentGet( )</strong> - get the current virtual memory context (VxVMI Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>VM_CONTEXT_ID vmCurrentGet (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns the current virtual memory context.<p>This routine is callable from interrupt level.<p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine is distributed as a component of the unbundled virtual memorysupport option, VxVMI.<p></blockquote><h4>RETURNS</h4><blockquote><p>The current virtual memory context, orNULL if no virtual memory context is installed.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./vmLib.html#top">vmLib</a></b><hr><a name="vmCurrentSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>vmCurrentSet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>vmCurrentSet( )</strong> - set the current virtual memory context (VxVMI Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS vmCurrentSet ( VM_CONTEXT_ID context /* context to install */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine installs a specified virtual memory context.<p>This routine is callable from interrupt level.<p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine is distributed as a component of the unbundled virtual memorysupport option, VxVMI.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the validation or context switch fails.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./vmLib.html#top">vmLib</a></b><hr><a name="vmEnable"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>vmEnable( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>vmEnable( )</strong> - enable or disable virtual memory (VxVMI Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS vmEnable ( BOOL enable /* TRUE == enable MMU, FALSE == disable MMU */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine turns virtual memory on and off. Memory management should notbe turned off once it is turned on except in the case of system shutdown.<p>This routine is callable from interrupt level.<p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine is distributed as a component of the unbundled virtual memorysupport option, VxVMI.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the validation or architecture-dependent codefails.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./vmLib.html#top">vmLib</a></b><hr><a name="vmTextProtect"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>vmTextProtect( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>vmTextProtect( )</strong> - write-protect a text segment (VxVMI Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS vmTextProtect (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine write-protects the VxWorks text segment and sets a flag sothat all text segments loaded by the incremental loader will bewrite-protected. The routine should be called after both <b><a href="./vmLib.html#vmLibInit">vmLibInit</a>( )</b> and<b><a href="./vmLib.html#vmGlobalMapInit">vmGlobalMapInit</a>( )</b> have been called.<p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine is distributed as a component of the unbundled virtual memorysupport option, VxVMI.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the text segment cannot be write-protected.<p></blockquote><h4>ERRNO</h4><blockquote><p><b>S_vmLib_TEXT_PROTECTION_UNAVAILABLE</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./vmLib.html#top">vmLib</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -