亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区| 精品视频一区 二区 三区| 91精品国产福利| jizz一区二区| 色先锋久久av资源部| av亚洲产国偷v产偷v自拍| 99re这里都是精品| 国产精品国产三级国产普通话99| 欧美一三区三区四区免费在线看 | 久久久蜜臀国产一区二区| 免费观看成人鲁鲁鲁鲁鲁视频| 精品一区二区国语对白| 日韩丝袜美女视频| 最新日韩在线视频| 91福利精品第一导航| 亚洲国产中文字幕| 欧美日韩和欧美的一区二区| 99久久夜色精品国产网站| 国产成人综合精品三级| 成人小视频在线| 欧美日韩中文一区| 99久久精品99国产精品 | 中文字幕在线免费不卡| 日韩毛片在线免费观看| 91视视频在线直接观看在线看网页在线看 | 韩国一区二区视频| 欧美精品一区二区三区在线| 久久奇米777| 成人久久视频在线观看| 国产精品久久777777| 91丨porny丨在线| 亚洲va韩国va欧美va| 制服视频三区第一页精品| 日精品一区二区三区| 欧美一区二区成人6969| 欧美亚洲综合色| 精品一区二区三区免费观看| 亚洲国产精品黑人久久久| 91美女福利视频| 亚洲成人你懂的| 欧美精品一区二区蜜臀亚洲| 成人av综合一区| 三级久久三级久久| 国产欧美日韩在线| 欧美日韩国产系列| 国产成人免费视频一区| 亚洲线精品一区二区三区八戒| 国产在线精品视频| 这里只有精品免费| 国产成人精品综合在线观看| 欧美午夜精品免费| 亚洲欧美韩国综合色| 99国产精品久久| 欧美日韩三级在线| 亚洲福利视频一区| 99re在线精品| 国产精品成人在线观看| 日韩一级二级三级精品视频| 国产精品水嫩水嫩| 91麻豆精品国产自产在线观看一区 | 国产suv精品一区二区三区| 亚洲欧美日韩一区| 精品国产污网站| 欧美色图在线观看| 不卡视频在线观看| 国产一区二区三区观看| 爽爽淫人综合网网站| 日韩欧美国产成人一区二区| 精品av综合导航| 制服丝袜亚洲色图| 91福利视频在线| gogogo免费视频观看亚洲一| 精品中文av资源站在线观看| 亚洲国产精品自拍| |精品福利一区二区三区| 欧美成人三级在线| 欧美日韩国产不卡| 在线观看亚洲精品| kk眼镜猥琐国模调教系列一区二区| 麻豆国产精品一区二区三区 | 美女视频免费一区| 亚洲一区日韩精品中文字幕| 亚洲国产精品精华液ab| 久久看人人爽人人| 欧美电视剧在线看免费| 69p69国产精品| 欧美日韩精品二区第二页| 99久久婷婷国产| 国产精品66部| 成人小视频在线观看| 东方aⅴ免费观看久久av| 国产精品一级片在线观看| 狠狠v欧美v日韩v亚洲ⅴ| 久久精品国产一区二区三| 青青草原综合久久大伊人精品 | 日本视频一区二区三区| 亚洲三级小视频| 国产精品不卡视频| 亚洲图片欧美激情| 性做久久久久久| 国产精品家庭影院| 欧美国产日韩a欧美在线观看| 日韩免费视频一区| 欧美人伦禁忌dvd放荡欲情| 捆绑紧缚一区二区三区视频| 国产不卡在线播放| 国产成人精品亚洲777人妖| 视频在线观看一区| 宅男在线国产精品| 精品99久久久久久| 久久九九久精品国产免费直播| 国产午夜精品久久久久久免费视 | 一区二区三区自拍| 亚洲va欧美va天堂v国产综合| 亚洲国产美女搞黄色| 五月激情六月综合| 日本vs亚洲vs韩国一区三区| 国产伦精品一区二区三区视频青涩| 国产99一区视频免费| 91麻豆成人久久精品二区三区| 欧美三级日韩在线| 日韩精品一区二区三区四区视频| 国产亚洲成av人在线观看导航| 国产精品久久久久久久久晋中| 亚洲天堂av老司机| 日韩成人一级大片| 国产毛片精品国产一区二区三区| 狠狠色丁香婷婷综合| 成人免费视频一区| 欧美久久久久免费| 欧美一区二区精品久久911| 色婷婷亚洲综合| 成人精品高清在线| 91黄色在线观看| 91免费观看视频在线| 91精品麻豆日日躁夜夜躁| 精品欧美久久久| 一区二区三区欧美日韩| 国产福利一区二区三区视频在线| 99精品热视频| 2017欧美狠狠色| 亚洲a一区二区| 99精品久久99久久久久| 日韩欧美黄色影院| 日韩中文字幕区一区有砖一区 | 日韩有码一区二区三区| 韩国av一区二区三区四区| 色婷婷综合久久久久中文| 日本一区二区三区在线观看| 久久国产精品第一页| 欧美大胆人体bbbb| 国模无码大尺度一区二区三区| 91精品欧美久久久久久动漫| 亚洲成av人在线观看| 国产欧美一区二区精品秋霞影院| 亚洲高清不卡在线观看| 欧美巨大另类极品videosbest | 色综合网色综合| 成人午夜激情视频| 日韩欧美国产综合| 亚洲一区av在线| 国产一区二区精品久久99| 九九**精品视频免费播放| 丝袜美腿高跟呻吟高潮一区| 国产午夜精品福利| 色94色欧美sute亚洲13| 日韩成人dvd| 国产精品天天看| 3d动漫精品啪啪| 日韩午夜精品视频| 日韩三级在线观看| 一区二区三区成人| 亚洲午夜精品网| 日韩电影在线一区二区三区| 欧美日韩二区三区| 日韩av不卡在线观看| 欧美一区二区视频在线观看| 日韩制服丝袜av| 精品少妇一区二区三区视频免付费 | 亚洲第一精品在线| 欧美日本在线观看| 美女mm1313爽爽久久久蜜臀| 日本视频在线一区| 国产视频不卡一区| 99久久久久久99| 亚洲国产婷婷综合在线精品| 91精品国产综合久久精品| 久久精品免费看| 亚洲18色成人| 精品成a人在线观看| 波多野结衣精品在线| 亚洲一区二区四区蜜桃| 欧美不卡123| 99麻豆久久久国产精品免费| 亚洲高清在线精品| 精品av久久707| 日本道色综合久久| 九九视频精品免费|