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

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

?? syscache.c

?? VxWorkS下 MV2604的BSP源代碼
?? C
字號:
/* sysCache.c - secondary (L2) cache library for the Falcon *//* Copyright 1984-1997 Wind River Systems, Inc. *//* Copyright 1996 Motorola, Inc. *//*modification history--------------------01e,21sep98,fle  doc : fixed a problem with sysL2LookasideCacheSize declaration01d,14apr98,ms_  merged Motorola mv2700 support01c,16oct97,scb  added MPC750 (Arthur) support.01b,02jan97,wlf  doc: cleanup.01a,14sep96,rhk  written.*//*DESCRIPTIONThis library provides L2 cache support, and is derived fromcode supplied by Motorola.The L2 cache should always be set up in writethrough mode.  If theL2 cache jumper is present on the MVME2600 series board, it should be removed.The driver only sets or clears one bit at a time in the SystemExternal Cache Control register, per the Genesis 2 programmingguide.The flush bit in the System External Cache Control register shouldnot be used.*//* includes */#include "vxWorks.h"#include "mv2600.h"#if defined(INCLUDE_CACHE_SUPPORT) && defined(INCLUDE_CACHE_L2)/* forward declarations */STATUS           sysL2CacheInit (void);LOCAL STATUS     sysL2LookasideCacheInit (void);LOCAL STATUS     sysL2InlineCacheInit (void);LOCAL void       sysL2LookasideCacheEnable (void);LOCAL void       sysL2InlineCacheEnable (void);void             sysL2CacheDisable (void);LOCAL void       sysL2LookasideCacheDisable (void);LOCAL void       sysL2InlineCacheDisable (void);LOCAL UINT       sysL2LookasideCacheSize (void);LOCAL UINT       sysL2InlineCacheSize (void);LOCAL UINT	 sysL2InlineCacheSpd (void);LOCAL int	 nop (int);/* externals */IMPORT UINT sysL2crGet (void);IMPORT void sysL2crPut (UINT regVal);IMPORT UINT sysGetMpuSpd (void);LOCAL UINT gen2ConvTable[] =    {    0x0, 0x1, 0x2, 0x4, 0x5, 0x6, 0x0, 0x0, 0x0,    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0    };LOCAL float gen2FreqTable[] =    {    1.0, 1.0, 1.5, 2.0, 2.5, 3.0, 1.0, 1.0,    1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0    };/******************************************************************************** sysL2CacheInit - initialize the L2 cache ** This routine initializes and enables L2 cache support.  ** RETURNS: OK, or ERROR if cache is not present or not supported.**/ STATUS sysL2CacheInit (void)    {    STATUS status = OK;    /* check for presence of L2 cache */    if (sysL2LookasideCacheSize() != 0)	status |= sysL2LookasideCacheInit();    if (sysL2InlineCacheSize() != 0)	status |= sysL2InlineCacheInit();    return (status);    }/******************************************************************************** sysL2LookasideCacheInit - initialize the L2 lookaside cache ** This routine initializes and enables L2 lookaside cache support.** RETURNS: OK, or ERROR if cache is not present or not supported.**/ LOCAL STATUS sysL2LookasideCacheInit(void)    {    /* check for presence of L2 cache */    if (sysL2LookasideCacheSize() == 0)        return(ERROR);		/* No L2 cache to init */    /* disable the L2 cache, and invalidate the tags */    sysL2LookasideCacheDisable ();    /* Enable the L2 cache(s) */    sysL2LookasideCacheEnable();    return (OK);    }/******************************************************************************** sysL2InlineCacheInit - initialize the L2 in-line cache.** This routine initializes and enables L2 in-line cache support.** RETURNS: OK, or ERROR if cache is not present or not supported.**/ LOCAL STATUS sysL2InlineCacheInit(void)    {    UINT l2CacheSize;    UINT l2crVal;    UINT i;    /* check for presence of L2 cache */    if ((l2CacheSize = sysL2InlineCacheSize()) == 0)        return(ERROR);		/* No L2 cache to init */    /* Initialize RAM type, output hold, differential clock */    switch ( (*MV2600_MCR) & MV2600_MCR_L2TYPE_MSK )	{	case MV2600_MCR_L2TYPE_LWP:   /* Late Write, with Parity */	case MV2600_MCR_L2TYPE_LWNP:  /* Late Write, without Parity */	    l2crVal = 0x01814000;     /* L2PE  = No parity enable      				       * L2RAM = Pipe reg reg sync burst				       * L2OH  = 1.0ns				       * L2DF  = Diff clock				       */	    break;	case MV2600_MCR_L2TYPE_BP:    /* Burst with parity */	case MV2600_MCR_L2TYPE_BNP:   /* Burst, without Parity */	    l2crVal = 0x01000000;     /* L2PE  = No parity enable      				       * L2RAM = Flow thru reg buf sync burst				       * L2OH  = 0.5ns				       * L2DF  = Nondiff clock				       */	    break;	default:	    l2crVal = 0;	    break;	}    /* Initialize the L2 clock ratio */    i = (*MV2600_MCR & MV2600_MCR_L2PLL_MSK) >> 8;    l2crVal |= gen2ConvTable[i] << 25;    if (sysL2InlineCacheSpd() < 100)        l2crVal |= MPC750_L2CR_SL;    /* Set the Cache size */    switch (l2CacheSize)	{	case 0x00040000:	    l2crVal |= MPC750_L2CR_256K;	    break;	case 0x00080000:	    l2crVal |= MPC750_L2CR_512K;	    break;	case 0x00100000:	    l2crVal |= MPC750_L2CR_1024K;	    break;	}    /* Write out the L2 cache control register */    sysL2crPut(l2crVal);    /* Invalidate the L2 cache */    l2crVal |= MPC750_L2CR_I;    sysL2crPut(l2crVal);    while (sysL2crGet() & MPC750_L2CR_IP)	;    l2crVal &= ~MPC750_L2CR_I;    sysL2crPut(l2crVal);    /* Enable the L2 cache */    sysL2InlineCacheEnable();    return (OK);    }/******************************************************************************** sysL2LookasideCacheEnable - enable the L2 lookaside cache* * RETURNS: void**/ LOCAL void sysL2LookasideCacheEnable (void)    {    unsigned char regVal;     if (sysL2LookasideCacheSize() == 0)	return;                   /* Return if no L2 Lookaside cache present */    /* make sure L2 is already disabled */    regVal = ((*MV2600_SXCCR) & L2_ENABLE);    if (regVal == 0)        *MV2600_SXCCR |= L2_ENABLE;    }/******************************************************************************** sysL2InlineCacheEnable - enable the L2 in-line cache* * RETURNS: void**/ LOCAL void sysL2InlineCacheEnable (void)    {    UINT l2crVal;     if (sysL2InlineCacheSize() == 0)	return;                   /* Return if no L2 Lookaside cache present */    /* make sure L2 is already disabled */    if ( ((l2crVal = sysL2crGet()) & MPC750_L2CR_E) == 0)	{        l2crVal |= MPC750_L2CR_E;	sysL2crPut(l2crVal);	}    }/******************************************************************************** sysL2CacheDisable - enable the L2 cache(s)* * RETURNS: void**/ void sysL2CacheDisable (void)    {    UINT cacheSize;    if ((cacheSize = sysL2LookasideCacheSize()) != 0)	{	sysL2LookasideCacheDisable();	}    if ((cacheSize = sysL2InlineCacheSize()) != 0)	{	sysL2InlineCacheDisable();	}    }/******************************************************************************** sysL2LookasideCacheDisable - disable the L2 lookaside cache** This routine disables the L2 lookaside cache if it was previously * initialized using sysL2CacheInit().  Calling this routine invalidates * the L2 tag bits.** RETURNS: N/A**/ LOCAL void sysL2LookasideCacheDisable (void)    {    unsigned char	regVal;    int		  	temp;    int			i;    if (sysL2LookasideCacheSize() == 0)	return;                          /* No cache to disable */    /* Invalidate all L2 cache tags, clear the SXC_RST bit */    regVal = *MV2600_SXCCR;    regVal &= (~L2_RESET);    *MV2600_SXCCR = regVal;    for (i=0; i<=10; i++)        temp = nop ( i );     /* reset the SXC_RST bit in the cache control reg. */    *MV2600_SXCCR |= L2_RESET;    /* disable the L2 cache */    regVal = *MV2600_SXCCR;    regVal &= (~L2_DISABLE);    *MV2600_SXCCR = regVal;    }/******************************************************************************** sysL2InlineCacheDisable - disable the L2 in-line cache** If the in-line cache is enabled, this routine disables it via the following* steps:** .IP "1."* Flush by reading one word from each cache line within a cache* enabled buffer.  Note that this buffer should be twice the size of* the L2 cache to override the pseudo-LRU replacement algorithm.* .IP "2."* Turn of the cache enable bit in the L2CR.** RETURNS: N/A**/ LOCAL void sysL2InlineCacheDisable (void)    {    ULONG tmp;    ULONG l2crVal;    int i;    if ((l2crVal = sysL2crGet()) & MPC750_L2CR_E)	{	if (vxHid0Get() & _PPC_HID0_DCE)	    {	    for (i = (2 * sysL2InlineCacheSize()); i >= 0; i -= 32 )                    tmp = *((ULONG *)0 + i);	    }	sysL2crPut(l2crVal & ~MPC750_L2CR_E);	}    }/******************************************************************************** sysL2LookasideCacheSize - Determine size of the L2 lookaside cache.** This function returns the size of the L2 lookaside cache.  If no L2* lookaside cache is present, the size returned is zero so this function's* return value can be used like a boolean to determine if the L2 lookaside* cache is actually present.** RETURNS: Size of L2 lookaside cache or zero if lookaside cache not present.** NOTE: The L2 lookaside cache is sometimes referred to as the "glance" cache.*/ LOCAL UINT sysL2LookasideCacheSize()    {    STATUS size;    switch ( *MV2600_CCR & MV2600_CCR_SYSXC_MSK )	{        case MV2600_CCR_SYSXC_1024:	    size = 0x100000;	    /* 1MB cache present */	    break;        case MV2600_CCR_SYSXC_512:     	    size = 0x80000;         /* 512K cache present */	    break;        case MV2600_CCR_SYSXC_256:	    size = 0x40000;         /* 256K cache present */            break; 	                   default:            size = 0 ;              /* L2 lookaside cache is not present */	    break;	}    return(size);    }/******************************************************************************** sysL2InlineCacheSize - Determine size of the L2 in-line cache.** This function returns the size of the L2 in-line cache.  If no L2* in-line cache is present, the size returned is zero so this function's* return value can be used like a boolean to determine if the L2 in-line* cache is actually present.** RETURNS: Size of L2 in-line cache or zero if in-line cache not present.** NOTE: Don't confuse the L2 in-line cache with the other possible type* of cache, referred to as the "glance" or "lookaside" cache.*/ LOCAL UINT sysL2InlineCacheSize()    {    STATUS size;    if (CPU_TYPE != CPU_TYPE_750)	return(0);	/* Not an Arthur chip so no in-line L2 cache */    switch ( *MV2600_CCR & MV2600_CCR_P0STAT_MSK )        {        case MV2600_CCR_P0STAT_256: 	    size = 0x40000; 	    break;        case MV2600_CCR_P0STAT_512: 	    size = 0x80000; 	    break;        case MV2600_CCR_P0STAT_1024: 	    size = 0x100000; 	    break;        default: 	    size = 0; 	    break;        }    return(size);    }/******************************************************************************** sysL2InlineCacheSpd - Determine size of the L2 in-line cache.** This function returns the size of the L2 in-line cache.  If no L2* in-line cache is present, the size returned is zero so this function's* return value can be used like a boolean to determine if the L2 in-line* cache is actually present.** RETURNS: Size of L2 in-line cache or zero if in-line cache not present.** NOTE: Don't confuse the L2 in-line cache with the other possible type* of cache, referred to as the "glance" or "lookaside" cache.*/ LOCAL UINT sysL2InlineCacheSpd(void)   {   UINT l2Spd;   UINT i;   if (sysL2InlineCacheSize() == 0)      return(0);      i = (*MV2600_MCR & MV2600_MCR_L2PLL_MSK) >> 8;   l2Spd = (UINT)((sysGetMpuSpd() / gen2FreqTable[i]) + 0.5);   return(l2Spd);   }/******************************************************************************** nop - no op** NOMANUAL*/ LOCAL int nop    (    int dummy    )    {    return (dummy + 1);    }#endif	/* INCLUDE_CACHE_SUPPORT && INCLUDE_CACHE_L2 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产精品自拍| 久久久91精品国产一区二区精品 | 久久精品夜色噜噜亚洲a∨ | 精品一区二区免费看| 亚洲 欧美综合在线网络| 亚洲无线码一区二区三区| 亚洲国产日韩在线一区模特| 夜夜爽夜夜爽精品视频| 亚洲一区在线播放| 午夜欧美在线一二页| 麻豆极品一区二区三区| 狠狠色综合播放一区二区| 国产在线精品一区二区夜色| 国产在线一区二区综合免费视频| 国产在线一区二区综合免费视频| 国产福利91精品一区| 成人avav影音| 在线观看网站黄不卡| 欧美精品v国产精品v日韩精品| 欧美日韩精品三区| 精品美女在线播放| 中文字幕中文字幕一区| 亚洲成人激情自拍| 麻豆精品国产传媒mv男同| 国产ts人妖一区二区| 一本大道av伊人久久综合| 制服丝袜亚洲播放| 久久精品欧美日韩| 亚洲在线中文字幕| 国产精品99久久久久久似苏梦涵| 91亚洲精品久久久蜜桃网站| 欧美二区三区的天堂| 精品999在线播放| 亚洲欧美色一区| 久久97超碰色| 色一情一伦一子一伦一区| 717成人午夜免费福利电影| 日本一区二区电影| 午夜激情一区二区| 99久久久国产精品免费蜜臀| 日韩一区二区在线免费观看| 国产精品网曝门| 日本三级韩国三级欧美三级| 成人高清视频在线观看| 精品久久国产字幕高潮| 亚洲黄色免费电影| 福利一区在线观看| 日韩欧美在线观看一区二区三区| 国产精品青草综合久久久久99| 日本怡春院一区二区| 91美女片黄在线观看| 久久综合五月天婷婷伊人| 亚洲一区二区三区四区中文字幕| 国产在线国偷精品产拍免费yy| 欧美日韩极品在线观看一区| 国产精品久久久久aaaa樱花 | 日韩亚洲欧美一区二区三区| 国产精品嫩草影院av蜜臀| 九色综合狠狠综合久久| 欧美日韩一级视频| 亚洲精品久久7777| 色悠久久久久综合欧美99| 国产精品久久久爽爽爽麻豆色哟哟| 九九视频精品免费| 日韩美女视频在线| 久久精品国产一区二区三| 91精品国产综合久久久久| 亚洲专区一二三| 欧美天堂一区二区三区| 一区二区三区色| 在线一区二区三区做爰视频网站| 亚洲国产精品精华液ab| 国产精品一二二区| 欧美激情资源网| 成人黄色免费短视频| 国产蜜臀av在线一区二区三区 | 中文字幕av一区二区三区高| 狠狠色丁香婷婷综合久久片| 欧美成人r级一区二区三区| 久久国产精品72免费观看| 精品乱人伦小说| 国产酒店精品激情| 国产女人18毛片水真多成人如厕 | 精品在线亚洲视频| 精品成人一区二区| 国产老女人精品毛片久久| 精品粉嫩aⅴ一区二区三区四区| 另类小说一区二区三区| 久久色在线观看| 国产精品中文字幕一区二区三区| 久久亚洲一级片| 成人小视频免费在线观看| 亚洲欧洲国产日韩| 欧美美女一区二区| 国产麻豆视频一区二区| 亚洲欧美在线视频| 欧美欧美欧美欧美首页| 国内精品嫩模私拍在线| 国产精品久久久久影院| 欧亚一区二区三区| 韩国一区二区视频| 亚洲精品国产品国语在线app| 欧美综合一区二区| 精品亚洲欧美一区| 中文字幕亚洲区| 91精品国产综合久久精品图片| 狠狠色丁香婷综合久久| 亚洲精品国产无天堂网2021| 欧美一区二区三区在线看| 国产一区二区日韩精品| 国产精品成人午夜| 日韩一级片在线观看| 风间由美一区二区av101| 亚洲一区影音先锋| 日本一区二区视频在线| 欧美精品在线观看一区二区| 粉嫩aⅴ一区二区三区四区五区| 亚洲一区二区美女| 中文在线资源观看网站视频免费不卡| 欧美色综合天天久久综合精品| 国产一区二区看久久| 伊人色综合久久天天人手人婷| 日韩欧美综合一区| 欧美在线观看视频一区二区三区| 韩国三级电影一区二区| 亚洲综合一二三区| 中文一区二区完整视频在线观看| 7777精品伊人久久久大香线蕉| 97超碰欧美中文字幕| 狠狠狠色丁香婷婷综合久久五月| 亚洲综合视频网| 亚洲欧洲精品天堂一级| 久久亚洲一区二区三区四区| 91精品久久久久久久91蜜桃 | 看片的网站亚洲| 一区二区三国产精华液| 欧美韩国日本不卡| 久久九九影视网| 精品免费国产一区二区三区四区| 欧美色图12p| 在线观看网站黄不卡| 91视频在线观看免费| 国产成人精品免费在线| 精品一区二区三区在线观看| 青青草视频一区| 午夜一区二区三区在线观看| 亚洲精品高清在线观看| 亚洲欧洲精品天堂一级| 亚洲欧洲成人精品av97| 国产欧美日韩中文久久| 亚洲国产经典视频| 欧美国产欧美亚州国产日韩mv天天看完整 | 精品国产sm最大网站免费看| 欧美精品v日韩精品v韩国精品v| 欧美日韩精品一区二区三区四区| 91美女视频网站| 色综合天天综合给合国产| 99久久精品一区二区| 色呦呦日韩精品| 欧美日韩在线不卡| 欧美二区在线观看| 欧美xxxx在线观看| 欧美激情一区二区三区蜜桃视频| 国产欧美一区二区精品久导航| 国产精品乱码久久久久久| 国产精品国产三级国产aⅴ入口| 亚洲欧美日本在线| 日韩高清中文字幕一区| 蜜臀久久久久久久| 国产精品综合网| 不卡电影一区二区三区| 欧美写真视频网站| 国产69精品久久久久777| 99精品国产热久久91蜜凸| 欧美怡红院视频| 精品久久久久久亚洲综合网| 国产蜜臀av在线一区二区三区| 亚洲欧洲制服丝袜| 奇米888四色在线精品| 懂色av噜噜一区二区三区av| 99re这里只有精品6| 欧美精品自拍偷拍| 国产欧美一区二区精品婷婷| 亚洲伊人伊色伊影伊综合网| 免费人成精品欧美精品| 国产不卡在线视频| 在线观看日韩av先锋影音电影院| 欧美一区二区三区免费观看视频 | 精品美女一区二区三区| 综合久久国产九一剧情麻豆| 日韩精品一卡二卡三卡四卡无卡| 黄网站免费久久| 欧美三级韩国三级日本一级| 26uuu精品一区二区| 一区二区三区精密机械公司| 狠狠色丁香九九婷婷综合五月| 在线精品国精品国产尤物884a| 亚洲精品一区在线观看| 一区二区三区精品视频| 国产东北露脸精品视频|