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

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

?? mmupro36lib.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
    mmuCurrentSet    };/******************************************************************************** mmuPro36LibInit - initialize module** Build a dummy translation table that will hold the page table entries* for the global translation table.  The mmu remains disabled upon* completion.** RETURNS: OK if no error, ERROR otherwise** ERRNO: S_mmuLib_INVALID_PAGE_SIZE*/STATUS mmuPro36LibInit     (    int pageSize	/* system pageSize (must be 4KB or 2MB) */    )    {    PTE * pDirectoryPtrTable;    PTE * pDirectoryTable;    INT32 ix;    /* check if the PSE and PAE are supported */    if ((sysCpuId.featuresEdx & (CPUID_PAE | CPUID_PSE)) !=        (CPUID_PAE | CPUID_PSE))        return (ERROR);    /* initialize the data objects that are shared with vmLib.c */    mmuStateTransArray = &mmuStateTransArrayLocal [0];    mmuStateTransArraySize =          sizeof (mmuStateTransArrayLocal) / sizeof (STATE_TRANS_TUPLE);    mmuLibFuncs = mmuLibFuncsLocal;    mmuPageBlockSize = PAGE_BLOCK_SIZE;    /* we assume a 4KB or 2MB page size */    if ((pageSize != PAGE_SIZE_4KB) && (pageSize != PAGE_SIZE_2MB))	{	errno = S_mmuLib_INVALID_PAGE_SIZE;	return (ERROR);	}    mmuPro36Enabled = FALSE;    mmuPageSize = pageSize;    /*      * set number of pages for the page directory table     * 2048 (4 * 512) PDEs * 8 byte = 16384 byte     */    nDirPages = (mmuPageSize == PAGE_SIZE_4KB) ? 4 : 1;    /*      * allocate the global page block array to keep track of which parts     * of virtual memory are handled by the global translation tables.     * Allocate on page boundary so we can write protect it.     */    globalPageBlock = (UINT8 *) memalign (mmuPageSize, mmuPageSize);    if (globalPageBlock == NULL)	return (ERROR);    bzero ((char *) globalPageBlock, mmuPageSize);    /*     * build a dummy translation table which will hold the PTE's for     * global memory.  All real translation tables will point to this     * one for controlling the state of the global virtual memory       */    /* allocate pages to hold the directory table */    pDirectoryTable = (PTE *) memalign (mmuPageSize, mmuPageSize * nDirPages);    if (pDirectoryTable == NULL)	{	free (globalPageBlock);	return (ERROR);	}    /* allocate a page to hold the directory pointer table */    mmuGlobalTransTbl.pDirectoryTable = pDirectoryPtrTable =         (PTE *) memalign (mmuPageSize, mmuPageSize);    if (pDirectoryPtrTable == NULL)	{	free (globalPageBlock);	free (pDirectoryTable);	return (ERROR);	}    bzero ((char *) pDirectoryPtrTable, mmuPageSize);    /* validate all the directory pointer table entries */    for (ix = 0; ix < mmuPdpTableNumEnt; ix++)	{        pDirectoryPtrTable[ix].bits[0]		= (UINT)pDirectoryTable + 						  (PD_SIZE * ix);        pDirectoryPtrTable[ix].bits[1]		= 0;        pDirectoryPtrTable[ix].field.present	= 1;        pDirectoryPtrTable[ix].field.pwt	= 0;        pDirectoryPtrTable[ix].field.pcd	= 0;	}    /* invalidate all the directory table entries */    for (ix = 0; ix < ((PD_SIZE * 4) / sizeof(PTE)); ix++)	{	pDirectoryTable[ix].field.present	= 0;	pDirectoryTable[ix].field.rw		= 0;	pDirectoryTable[ix].field.us		= 0;	pDirectoryTable[ix].field.pwt		= 0;	pDirectoryTable[ix].field.pcd		= 0;	pDirectoryTable[ix].field.access	= 0;	pDirectoryTable[ix].field.dirty		= 0;	if (pageSize == PAGE_SIZE_4KB)	    pDirectoryTable[ix].field.pagesize	= 0;	else	    pDirectoryTable[ix].field.pagesize	= 1;	pDirectoryTable[ix].field.global	= 0;	pDirectoryTable[ix].field.avail		= 0;	pDirectoryTable[ix].field.page		= -1;	pDirectoryTable[ix].field.page36	= 0;	pDirectoryTable[ix].field.reserved	= 0;	}    /* set CR4 register: PAE=1 PSE=0/1 PGE=1 */    if (pageSize == PAGE_SIZE_4KB)        vxCr4Set ((vxCr4Get() & ~CR4_PSE) | (CR4_PAE | CR4_PGE));    else        vxCr4Set (vxCr4Get() | (CR4_PSE | CR4_PAE | CR4_PGE));    return (OK);    }/******************************************************************************** mmuPteGet - get the PTE for a given page** mmuPteGet traverses a translation table and returns the (physical) address of* the PTE for the given virtual address.** RETURNS: OK or ERROR if there is no virtual space for the given address **/LOCAL STATUS mmuPteGet     (    MMU_TRANS_TBL *pTransTbl, 	/* translation table */    void *virtAddr,		/* virtual address */     PTE **result		/* result is returned here */    )    {    PTE * pDte;			/* directory table entry */    PTE * pDirectoryTable;	/* directory table */    PTE * pPageTable;		/* page table */    pDirectoryTable = (PTE *) (pTransTbl->pDirectoryTable->bits[0] & PDP_TO_ADDR);    pDte = &pDirectoryTable 	   [((UINT) virtAddr & (DIR_PTR_BITS | DIR_BITS)) >> DIR_INDEX];    if (mmuPageSize == PAGE_SIZE_4KB)	{        pPageTable = (PTE *) (pDte->bits[0] & PTE_TO_ADDR_4KB);         if ((UINT) pPageTable == (0xffffffff & PTE_TO_ADDR_4KB))	    return (ERROR);        *result = &pPageTable [((UINT) virtAddr & TBL_BITS) >> TBL_INDEX];	}    else	{        if ((UINT) pDte == (0xffffffff & PTE_TO_ADDR_2MB))	    return (ERROR);        *result = pDte;	}    return (OK);    }/******************************************************************************** mmuTransTblCreate - create a new translation table.** create a i86 translation table.  Allocates space for the MMU_TRANS_TBL* data structure and calls mmuTransTblInit on that object.  ** RETURNS: address of new object or NULL if allocation failed,*          or NULL if initialization failed.*/LOCAL MMU_TRANS_TBL *mmuTransTblCreate     (    )    {    MMU_TRANS_TBL * newTransTbl;    INT32 oldIntLev = 0;    BOOL wasEnabled;    MMU_UNLOCK (wasEnabled, oldIntLev);    newTransTbl = (MMU_TRANS_TBL *) malloc (sizeof (MMU_TRANS_TBL));    MMU_LOCK (wasEnabled, oldIntLev);    if (newTransTbl == NULL)	return (NULL);    if (mmuTransTblInit (newTransTbl) == ERROR)	{	free ((char *) newTransTbl);	return (NULL);	}    return (newTransTbl);    }/******************************************************************************** mmuTransTblInit - initialize a new translation table ** Initialize a new translation table.  The directory table is copied from the* global translation mmuGlobalTransTbl, so that we will share the global * virtual memory with all other translation tables.* * RETURNS: OK or ERROR if unable to allocate memory for directory table.*/LOCAL STATUS mmuTransTblInit     (    MMU_TRANS_TBL *newTransTbl		/* translation table to be inited */    )    {    PTE * pDirectoryPtrTable;	/* directory pointer table */    PTE * pDirectoryTable;	/* directory table */    INT32 oldIntLev = 0;    BOOL wasEnabled;    INT32 ix;    /* allocate a page to hold the directory pointer table */    MMU_UNLOCK (wasEnabled, oldIntLev);    newTransTbl->pDirectoryTable = pDirectoryPtrTable = 	(PTE *) memalign (mmuPageSize, mmuPageSize);    MMU_LOCK (wasEnabled, oldIntLev);    if (pDirectoryPtrTable == NULL)	return (ERROR);    /* allocate pages to hold the directory table */    MMU_UNLOCK (wasEnabled, oldIntLev);    pDirectoryTable = (PTE *) memalign (mmuPageSize, mmuPageSize * nDirPages);    MMU_LOCK (wasEnabled, oldIntLev);    if (pDirectoryTable == NULL)	{	free (pDirectoryPtrTable);	return (ERROR);	}    /* setup the directory pointer table */    for (ix = 0; ix < mmuPdpTableNumEnt; ix++)	{        pDirectoryPtrTable[ix].bits[0]		= (UINT)pDirectoryTable +					 	  (PD_SIZE * ix);        pDirectoryPtrTable[ix].bits[1]		= 0;        pDirectoryPtrTable[ix].field.present	= 1;        pDirectoryPtrTable[ix].field.pwt	= 0;        pDirectoryPtrTable[ix].field.pcd	= 0;	}    /*      * copy the directory table from the mmuGlobalTransTbl,      * so we get the global virtual memory      */    bcopy ((char *) (mmuGlobalTransTbl.pDirectoryTable->bits[0] & PDP_TO_ADDR), 	   (char *) pDirectoryTable, PD_SIZE * 4);    /*      * write protect virtual memory pointing to the directory pointer table      * and the directory table in the global translation table to insure      * that it can't be corrupted      */    for (ix = 0; ix < nDirPages; ix++)	{        mmuStateSet (&mmuGlobalTransTbl, 		     (void *) ((UINT)pDirectoryTable + (mmuPageSize * ix)),		     MMU_STATE_MASK_WRITABLE, MMU_STATE_WRITABLE_NOT);	}    mmuStateSet (&mmuGlobalTransTbl, (void *) pDirectoryPtrTable, 		 MMU_STATE_MASK_WRITABLE, MMU_STATE_WRITABLE_NOT);    return (OK);    }/******************************************************************************** mmuTransTblDelete - delete a translation table.* * mmuTransTblDelete deallocates all the memory used to store the translation* table entries.  It does not deallocate physical pages mapped into the* virtual memory space.** RETURNS: OK**/LOCAL STATUS mmuTransTblDelete     (    MMU_TRANS_TBL *transTbl		/* translation table to be deleted */    )    {    PTE * pDte;    PTE * pDirectoryTable;	/* directory table */    PTE * pPageTable;    INT32 ix;    /* write enable the physical page containing the directory ptr table */    mmuStateSet (&mmuGlobalTransTbl, transTbl->pDirectoryTable,		 MMU_STATE_MASK_WRITABLE, MMU_STATE_WRITABLE);    /* write enable the physical page containing the directory table */    pDirectoryTable = (PTE *)(transTbl->pDirectoryTable->bits[0] & PDP_TO_ADDR);    for (ix = 0; ix < nDirPages; ix++)	{	pDte = (PTE *)((UINT)pDirectoryTable + (mmuPageSize * ix));        mmuStateSet (&mmuGlobalTransTbl, pDte, 		      MMU_STATE_MASK_WRITABLE, MMU_STATE_WRITABLE);	}    /* deallocate only non-global page blocks */    pDte = pDirectoryTable;    if (mmuPageSize == PAGE_SIZE_4KB)        for (ix = 0; ix < ((PD_SIZE * 4) / sizeof(PTE)); ix++, pDte++)	    if ((pDte->field.present == 1) && !globalPageBlock[ix]) 	        {	        pPageTable = (PTE *) (pDte->bits[0] & PTE_TO_ADDR_4KB);	        mmuStateSet (&mmuGlobalTransTbl, pPageTable,		             MMU_STATE_MASK_WRITABLE, MMU_STATE_WRITABLE);	        free (pPageTable);	        }    /* free the pages holding the directory table */    free ((void *) (transTbl->pDirectoryTable->bits[0] & PDP_TO_ADDR));    /* free the page holding the directory pointer table */    free (transTbl->pDirectoryTable);    /* free the translation table data structure */    free (transTbl);        return (OK);    }/******************************************************************************** mmuVirtualPageCreate - set up translation tables for a virtual page** simply check if there's already a page table that has a* PTE for the given virtual page.  If there isn't, create one.* this routine is called only if the page size is 4KB, since a page table* is not necessary for 2MB or 4MB page sizes.** RETURNS OK or ERROR if couldn't allocate space for a page table.*/LOCAL STATUS mmuVirtualPageCreate     (    MMU_TRANS_TBL *thisTbl, 		/* translation table */    void *virtPageAddr			/* virtual addr to create */    )    {    PTE * pDirectoryTable;	/* directory table */    PTE * pPageTable;		/* page table */    PTE * pDte;			/* directory table entry */    PTE * dummy;    INT32 oldIntLev = 0;    BOOL wasEnabled;    UINT ix;    if (mmuPteGet (thisTbl, virtPageAddr, &dummy) == OK)	return (OK);    MMU_UNLOCK (wasEnabled, oldIntLev);    pPageTable = (PTE *) memalign (mmuPageSize, mmuPageSize);    MMU_LOCK (wasEnabled, oldIntLev);    if (pPageTable == NULL)	return (ERROR);    /* invalidate every page in the new page block */    for (ix = 0; ix < (PT_SIZE / sizeof(PTE)); ix++)	{	pPageTable[ix].field.present	= 0;	pPageTable[ix].field.rw		= 0;	pPageTable[ix].field.us		= 0;	pPageTable[ix].field.pwt	= 0;	pPageTable[ix].field.pcd	= 0;	pPageTable[ix].field.access	= 0;	pPageTable[ix].field.dirty	= 0;	pPageTable[ix].field.pagesize	= 0;	pPageTable[ix].field.global	= 0;	pPageTable[ix].field.avail	= 0;	pPageTable[ix].field.page	= -1;	pPageTable[ix].field.page36	= 0;	pPageTable[ix].field.reserved	= 0;	}    /*      * write protect the new physical page containing the PTE's     * for this new page block      */    mmuStateSet (&mmuGlobalTransTbl, pPageTable, 	         MMU_STATE_MASK_WRITABLE, MMU_STATE_WRITABLE_NOT);     /*      * unlock the physical page containing the directory pointer table     * and the directory table, so we can modify it      */    pDirectoryTable = (PTE *) (thisTbl->pDirectoryTable->bits[0] & PDP_TO_ADDR);    for (ix = 0; ix < nDirPages; ix++)	{        mmuStateSet (&mmuGlobalTransTbl, 		     (void *) ((UINT32)pDirectoryTable + (mmuPageSize * ix)),		     MMU_STATE_MASK_WRITABLE, MMU_STATE_WRITABLE);	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美视频一二三区| 国产精品每日更新| 亚洲国产精品黑人久久久| 亚洲综合区在线| 国产大片一区二区| 3atv在线一区二区三区| 亚洲精品老司机| 国产91在线|亚洲| 欧美国产一区视频在线观看| 亚洲成人av免费| 91色porny蝌蚪| 国产精品三级久久久久三级| 韩国成人精品a∨在线观看| 欧美一区二区三区视频免费| 亚洲精品久久久蜜桃| 91日韩在线专区| 国产精品丝袜一区| 国产一区二区不卡老阿姨| 欧美一区二视频| 日韩精品成人一区二区三区| 欧美性感一类影片在线播放| 亚洲日本欧美天堂| 99在线精品视频| 亚洲视频一区在线| 岛国精品在线观看| 日本一区二区综合亚洲| 国产一区二区伦理| 国产亚洲一本大道中文在线| 韩国成人在线视频| 久久久国产午夜精品| 国产精品88av| 国产精品美女久久久久久久网站| 懂色av一区二区三区免费看| 欧美经典三级视频一区二区三区| 国产精品一区二区在线播放| 国产午夜亚洲精品午夜鲁丝片| 激情五月激情综合网| 久久综合五月天婷婷伊人| 国产成人啪免费观看软件| 中文字幕国产精品一区二区| 91免费版在线| 亚洲成人一区二区在线观看| 欧美精品色一区二区三区| 久久aⅴ国产欧美74aaa| 久久网站热最新地址| 成人免费高清视频| 依依成人综合视频| 欧美高清激情brazzers| 久久精品国产精品青草| 国产欧美精品一区| 91麻豆高清视频| 精品一区二区三区免费播放| 337p粉嫩大胆色噜噜噜噜亚洲| 国产一区二区三区四区五区美女| 欧美激情综合在线| 日本精品视频一区二区| 日本美女一区二区三区| 国产人伦精品一区二区| 91日韩一区二区三区| 蜜乳av一区二区| 国产精品国产三级国产aⅴ中文 | 欧美剧情片在线观看| 男女男精品网站| 国产欧美一区在线| 在线观看欧美精品| 国产一区二区三区久久久| 尤物在线观看一区| 久久亚区不卡日本| 欧美喷潮久久久xxxxx| 国产传媒久久文化传媒| 天堂资源在线中文精品| 中国av一区二区三区| 日韩亚洲电影在线| 在线观看日韩电影| 国产精品羞羞答答xxdd| 午夜精品福利在线| 国产精品嫩草99a| 日韩视频国产视频| 在线一区二区三区做爰视频网站| 国内精品免费在线观看| 一区二区三区产品免费精品久久75| 欧美mv日韩mv| 欧美色男人天堂| 99久久久免费精品国产一区二区| 日韩av电影免费观看高清完整版 | 久久国产夜色精品鲁鲁99| 亚洲视频一区二区在线| 久久精品视频免费观看| 欧美疯狂做受xxxx富婆| 色综合天天在线| 国产激情91久久精品导航| 蜜桃一区二区三区四区| 亚洲自拍都市欧美小说| 中文字幕亚洲一区二区va在线| 精品日韩一区二区三区免费视频| 欧美一级久久久| 色国产精品一区在线观看| 国产老肥熟一区二区三区| 亚洲精品国产a| 1000精品久久久久久久久| 久久影视一区二区| 欧美sm极限捆绑bd| 日韩亚洲欧美在线| 日韩欧美一级精品久久| 欧美精品在线观看一区二区| 欧美中文字幕一区二区三区| 91视频观看免费| 国产在线乱码一区二区三区| 蜜臀av一级做a爰片久久| 午夜视频一区二区三区| 午夜精品福利视频网站| 日韩精品久久久久久| 视频一区视频二区中文| 天天综合色天天综合| 亚洲第一av色| 亚洲国产日韩在线一区模特 | 久久天天做天天爱综合色| 欧美日韩精品一区视频| 欧美在线999| 欧美三级日韩三级| 欧美日韩一区二区三区在线| 在线播放中文一区| 91精品国产综合久久香蕉的特点| 555夜色666亚洲国产免| 日韩精品影音先锋| 久久精品日韩一区二区三区| 国产精品理伦片| 亚洲综合视频网| 蜜臀精品一区二区三区在线观看| 精品亚洲免费视频| 丁香婷婷综合网| 色婷婷av久久久久久久| 欧美日韩精品高清| 久久伊人蜜桃av一区二区| 国产精品污网站| 亚洲一区二区三区中文字幕| 奇米四色…亚洲| 成人黄页毛片网站| 欧美三级资源在线| 精品国产3级a| 亚洲欧洲综合另类| 毛片一区二区三区| 不卡免费追剧大全电视剧网站| 在线精品视频小说1| 精品久久久久久亚洲综合网 | 色噜噜狠狠成人中文综合| 在线成人av影院| 欧美极品少妇xxxxⅹ高跟鞋| 亚洲综合视频在线观看| 国内精品不卡在线| 日本伦理一区二区| 26uuu精品一区二区在线观看| 亚洲图片另类小说| 久久99精品国产.久久久久| 99re这里只有精品首页| 91精品在线麻豆| 亚洲三级理论片| 精久久久久久久久久久| 欧美综合一区二区| 欧美国产成人精品| 蜜臀久久99精品久久久久久9| 成人aa视频在线观看| 精品美女一区二区三区| 夜夜亚洲天天久久| 国产成人免费视| 日韩一区二区免费电影| 亚洲色图欧洲色图| 久久9热精品视频| 欧美日韩国产bt| 国产欧美日韩精品在线| 日韩av一区二区在线影视| 色婷婷亚洲婷婷| 国产精品久99| 国产精品小仙女| 精品国产凹凸成av人网站| 天堂一区二区在线| 色欲综合视频天天天| 国产精品你懂的在线欣赏| 久久精品99国产精品| 欧美疯狂性受xxxxx喷水图片| 日韩美女视频一区二区| 国产成人精品影视| 精品乱人伦小说| 免费看黄色91| 91精品麻豆日日躁夜夜躁| 亚洲综合色噜噜狠狠| 91猫先生在线| 亚洲婷婷国产精品电影人久久| 国产精品18久久久久久久久久久久 | 成人午夜大片免费观看| 久久综合成人精品亚洲另类欧美| 日韩精品欧美成人高清一区二区| 日本二三区不卡| 亚洲激情图片小说视频| 91无套直看片红桃| 亚洲天天做日日做天天谢日日欢 | 亚洲人成网站精品片在线观看| 国产精品亚洲人在线观看| 久久综合色之久久综合| 国产精品一区二区不卡|