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

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

?? mmui86lib.c

?? vxworks的源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* mmuI86Lib.c - MMU library for i86 *//* Copyright 1984-2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01i,19nov02,max  Added DIAB inline assembling01h,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 * mismatch in virtual/physical address space, or the called out function's  * disapearance.  It is guaranteed that this code is in physical memory. */#ifdef _DIAB_TOOLasm void mmu_diab_int_lock(unsigned int Mask){% reg Mask	pushf	popl	Mask	andl	$0x00000200, Mask	cli% mem Mask	pushf	popl	Mask	andl	$0x00000200, Mask	cli}asm void mmu_diab_int_unlock(unsigned int Mask){% reg Mask; lab L	testl	$0x00000200, Mask

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人久久18免费网站麻豆| 欧美视频完全免费看| 欧美丝袜丝nylons| 精品国产青草久久久久福利| 亚洲视频 欧洲视频| 免费看欧美美女黄的网站| 91视频免费看| 久久久五月婷婷| 日韩电影在线一区二区| 97久久超碰国产精品| 久久九九国产精品| 免费成人av在线| 在线一区二区三区| 国产精品福利一区| 久久国内精品自在自线400部| 色婷婷精品久久二区二区蜜臂av| 欧美精品一区二区三区高清aⅴ| 亚洲激情校园春色| 91丝袜呻吟高潮美腿白嫩在线观看| 精品免费国产二区三区| 午夜电影一区二区三区| 欧美中文字幕一二三区视频| 亚洲人快播电影网| a级精品国产片在线观看| 久久―日本道色综合久久| 日本不卡一二三区黄网| 在线看不卡av| 一区二区三区毛片| 色综合久久久网| 成人欧美一区二区三区小说| 成人涩涩免费视频| 国产精品女上位| www..com久久爱| 国产精品高潮呻吟久久| av不卡免费电影| 综合久久国产九一剧情麻豆| av激情亚洲男人天堂| 亚洲视频小说图片| 91丝袜美腿高跟国产极品老师| 自拍偷自拍亚洲精品播放| 北条麻妃一区二区三区| 亚洲欧洲在线观看av| 色综合天天天天做夜夜夜夜做| 亚洲三级在线观看| 在线免费观看一区| 水蜜桃久久夜色精品一区的特点 | 亚洲欧洲综合另类在线| 一本色道亚洲精品aⅴ| 一区二区三区鲁丝不卡| 日韩一区二区在线免费观看| 久久国产精品99精品国产 | 精久久久久久久久久久| 精品国产伦一区二区三区观看方式| 久久99久久精品| 久久久美女毛片| 成人h动漫精品| 樱桃视频在线观看一区| 欧美一区二区三区免费大片| 精品一区二区在线观看| 国产精品伦理一区二区| 欧美日韩激情在线| 激情小说亚洲一区| 日韩理论在线观看| 欧美精品一卡二卡| 久久国产日韩欧美精品| 亚洲欧洲日韩女同| 在线播放/欧美激情| 色综合天天综合网天天看片| 夜夜揉揉日日人人青青一国产精品 | 欧美大片一区二区三区| 丁香激情综合五月| 亚洲第一会所有码转帖| 欧美精品一区二区在线播放| 91婷婷韩国欧美一区二区| 麻豆精品新av中文字幕| 亚洲欧美日本在线| 欧美精品一区二区精品网| 欧美视频在线观看一区| 国内成+人亚洲+欧美+综合在线| 综合网在线视频| 久久九九久久九九| 欧美一区二区三区在线视频| av中文字幕亚洲| 久久电影网站中文字幕| 亚洲精品国产一区二区精华液| 日韩一区二区三区高清免费看看| 91污在线观看| 国产不卡在线播放| 日本美女一区二区三区| 亚洲精品中文在线| 精品国产1区二区| 欧美日韩精品电影| 91美女片黄在线| 国产精品一区二区免费不卡| 日本在线不卡视频一二三区| 亚洲欧洲中文日韩久久av乱码| 2014亚洲片线观看视频免费| 欧美猛男男办公室激情| 一本久久精品一区二区| 成人精品视频一区二区三区尤物| 久久99精品久久久| 午夜一区二区三区视频| 一区二区三区在线免费观看| 国产精品另类一区| 久久久不卡网国产精品二区| 精品免费一区二区三区| 日韩精品一区二区三区四区| 欧美日韩精品一区二区| 欧美四级电影网| 日本乱人伦aⅴ精品| 91老师国产黑色丝袜在线| 成人午夜激情影院| 国产成人精品免费看| 国产精品亚洲午夜一区二区三区| 国产在线国偷精品产拍免费yy| 久久精品国产精品亚洲红杏| 视频精品一区二区| 五月天亚洲婷婷| 天堂影院一区二区| 日本成人在线电影网| 免费高清成人在线| 国产综合色视频| 国产美女在线精品| 成人自拍视频在线观看| 丁香一区二区三区| 99久久精品费精品国产一区二区| 成人激情视频网站| 99精品欧美一区二区蜜桃免费 | 欧美三级日韩在线| 欧美男女性生活在线直播观看| 日韩一区二区在线看| 欧美精品一区男女天堂| 国产精品久久久久久久久动漫 | 欧美一区二区网站| 精品盗摄一区二区三区| 国产欧美日韩不卡| 成人免费在线视频| 亚洲最快最全在线视频| 婷婷成人综合网| 麻豆91在线播放免费| 国产成人一级电影| 91久久香蕉国产日韩欧美9色| 欧美丝袜丝交足nylons| 欧美大肚乱孕交hd孕妇| 中文字幕免费不卡| 亚洲桃色在线一区| 免费在线观看不卡| av不卡在线播放| 日韩视频国产视频| 1024国产精品| 久久 天天综合| 91蜜桃视频在线| 精品国产不卡一区二区三区| 亚洲桃色在线一区| 久久精品99久久久| 色伊人久久综合中文字幕| 日韩免费电影一区| 亚洲人成在线观看一区二区| 美女视频网站久久| 99re热视频精品| 欧美精品一区二区三区高清aⅴ| 亚洲免费观看高清完整版在线观看| 日韩高清国产一区在线| av影院午夜一区| 日韩一区二区电影网| 国产精品另类一区| 美美哒免费高清在线观看视频一区二区| 国产精品中文字幕欧美| 欧美精品 国产精品| 亚洲图片激情小说| 加勒比av一区二区| 欧美视频中文字幕| 综合久久久久综合| 国产999精品久久久久久绿帽| 欧美群妇大交群中文字幕| 亚洲同性同志一二三专区| 国精产品一区一区三区mba桃花| 欧美日精品一区视频| 国产精品麻豆一区二区| 精品一区二区三区欧美| 欧美性猛交xxxx乱大交退制版| 中文在线资源观看网站视频免费不卡| 青青草97国产精品免费观看无弹窗版| 99精品欧美一区二区蜜桃免费| 久久亚区不卡日本| 丝袜美腿亚洲一区二区图片| 欧美羞羞免费网站| 亚洲精品国产第一综合99久久| 高清视频一区二区| 久久精品视频在线免费观看| 麻豆成人综合网| 日韩一区二区三区视频在线 | 尤物av一区二区| 成年人国产精品| 中文字幕不卡一区| eeuss鲁片一区二区三区 | bt7086福利一区国产| 国产亚洲女人久久久久毛片| 国产一区二区三区免费| 日韩午夜电影av|