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

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

?? vxlib.c

?? vxworks的源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* vxLib.c - miscellaneous support routines *//* Copyright 1984-2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01y,16dec02,mil  Updated support for PPC85XX.01x,03aug02,pcs  Add support for PPC85XX and make it the same as PPC603 for                 the present.01w,09may02,dtr  Using vxPlprcrSet function for SPR34619.01v,23apr02,pch  Handle _EXC_OFF_PROT as well as _EXC_OFF_DATA - SPR 7613701u,17apr02,jtp  support PPC440 cache & mmu01t,25mar02,kab  SPR 74651: PPC604 does not disable power down.01s,22oct01,dtr  Fix for SPR65678. Code for PPC860 should lock/unlock keyed                 registers due to board lock up/register corruption. S/W fix                 for h/w problem.01r,16aug01,pch  Add PPC440 support01q,04dec00,s_m  removed vxExierEnable/Disable for 40501p,25oct00,s_m  renamed PPC405 cpu types01o,06oct00,sm   PPC405 support01n,14jun2k,alp  Added PPC405 support.01m,10nov99,cmc  Use vxImemBaseGet not vxImmrGet to get 555 internal mem map01l,14sep99,cmc  Added MPC555 power mgt support01p,12mar99,elg  VX_POWER_MODE_NAP is not supported by PPC860 (doc change)                 (SPR 22432).01o,18aug98,tpr  added PowerPC EC 603 support.01n,07aug97,tam  fixed vxMemProbe for PPC403 on write (SPR #8370)01m,04jun97,dat  added _func_vxMemProbeHook and vxMemArchProbe, SPR 8658.01l,23oct96,tam  added vxPowerModeSet() and vxPowerModeGet() functions.01k,28feb96,tam  removed vxFitXXX() & vxPitXXX functions.01j,27feb96,ms   reworked vxMemProbeTrap().01i,23feb96,tpr  moved vxDecXXX() functions to /drc/timer/ppcDecTimer.c.01h,27jun95,caf  received new __gh_va_arg(), fixed "&" in it courtesy dnw.01g,15jun95,caf  added EABI __va_arg() courtesy Diab Data, Inc.01f,24may95,caf  fixed misplaced #endif in version 01e.01e,22may95,caf  conditionally compiled __gh_va_arg().01d,27apr95,caf  made vxDecCount global, removed vxDecEnable(),		 added Green Hills helper routine __gh_va_arg().01c,09feb95,yao  fixed vxMemProbe to reinstall the right handler.  added		 alignment checking for short for PPC403.01b,11oct94,yao  added PIT,FIT handling routines for 403. added code		 for vxMemProbe.01a,11oct94,yao  written.*//*DESCRIPTIONThis module contains miscellaneous VxWorks support routines.SEE ALSO: vxALib*/#include "vxWorks.h"#include "vxLib.h"#include "intLib.h"#include "ioLib.h"#include "iv.h"#include "esf.h"#include "private/taskLibP.h"#include "stdarg.h"#include "excLib.h"#if	(CPU == PPC860)			/* necessary to prevent name clashes */#include "drv/multi/ppc860Siu.h"	/* with h/arch/ppc/ppc403.h */#endif	/* CPU == PPC860 */#if	(CPU == PPC555)			/* necessary to prevent name clashes */#include "drv/multi/ppc555Siu.h"	/* with h/arch/ppc/ppc403.h */#endif	/* CPU == PPC555 */#if	( (CPU == PPC403) || (CPU == PPC405)  || (CPU == PPC405F) || (CPU == PPC440))#include "cacheLib.h"#endif	/* CPU == PPC40x *//* globals */UINT32	vxPowMgtEnable = FALSE;		/* power management status */#if (CPU == PPC860)UINT32  vx860KeyedRegUsed = FALSE;      /* Lock/Unlock Keyed registers on access */#endifSTATUS (* _func_vxMemProbeHook)	    (void *,int,int, void *) = NULL;	/* hook for BSP vxMemProbe *//* locals */#if	((CPU == PPC603) || (CPU == PPCEC603) || (CPU == PPC604) || \	 (CPU == PPC860) || (CPU == PPC555) || (CPU == PPC85XX))LOCAL  UINT32  vxPowMgtMode = VX_POWER_MODE_DISABLE; /* power management mode */#endif	/* PPC603, PPCEC603, PPC604, PPC860, PPC555 *//* forward declarations */IMPORT STATUS  vxMemProbeSup (int length, char * src, char * dest);IMPORT STATUS  vxMemArchProbe (void *, int, int, void *);IMPORT FUNCPTR excVecGet (FUNCPTR * vector);IMPORT void    excVecSet (FUNCPTR * vector, FUNCPTR proc);IMPORT int     vmpxx();#if (CPU==PPC860)IMPORT void    vxPlprcrSet (UINT32*,UINT32,UINT32);#endif/******************************************************************************** vxMemProbeTrap - trap handler for vxMemProbe exception** This routine is called from the excConnectCode stub if vxMemProbeSup* generates an exception. By default, vxMemProbeSup returns OK.* This code changes the PC value to "vxpxx" (within the vxMemProbeSup* routine), and vxpxx sets the return value to ERROR.** INTERNAL* A Data Machine Check exception (external bus error, non-configured memory* error, bank protection violation, or time-out during data-side access)* because of a write/load access to an non-configured memory address which* was not in the data cache still causes a data cache line fill to occur on* PowerPC 403 CPU. The data in this cache line is invalid, however the data* cache has no way of knowing that and so does flag this cache line has valid.* When this cache line need to be replaced, the data is written back to memory* if it was a write access, then generating another machine check.* With load access on an non-configured memory address, the cache line fill* occurs too, however the cache line is not written back to memory.* It is therefore necessary for vxMemProbeTrap() to invalidated this cache* line to prevent it to be written back to memory.** However, we must not do this for MMU protection violations (_EXC_OFF_PROT)* because the invalidate operation would cause another _EXC_OFF_PROT and* infinite recursion.*/static int vxMemProbeTrap    (    ESFPPC *    pEsf            /* pointer to exception stack frame */    )    {    REG_SET *pRegSet = &pEsf->regSet;#if	( (CPU == PPC403) || (CPU == PPC405)  || (CPU == PPC405F) || (CPU == PPC440))    UINT32 adrs;    int vecNum = pEsf->vecOffset;	/* exception vector number */    if ((cacheLib.invalidateRtn != NULL) && (vecNum == _EXC_OFF_MACH))	{	/* get the offending address */#if	( (CPU == PPC403) || (CPU == PPC405)  || (CPU == PPC405F))	    adrs = pEsf->bear;#else	/* CPU == PPC40x */	    adrs = pEsf->dear;#endif /* CPU == PPC40x */	/* invalidate the corresponding cache line */	cacheLib.invalidateRtn(DATA_CACHE, adrs, 16);	}#endif	/* CPU == PPC4xx */    pRegSet->pc = (_RType)vmpxx;        /* vmpxx will force an ERROR return */    return (0);    }/******************************************************************************** vxMemArchProbe - architecture specific probe routine (PPC)** This is the routine implementing the architecture specific part of the* vxMemProbe routine.  It traps the relevant* exceptions while accessing the specified address.** RETURNS: OK or ERROR if an exception occurred during access.*/STATUS vxMemArchProbe    (    void* adrs,		/* address to be probed */    int mode,		/* VX_READ or VX_WRITE */    int length,		/* 1, 2, 4, 8, or 16 */    void* pVal 		/* where to return value, */			/* or ptr to value to be written */    )    {    int oldLevel;    FUNCPTR oldVec1;	/* for saving _EXC_OFF_MACH */#ifdef	_EXC_OFF_DATA    FUNCPTR oldVec2;	/* for saving _EXC_OFF_DATA */#endif	/* _EXC_OFF_DATA */    FUNCPTR oldVec3;	/* for saving _EXC_OFF_ALIGN */#ifdef	_EXC_OFF_PROT    FUNCPTR oldVec4;	/* for saving _EXC_OFF_PROT */#endif	/* _EXC_OFF_PROT */    STATUS result;    /* CPU specific address verification */    switch (length)        {        case (1):	    break;        case (2):#if	(CPU==PPC403)            if (((int) adrs & 0x1) || ((int) pVal & 0x1))                return (ERROR);#endif	/* (CPU==PPC403) */            break;        case (4):            if (((int) adrs & 0x3) || ((int) pVal & 0x3))                return (ERROR);            break;        case (8):	    if (((int) adrs & 0x7) || ((int) pVal & 0x7))	    return (ERROR);	    break;	case (16):	    if (((int) adrs & 0xf) || ((int) pVal & 0xf))	    return (ERROR);	    break;        default:            return (ERROR);        }    oldLevel = intLock ();			/* lock out CPU */    oldVec1 = excVecGet ((FUNCPTR *) _EXC_OFF_MACH);    excVecSet ((FUNCPTR *) _EXC_OFF_MACH, FUNCREF(vxMemProbeTrap)); #ifdef	_EXC_OFF_DATA    oldVec2 = excVecGet ((FUNCPTR *) _EXC_OFF_DATA);    excVecSet ((FUNCPTR *) _EXC_OFF_DATA, FUNCREF(vxMemProbeTrap)); #endif	/* _EXC_OFF_DATA */#ifdef	_EXC_OFF_PROT    /*     * _EXC_OFF_DATA and _EXC_OFF_PROT are mutually exclusive today,     * and most likely always will be, but it costs nothing to name     * the save areas uniquely and prevent any possible problem.     */    oldVec4 = excVecGet ((FUNCPTR *) _EXC_OFF_PROT);    excVecSet ((FUNCPTR *) _EXC_OFF_PROT, FUNCREF(vxMemProbeTrap)); #endif	/* _EXC_OFF_PROT */    oldVec3 = excVecGet ((FUNCPTR *) _EXC_OFF_ALIGN);    excVecSet ((FUNCPTR *) _EXC_OFF_ALIGN, FUNCREF(vxMemProbeTrap));     /* do probe */    if (mode == VX_READ)	result = vxMemProbeSup (length, adrs, pVal);    else	result = vxMemProbeSup (length, pVal, adrs);    /* restore original vector(s) and unlock */    excVecSet ((FUNCPTR *) _EXC_OFF_MACH, oldVec1);#ifdef	_EXC_OFF_DATA    excVecSet ((FUNCPTR *) _EXC_OFF_DATA, oldVec2);#endif	/* _EXC_OFF_DATA */#ifdef	_EXC_OFF_PROT    excVecSet ((FUNCPTR *) _EXC_OFF_PROT, oldVec4);#endif	/* _EXC_OFF_PROT */    excVecSet ((FUNCPTR *) _EXC_OFF_ALIGN, oldVec3);    intUnlock (oldLevel);    return (result);    }/********************************************************************************* vxMemProbe - probe an address for a bus error** This routine probes a specified address to see if it is readable or* writable, as specified by <mode>.  The address will be read or written as* 1, 2, 4, 8, or 16 bytes as specified by <length> (other values* yield unpredictable results).  If the probe is a O_RDONLY, the value read will* be copied to the location pointed to by <pVal>.  If the probe is a O_WRONLY,* the value written will be taken from the location pointed to by <pVal>.* In either case, <pVal> should point to a location of the size specified by* <length>.** Note that only data bus errors (machine check exception,  data access * exception) are trapped during the probe, and that the access must be * otherwise valid (i.e., not generate an address error).** EXAMPLE* .CS* testMem (adrs)*    char *adrs;*    {*    char testW = 1;*    char testR;**    if (vxMemProbe (adrs, VX_WRITE, 1, &testW) == OK)*        printf ("value %d written to adrs %x\en", testW, adrs);**    if (vxMemProbe (adrs, VX_READ, 1, &testR) == OK)*        printf ("value %d read from adrs %x\en", testR, adrs);*    }* .CE** MODIFICATION* The BSP can modify the behaviour of this routine by supplying an alternate* routine and placing the address of the routine in the global variable* _func_vxMemProbeHook.  The BSP routine will be called instead of the* architecture specific routine vxMemArchProbe().** INTERNAL* This routine functions by setting the machine check, data access and* alignment exception vector to vxMemProbeTrap and then trying to read/write * the specified byte. If the address doesn't exist, or access error occurs,* vxMemProbeTrap will return ERROR.  Note that this routine saves and restores * the excpetion vectors that were there prior to this call.  The entire * procedure is done with interrupts locked out.** RETURNS:* OK if the probe is successful, or* ERROR if the probe caused a bus error.** SEE ALSO: vxMemArchProbe()*/STATUS vxMemProbe    (    FAST char *adrs,	/* address to be probed */    int mode,		/* VX_READ or VX_WRITE */    int length,		/* 1, 2, or 4 */    char *pVal 		/* where to return value, */			/* or ptr to value to be written */    )    {    STATUS status;    if (_func_vxMemProbeHook != NULL)	/* BSP specific probe routine */	status = (* _func_vxMemProbeHook) ((void *)adrs, mode, length,					    (void *)pVal);    else	/* architecture specific probe routine */	status = vxMemArchProbe ((void *)adrs, mode, length, (void *)pVal);        return status;    }/********************************************************************************* vxPowerModeSet - set the power management mode** This routine selects the power management mode which will be activated* only when the routine vxPowerDown() is called. * vxPowerModeSet() is normally called in the BSP initialization routine * (sysHwInit). * Power management modes include the following:* .iP "VX_POWER_MODE_DISABLE (0x1)"* Power management is disable: this prevents MSR(POW) bit to be set (all PPC).* .iP "VX_POWER_MODE_FULL (0x2)"* All CPU units are active while the kernel is iddle (PPC555, PPC603, PPCEC603 and* PPC860 only).* .iP "VX_POWER_MODE_DOZE (0x4)"* Only the decrementer, data cache and bus snooping are active (PPC555, PPC603, PPCEC603* and PPC860).* .iP "VX_POWER_MODE_NAP (0x8)"* Only the decrementer is active (PPC603, PPCEC603 and PPC604).* .iP "VX_POWER_MODE_SLEEP (0x10)"* All CPU units are inactive while the kernel is idle (PPC555, PPC603, PPCEC603 and* PPC860) - not recommended for the PPC603 and PPCEC603 architecture.* .iP "VX_POWER_MODE_DEEP_SLEEP (0x20)"* All CPU units are inactive while the kernel is idle (PPC555 and PPC860 only) - not* recommended.* .iP "VX_POWER_MODE_DPM (0x40)"* Dynamic Power Management Mode	(PPC603 and PPCEC603 only).* .iP "VX_POWER_MODE_DOWN (0x80)"* Only a hard reset causes an exit from power-down low power mode (PPC555 and PPC860 only)* - not recommended.** RETURNS: OK, or ERROR if <mode> is incorrect or not supported by the* processor.** SEE ALSO:* vxPowerModeGet(), vxPowerDown()*/STATUS vxPowerModeSet     (    UINT32 mode			/* power management mode to select */    )    {#if	((CPU == PPC603) || (CPU == PPCEC603) || (CPU == PPC85XX))    UINT32 hid0Mode;    /* set hid0Mode, vxPowMgtEnable and vxPowMgtMode according to <mode> */    switch (mode)	{    	case VX_POWER_MODE_DISABLE:	    hid0Mode = 0;	    vxPowMgtEnable = FALSE;	    vxPowMgtMode = VX_POWER_MODE_DISABLE;	    break;#if (CPU != PPC85XX)    	case VX_POWER_MODE_DPM:	    hid0Mode = _PPC_HID0_DPM;	    vxPowMgtMode = VX_POWER_MODE_DPM;    	    vxPowMgtEnable = TRUE;	    break;#endif  /* CPU != PPC85XX */    	case VX_POWER_MODE_FULL:	    hid0Mode = 0;	    vxPowMgtMode = VX_POWER_MODE_FULL;    	    vxPowMgtEnable = TRUE;	    break;    	case VX_POWER_MODE_DOZE:	    hid0Mode = _PPC_HID0_DOZE;	    vxPowMgtMode = VX_POWER_MODE_DOZE;    	    vxPowMgtEnable = TRUE;	    break;    	case VX_POWER_MODE_NAP:	    hid0Mode = _PPC_HID0_NAP;	    vxPowMgtMode = VX_POWER_MODE_NAP;    	    vxPowMgtEnable = TRUE;	    break;    	case VX_POWER_MODE_SLEEP:	    hid0Mode = _PPC_HID0_SLEEP;	    vxPowMgtMode = VX_POWER_MODE_SLEEP;    	    vxPowMgtEnable = TRUE;	    break;	default:	    return (ERROR);		/* mode not supported */	}    /* set new value for HID0 */#if (CPU != PPC85XX)    vxHid0Set ((vxHid0Get() & ~(_PPC_HID0_DOZE | _PPC_HID0_NAP | 		_PPC_HID0_SLEEP | _PPC_HID0_DPM)) | hid0Mode);#else  /* CPU != PPC85XX */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区精品视频| 亚洲一二三区不卡| 欧美一级二级三级蜜桃| 欧美日韩在线播| 欧美久久一二三四区| 欧美亚州韩日在线看免费版国语版| 色一情一伦一子一伦一区| 色偷偷88欧美精品久久久| 欧美做爰猛烈大尺度电影无法无天| 91久久免费观看| 51精品国自产在线| 久久久亚洲综合| 中文字幕在线不卡一区| 一区二区在线免费观看| 日韩黄色免费电影| 国产一区中文字幕| 91网站在线观看视频| 欧美日韩在线免费视频| 欧美一区日韩一区| 中日韩av电影| 午夜视频久久久久久| 国模冰冰炮一区二区| 不卡一区中文字幕| 91精品欧美久久久久久动漫| 久久蜜臀中文字幕| 亚洲一区精品在线| 国产一区二区三区香蕉| 色综合天天综合在线视频| 欧美一区二区在线视频| 国产精品毛片久久久久久久| 亚洲第一二三四区| 国产黄色91视频| 欧美日韩久久久一区| 久久免费视频色| 亚洲国产毛片aaaaa无费看 | 成人18视频日本| 欧美人体做爰大胆视频| 欧美经典一区二区三区| 亚洲sss视频在线视频| 国产91在线|亚洲| 欧美一级专区免费大片| 亚洲同性同志一二三专区| 日韩av一级电影| 色婷婷综合中文久久一本| 久久久久久久久久久久久久久99 | 亚洲成av人片在www色猫咪| 国产成人精品三级麻豆| 日韩免费福利电影在线观看| 亚洲自拍偷拍九九九| 成人一区二区三区中文字幕| 精品乱码亚洲一区二区不卡| 亚洲一区二区五区| 99久久精品国产网站| 国产午夜精品一区二区| 美女视频一区二区| 欧美日韩精品高清| 亚洲最快最全在线视频| 99久久精品免费| 中文字幕欧美激情一区| 国内精品久久久久影院色| 欧美精品xxxxbbbb| 亚洲国产另类av| 欧美伊人久久久久久久久影院 | 99这里都是精品| 久久蜜桃av一区二区天堂| 久久99国产精品麻豆| 在线91免费看| 日韩高清不卡一区二区三区| 欧美精选午夜久久久乱码6080| 亚洲一区中文在线| 在线精品亚洲一区二区不卡| 一区二区三区国产豹纹内裤在线 | 亚洲成人激情综合网| 欧洲中文字幕精品| 亚洲国产一区二区a毛片| 欧美在线免费播放| 爽好多水快深点欧美视频| 91.xcao| 久久综合综合久久综合| 精品入口麻豆88视频| 九九热在线视频观看这里只有精品| 欧美一区二区福利在线| 激情综合网天天干| 国产精品狼人久久影院观看方式| 成人动漫av在线| 一区二区三区日韩欧美精品| 欧美中文一区二区三区| 日韩高清中文字幕一区| 久久综合网色—综合色88| 国产精品羞羞答答xxdd| 中文一区二区在线观看| 91免费视频观看| 日韩电影网1区2区| 久久久精品免费网站| 91视频观看视频| 日本在线不卡一区| 中文字幕第一区二区| 欧美三级电影网| 国内精品视频666| 亚洲黄色尤物视频| 91精品国产手机| www.欧美.com| 青青草伊人久久| 国产精品不卡在线| 欧美日韩精品欧美日韩精品一 | 亚洲综合在线视频| 日韩一区二区三区四区| 国产精品一品二品| 亚洲成人手机在线| 久久久久久影视| 欧美综合天天夜夜久久| 久久se这里有精品| 夜夜嗨av一区二区三区| 久久久精品综合| 91精品一区二区三区久久久久久 | 色婷婷综合久久久久中文 | 91丨九色丨黑人外教| 丝袜诱惑亚洲看片| 亚洲丝袜美腿综合| 日韩欧美卡一卡二| 精品婷婷伊人一区三区三| 丁香一区二区三区| 麻豆成人91精品二区三区| 亚洲国产精品人人做人人爽| 国产欧美日韩综合| 精品嫩草影院久久| 538在线一区二区精品国产| 色婷婷一区二区三区四区| 国产99久久久久久免费看农村| 亚洲成av人片| 亚洲黄网站在线观看| 亚洲欧洲色图综合| 久久精品这里都是精品| 精品裸体舞一区二区三区| 欧美日韩高清在线| 一本久道久久综合中文字幕| 国产露脸91国语对白| 蜜臀a∨国产成人精品| 午夜精品福利一区二区三区蜜桃| 亚洲色图欧美偷拍| 最新国产精品久久精品| 国产精品久久网站| 欧美高清在线视频| 欧美经典一区二区| 中文字幕av一区二区三区高| 欧美激情一区二区| 日本一区二区免费在线观看视频| 亚洲精品一区二区三区蜜桃下载 | 国产成人夜色高潮福利影视| 久久99国内精品| 久久99精品国产麻豆不卡| 精品一区二区三区香蕉蜜桃| 黄色日韩网站视频| 国产一区在线观看麻豆| 国产精品一区二区男女羞羞无遮挡| 久久国产生活片100| 免费观看一级特黄欧美大片| 久久99精品久久久久婷婷| 国内成+人亚洲+欧美+综合在线| 九九精品视频在线看| 国产成人在线视频网站| 成人污视频在线观看| 91精品1区2区| 欧美日韩一区二区三区四区五区| 欧美日韩在线播放三区四区| 51精品秘密在线观看| 精品国产免费人成在线观看| 国产片一区二区| 亚洲人精品一区| 亚洲成av人影院在线观看网| 久久精品国产999大香线蕉| 国产河南妇女毛片精品久久久| 成人午夜电影网站| 色欧美片视频在线观看在线视频| 欧美日韩高清一区二区| 日韩视频免费观看高清完整版 | 亚洲综合无码一区二区| 琪琪久久久久日韩精品| 国产乱理伦片在线观看夜一区| 91在线视频官网| 日韩午夜精品电影| 1000精品久久久久久久久| 性做久久久久久久久| 国产黑丝在线一区二区三区| 色综合视频一区二区三区高清| 欧美一区二区在线播放| 国产精品第一页第二页第三页| 亚洲综合在线电影| 国内成人免费视频| 欧美日韩在线免费视频| 国产午夜亚洲精品羞羞网站| 亚洲国产一区二区三区| 成人小视频在线| 日韩欧美不卡在线观看视频| 1024亚洲合集| 国产精品18久久久久久久久 | 一区二区三区中文字幕电影| 精品制服美女丁香| 在线免费精品视频| 欧美激情一区二区三区蜜桃视频|