亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mmui86lib.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* mmuI86Lib.c - MMU library for i86 *//* Copyright 1984-2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01h,16may02,hdn  moved the GDT reloading to sysPhysMemTop() in sysLib.c01g,09nov01,hdn  deferred TLB flush in mmuVirtualPageCreate() at init time01f,27aug01,hdn  made MMU_TLB_FLUSH, updated MMU_LOCK/MMU_UNLOCK macros.		 deferred TLB & Cache flush at initialization time.		 renamed mmuLibInit to mmuI86LibInit.		 doc: cleanup.01e,09feb99,wsl  add comment to document ERRNO value01d,13apr98,hdn  added support for PentiumPro.01c,07jan95,hdn  re-initialized the GDT in mmuLibInit().01b,01nov94,hdn  added a support for COPY_BACK cache mode for Pentium.01a,26jul93,hdn  written based on mc68k's version.*//*DESCRIPTION:mmuI86Lib.c provides the architecture dependent routines that directly controlthe memory management unit.  It provides 10 routines that are called by thehigher level architecture independent routines in vmLib.c:  mmuI86LibInit() - initialize module mmuTransTblCreate() - create a new translation table mmuTransTblDelete() - delete a translation table. mmuI86Enable() - turn MMU on or off mmuStateSet() - set state of virtual memory page mmuStateGet() - get state of virtual memory page mmuPageMap() - map physical memory page to virtual memory page mmuGlobalPageMap() - map physical memory page to global virtual memory page mmuTranslate() - translate a virtual address to a physical address mmuCurrentSet() - change active translation tableApplications using the MMU will never call these routines directly; the visible interface is supported in vmLib.c.mmuLib supports the creation and maintenance of multiple translation tables,one of which is the active translation table when the MMU is enabled.  Note that VxWorks does not include a translation table as part of the taskcontext;  individual tasks do not reside in private virtual memory.  However,we include the facilities to create multiple translation tables so thatthe user may create "private" virtual memory contexts and switch them in anapplication specific manner.  Newtranslation tables are created with a call to mmuTransTblCreate(), and installedas the active translation table with mmuCurrentSet().  Translation tablesare modified and potentially augmented with calls to mmuPageMap() and mmuStateSet().The state of portions of the translation table can be read with calls to mmuStateGet() and mmuTranslate().The traditional VxWorks architecture and design philosophy requires that allobjects and operating systems resources be visible and accessible to all agents(tasks, isrs, watchdog timers, etc) in the system.  This has traditionally beeninsured by the fact that all objects and data structures reside in physical memory; thus, a data structure created by one agent may be accessed by anyother agent using the same pointer (object identifiers in VxWorks are oftenpointers to data structures.) This creates a potential problem if you have multiple virtual memory contexts.  For example, if asemaphore is created in one virtual memory context, you must guarantee thatthat semaphore will be visible in all virtual memory contexts if the semaphoreis to be accessed at interrupt level, when a virtual memory context other thanthe one in which it was created may be active. Another example is thatcode loaded using the incremental loader from the shell must be accessiblein all virtual memory contexts, since code is shared by all agents in thesystem.This problem is resolved by maintaining a global "transparent" mappingof virtual to physical memory for all the contiguous segments of physical memory (on board memory, i/o space, sections of vme space, etc) that is sharedby all translation tables;  all available  physical memory appears at the same address in virtual memory in all virtual memory contexts. This technique provides an environment that allowsresources that rely on a globally accessible physical address to run withoutmodification in a system with multiple virtual memory contexts.An additional requirement is that modifications made to the state of global virtual memory in one translation table appear in all translation tables.  Forexample, memory containing the text segment is made read only (to avoidaccidental corruption) by setting the appropriate writable bits in the translation table entries corresponding to the virtual memory containing the text segment.  This state information must be shared by all virtual memory contexts, so that no matter what translation table is active, the text segmentis protected from corruption.  The mechanism that implements this feature isarchitecture dependent, but usually entails building a section of a translation table that corresponds to the global memory, that is shared byall other translation tables.  Thus, when changes to the state of the globalmemory are made in one translation table, the changes are reflected in allother translation tables.mmuLib provides a separate call for constructing global virtual memory -mmuGlobalPageMap() - which creates translation table entries that are sharedby all translation tables.  Initialization code in usrConfig makes callsto vmGlobalMap() (which in turn calls mmuGlobalPageMap()) to set up global transparent virtual memory for allavailable physical memory.  All calls made to mmuGlobalPageMap() must occurbefore any virtual memory contexts are created;  changes made to global virtualmemory after virtual memory contexts are created are not guaranteed to be reflected in all virtual memory contexts.Most MMU architectures will dedicate some fixed amount of virtual memory to a minimal section of the translation table (a "segment", or "block").  This creates a problem in that the user may map a small section of virtual memoryinto the global translation tables, and then attempt to use the virtual memoryafter this section as private virtual memory.  The problem is that the translation table entries for this virtual memory are contained in the global translation tables, and are thus shared by all translation tables.  This condition is detected by vmMap, and an error is returned, thus, the lowerlevel routines in mmuI86Lib.c (mmuPageMap(), mmuGlobalPageMap()) need not perform any error checking.A global variable `mmuPageBlockSize' should be defined which is equal to the minimum virtual segment size.  mmuLib must provide a routine mmuGlobalInfoGet(), which returns a pointer to the globalPageBlock[] array.This provides the user with enough information to be able to allocate virtual memory space that does not conflict with the global memory space.This module supports the 80386/80486 MMU:.CS			    PDBR			     |			     |            ------------------------------------- top level  |pde  |pde  |pde  |pde  |pde  |pde  | ...             -------------------------------------	       |     |     |     |     |     |    	       |     |     |     |     |     |          ----------     |     v     v     v     v      |         ------    NULL  NULL  NULL  NULL      |         |      v         v     ----     ----   l   |pte |   |pte |o    ----     ----w   |pte |   |pte |     e    ----     ----r   |pte |   |pte |l    ----     ----e   |pte |   |pte |v    ----     ----e     .         .l     .         .      .         ..CEwhere the top level consists of an array of pointers (Page Directory Entry)held within a single 4k page.  These point to arrays of Page Table Entry arrays in the lower level.  Each of these lower level arrays is also held within a single 4k page, and describes a virtual space of 4 MB (each Page Table Entry is 4 bytes, so we get 1000 of these in each array, and each PageTable Entry maps a 4KB page - thus 1000 * 4096 = 4MB.)  To implement global virtual memory, a separate translation table called mmuGlobalTransTbl is created when the module is initialized.  Calls to mmuGlobalPageMap will augment and modify this translation table.  When newtranslation tables are created, memory for the top level array of sftd's isallocated and initialized by duplicating the pointers in mmuGlobalTransTbl'stop level sftd array.  Thus, the new translation table will use the globaltranslation table's state information for portions of virtual memory that aredefined as global.  Here's a picture to illustrate:.CS	         GLOBAL TRANS TBL		      NEW TRANS TBL 		       PDBR				   PDBR		        |				    |		        |				    |            -------------------------           ------------------------- top level  |pde  |pde  | NULL| NULL|           |pde  |pde  | NULL| NULL|            -------------------------           -------------------------	       |     |     |     |                 |     |     |     |   	       |     |     |     |                 |     |     |     |        ----------     |     v     v        ----------     |     v     v      |         ------    NULL  NULL      |		 |    NULL  NULL      |         |			  |		 |      o------------------------------------		 |      |		|					 |      |		o-----------------------------------------      |		|      v         v     ----     ----   l   |pte |   |pte |o    ----     ----w   |pte |   |pte |     e    ----     ----r   |pte |   |pte |l    ----     ----e   |pte |   |pte |v    ----     ----e     .         .l     .         .      .         ..CENote that with this scheme, the global memory granularity is 4MB.  Each timeyou map a section of global virtual memory, you dedicate at least 4MB of the virtual space to global virtual memory that will be shared by all virtualmemory contexts.The physical memory that holds these data structures is obtained from thesystem memory manager via memalign to insure that the memory is pagealigned.  We want to protect this memory from being corrupted,so we invalidate the descriptors that we set up in the global translationthat correspond to the memory containing the translation table data structures.This creates a "chicken and the egg" paradox, in that the only way we canmodify these data structures is through virtual memory that is now invalidated,and we can't validate it because the page descriptors for that memory arein invalidated memory (confused yet?)So, you will notice that anywhere that page table descriptors (pte's)are modified, we do so by locking out interrupts, momentarily disabling the MMU, accessing the memory with its physical address, enabling the MMU, andthen re-enabling interrupts (see mmuStateSet(), for example.)The 80386 MMU does not have a write protection mechanism, since there is noWP(Write Protect) bit in CR0 unlike 80486 MMU. The 80386 has no internalcache, thus precluding control caching on a page-by-page basis. Also there is neither a PWT(Page Write Through) bit nor PCD(Page Cache Disable) bit in the Page Table Entry.The 80486 MMU set a PWT(Page Write Through) bit all the time and uses PCD(Page Cache Disable) bit to control caching on a page-by-page basis.The Pentium MMU set a PWT(Page Write Through) bit if the cacheDataMode isWRITE_THROUGH. If it is COPY_BACK, it doesn't set the bit.*/#include "vxWorks.h"#include "string.h"#include "intLib.h"#include "stdlib.h"#include "memLib.h"#include "private/vmLibP.h"#include "arch/i86/mmuI86Lib.h"#include "mmuLib.h"#include "errno.h"#include "cacheLib.h"#include "regs.h"/* forward declarations */ LOCAL void mmuMemPagesWriteDisable (MMU_TRANS_TBL *transTbl);LOCAL STATUS mmuPteGet (MMU_TRANS_TBL *pTransTbl, void *virtAddr, PTE **result);LOCAL MMU_TRANS_TBL *mmuTransTblCreate ();LOCAL STATUS mmuTransTblInit (MMU_TRANS_TBL *newTransTbl);LOCAL STATUS mmuTransTblDelete (MMU_TRANS_TBL *transTbl);LOCAL STATUS mmuVirtualPageCreate (MMU_TRANS_TBL *thisTbl, void *virtPageAddr);LOCAL STATUS mmuStateSet (MMU_TRANS_TBL *transTbl, void *pageAddr, UINT stateMask, UINT state);LOCAL STATUS mmuStateGet (MMU_TRANS_TBL *transTbl, void *pageAddr, UINT *state);LOCAL STATUS mmuPageMap (MMU_TRANS_TBL *transTbl, void *virtualAddress, void *physPage);LOCAL STATUS mmuGlobalPageMap (void *virtualAddress, void *physPage);LOCAL STATUS mmuTranslate (MMU_TRANS_TBL *transTbl, void *virtAddress, void **physAddress);LOCAL void mmuCurrentSet (MMU_TRANS_TBL *transTbl);/* kludgey static data structure for parameters in __asm__ directives. */LOCAL int mmuPageSize;BOOL mmuI86Enabled = FALSE;/* a translation table to hold the descriptors for the global transparent * translation of physical to virtual memory  */LOCAL MMU_TRANS_TBL mmuGlobalTransTbl;/* initially, the current trans table is a dummy table with MMU disabled */LOCAL MMU_TRANS_TBL *mmuCurrentTransTbl = &mmuGlobalTransTbl;/* array of booleans used to keep track of sections of virtual memory defined * as global. */LOCAL BOOL *globalPageBlock;LOCAL STATE_TRANS_TUPLE mmuStateTransArrayLocal [] =    {    {VM_STATE_MASK_VALID, MMU_STATE_MASK_VALID,      VM_STATE_VALID, MMU_STATE_VALID},    {VM_STATE_MASK_VALID, MMU_STATE_MASK_VALID,      VM_STATE_VALID_NOT, MMU_STATE_VALID_NOT},    {VM_STATE_MASK_WRITABLE, MMU_STATE_MASK_WRITABLE,     VM_STATE_WRITABLE, MMU_STATE_WRITABLE},    {VM_STATE_MASK_WRITABLE, MMU_STATE_MASK_WRITABLE,     VM_STATE_WRITABLE_NOT, MMU_STATE_WRITABLE_NOT},    {VM_STATE_MASK_CACHEABLE, MMU_STATE_MASK_CACHEABLE,     VM_STATE_CACHEABLE, MMU_STATE_CACHEABLE},    {VM_STATE_MASK_CACHEABLE, MMU_STATE_MASK_CACHEABLE,     VM_STATE_CACHEABLE_NOT, MMU_STATE_CACHEABLE_NOT}    };LOCAL MMU_LIB_FUNCS mmuLibFuncsLocal =    {    mmuI86LibInit,    mmuTransTblCreate,    mmuTransTblDelete,    mmuI86Enable,       mmuStateSet,    mmuStateGet,    mmuPageMap,    mmuGlobalPageMap,    mmuTranslate,    mmuCurrentSet    };IMPORT STATE_TRANS_TUPLE *mmuStateTransArray;IMPORT int mmuStateTransArraySize;IMPORT MMU_LIB_FUNCS mmuLibFuncs;IMPORT int mmuPageBlockSize;IMPORT int sysProcessor;LOCAL BOOL firstTime = TRUE;/* MMU_UNLOCK and MMU_LOCK are used to access page table entries that are in * virtual memory that has been invalidated to protect it from being corrupted * MMU_UNLOCK and MMU_LOCK makes no function call, so no worry about stack

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本韩国欧美在线| 蓝色福利精品导航| 一区二区三区欧美在线观看| 一区二区三区日韩精品视频| 亚洲成av人综合在线观看| 丝袜亚洲精品中文字幕一区| 久久国产精品色| 97久久精品人人澡人人爽| 欧美日韩你懂的| 国产蜜臀97一区二区三区| 亚洲精品国产无套在线观| 美腿丝袜亚洲三区| 成人性生交大片免费看中文| 久久久综合视频| 午夜精品久久久久| 成人午夜短视频| 欧美一区二区三区四区在线观看| 国产校园另类小说区| 午夜精彩视频在线观看不卡| 国产成人午夜99999| 91精品国产综合久久香蕉麻豆| 国产精品美女久久久久久| 色综合久久99| 国产精品家庭影院| 国产91精品在线观看| 久久久久88色偷偷免费| 国内精品久久久久影院色| 91视频你懂的| 亚洲精品免费在线播放| 91美女在线视频| 亚洲欧洲美洲综合色网| 成人一级视频在线观看| 国产精品久久久久9999吃药| 成人精品高清在线| 欧美猛男超大videosgay| 亚洲电影激情视频网站| 欧美怡红院视频| 亚洲成人一区在线| 日韩免费高清av| 国产乱码精品一区二区三区忘忧草| 日韩欧美不卡在线观看视频| 久久精品国产久精国产爱| 日韩欧美中文一区二区| 久久激五月天综合精品| 欧美国产97人人爽人人喊| 91视频免费观看| 激情另类小说区图片区视频区| 精品福利一二区| 97久久久精品综合88久久| 亚洲成人av福利| 精品国产免费久久 | 一本一道波多野结衣一区二区 | 99久久婷婷国产精品综合| 亚洲成人免费在线| 日本一区二区久久| 欧美一区二区成人| caoporn国产一区二区| 日本成人超碰在线观看| 久久天天做天天爱综合色| 欧美色综合久久| 色综合天天综合色综合av| 蜜桃久久精品一区二区| 亚洲精品视频在线| 欧美va亚洲va香蕉在线| 色欧美片视频在线观看| 国产成人精品aa毛片| 久久99精品久久久久婷婷| 一区二区免费在线播放| 中文字幕一区二区日韩精品绯色| 欧美一区二区在线不卡| 91麻豆精品91久久久久久清纯 | 欧美韩日一区二区三区四区| 777色狠狠一区二区三区| 欧美日本国产视频| 日本精品裸体写真集在线观看| 丁香婷婷深情五月亚洲| 国产一区福利在线| 国产在线视频一区二区三区| 精品一区二区在线免费观看| 久久99久久久欧美国产| 国产一区二区免费看| 国产麻豆一精品一av一免费| 国内精品嫩模私拍在线| 国产剧情一区二区| 成人激情小说乱人伦| 色菇凉天天综合网| 欧美剧在线免费观看网站 | 毛片基地黄久久久久久天堂| 免费国产亚洲视频| 国产美女一区二区| 色视频欧美一区二区三区| 91精品国产欧美一区二区成人| 欧美一区日韩一区| 亚洲欧美在线视频观看| 亚洲成人午夜电影| 国产很黄免费观看久久| 91麻豆文化传媒在线观看| 日韩一级欧美一级| 日韩毛片视频在线看| 免费人成精品欧美精品| 成人视屏免费看| 97精品国产露脸对白| 欧美放荡的少妇| 国产精品乱码人人做人人爱 | 亚洲成av人片在线| 欧美三片在线视频观看| 午夜免费久久看| 国产成人综合在线| 日韩一级片网址| 亚洲精品成人天堂一二三| 六月婷婷色综合| 色猫猫国产区一区二在线视频| 91精品一区二区三区久久久久久 | 欧美疯狂做受xxxx富婆| 亚洲精品老司机| 欧美影视一区在线| 午夜一区二区三区视频| 91久久国产综合久久| 日韩伦理电影网| 一本久道久久综合中文字幕| 亚洲欧美在线视频| 91丨国产丨九色丨pron| 国产精品传媒视频| 色999日韩国产欧美一区二区| 亚洲乱码国产乱码精品精小说| 91电影在线观看| 精品亚洲成av人在线观看| 99视频有精品| 国产清纯在线一区二区www| 日本高清视频一区二区| 成人免费的视频| 婷婷中文字幕一区三区| 国产日韩av一区| 欧美一级黄色录像| 不卡av免费在线观看| 日本美女视频一区二区| 2020国产精品自拍| 91美女在线看| 国产一区二区三区电影在线观看| 日韩精品一区二区在线| 91久久国产综合久久| 国产精品小仙女| 美女一区二区久久| 亚洲综合免费观看高清在线观看| 制服丝袜中文字幕一区| 不卡免费追剧大全电视剧网站| 玖玖九九国产精品| 亚洲v日本v欧美v久久精品| 国产亚洲人成网站| 欧美伦理电影网| 色欧美日韩亚洲| 成人午夜免费视频| 精品综合久久久久久8888| 亚洲精品久久久蜜桃| 亚洲国产精品成人综合| 欧美不卡一区二区三区| 2014亚洲片线观看视频免费| 日韩欧美国产综合在线一区二区三区| 91久久精品一区二区三| 一本大道久久a久久综合婷婷| 欧美丝袜自拍制服另类| 51午夜精品国产| 久久天堂av综合合色蜜桃网| 中文字幕免费观看一区| 日本一区二区视频在线| 9191成人精品久久| 欧美色手机在线观看| 色欧美日韩亚洲| 色婷婷综合五月| 欧美午夜视频网站| 在线播放中文字幕一区| 777xxx欧美| 久久老女人爱爱| 中文字幕一区二区三| 一区二区久久久| 免费高清在线视频一区·| 肉丝袜脚交视频一区二区| 日本视频在线一区| 国内精品免费**视频| 97精品久久久久中文字幕| 欧美三级日韩在线| 日韩欧美电影一二三| 国产精品久久看| 天堂在线亚洲视频| 国产成人免费9x9x人网站视频| 国产精品一区二区在线观看网站| 国产999精品久久| 欧美最猛性xxxxx直播| 日韩女优视频免费观看| 综合激情网...| 国产专区欧美精品| 欧美亚洲高清一区二区三区不卡| 日韩欧美国产系列| 一区二区三区在线视频免费观看| 美女在线视频一区| 在线影院国内精品| 欧美激情艳妇裸体舞| 日本欧美加勒比视频| 欧美日韩免费一区二区三区 | 男人的j进女人的j一区|