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

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

?? sysibc.c

?? This file contains board-specific information for the Motorola LoPEC in support of the lopec BSP. S
?? C
字號:
/* sysIbc.c - Ibc Interrupt Controller driver *//* Copyright 2001-2002 Wind River Systems, Inc. *//* Copyright 2000-2002 Motorola, Inc., All Rights Reserved */#include "copyright_wrs.h"/*modification history--------------------01d,01feb01,cak   remodified sensitivity levels for 8259 interrupt controllers01c,02jan01,cak   removed logmsg for legitimate interrupts in sysIbcPhantomInt 01b,13dec00,cak   modified sensitivity levels for 8259 interrupt controllers 01a,14nov00,djs   file created (routines pulled from mv5100)*//*DESCRIPTIONThis module implements the Intel 8259 compatable (IBC) ISA interrupt controller.*//* includes */#include "sysIbc.h"/* defines */#define IBC_INT_PENDING 0x80#define IBC_INT_LVL2    2#define IBC_INT_LVL7    7#define IBC_INT_LVL15   15/* external declarations */IMPORT void   sysOutByte (ULONG, UCHAR);IMPORT UCHAR  sysInByte (ULONG);IMPORT void   sysPciRead32 (UINT32, UINT32 *);IMPORT void   sysPciWrite32 (UINT32, UINT32);IMPORT UINT   sysVectorIRQ0; 	/* vector for IRQ0 *//* global declarations *//* forward declarations */void          sysIbcIntEnable (int);void          sysIbcIntDisable (int);void          sysIbcIntHandler (void);LOCAL UCHAR   sysIbcPhantomInt (UCHAR *intNum, int lvl7Int, int lvl15Int);LOCAL void    sysIbcEndOfInt (int);LOCAL void    sysIbcIntLevelSet (int);/* Mask values are the currently disabled sources */LOCAL UINT8	  sysPicMask1 = 0xfb;	/* all levels disabled */LOCAL UINT8	  sysPicMask2 = 0xff;/* Level values are the interrupt level masks */LOCAL UINT8	  sysPicLevel1;LOCAL UINT8	  sysPicLevel2;LOCAL UINT8	  sysPicLevelCur;		/* current priority level, 0 to 16 *//* level values by real priority */LOCAL UCHAR   sysPicPriMask1[17] =                   {0xFB,0xFA,0xF8,0xF8,0xF0,0xE0,0xC0,0x80,			       0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0x0};LOCAL UCHAR   sysPicPriMask2[17] =                   {0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,			       0xFF,0xFE,0xFC,0xF8,0xF0,0xE0,0xC0,0x80,0x0};/* Hardware access methods */#ifndef IBC_BYTE_OUT#   define IBC_BYTE_OUT(reg,data) \	(sysOutByte (reg,data))#endif /* IBC_BYTE_OUT */#ifndef IBC_BYTE_IN#   define IBC_BYTE_IN(reg,pData) \	(*pData = sysInByte(reg))#endif /* IBC_BYTE_IN *//********************************************************************************* sysIbcInit - Initialize the IBC** This routine initializes the non-PCI Header configuration registers of the* IBC within the W83C553 PIB.** RETURNS: OK always*/STATUS sysIbcInit (void)    {    UCHAR	intVec;    /* Initialize the Interrupt Controller #1 */    IBC_BYTE_OUT (PIC_port1 (PIC1_BASE_ADR),0x11);        /* ICW1 */    IBC_BYTE_OUT (PIC_port2 (PIC1_BASE_ADR),sysVectorIRQ0); /* ICW2 */    IBC_BYTE_OUT (PIC_port2 (PIC1_BASE_ADR),0x04);	/* ICW3 */    IBC_BYTE_OUT (PIC_port2 (PIC1_BASE_ADR),0x01);	/* ICW4 */    /*     *	Mask interrupts IRQ 0, 1, and 3-7 by writing to OCW1 register     *	IRQ 2 is the cascade input     */    IBC_BYTE_OUT (PIC_IMASK (PIC1_BASE_ADR),0xfb);    /* IRQ 0-4,6-7 Edge Sensitive & IRQ 5 Level Sensitive */    IBC_BYTE_OUT (SL82565_INT1_ELC, 0x20 );    /* Initialize the Interrupt Controller #2 */    IBC_BYTE_OUT (PIC_port1 (PIC2_BASE_ADR),0x11);	/* ICW1 */    IBC_BYTE_OUT (PIC_port2 (PIC2_BASE_ADR),sysVectorIRQ0+8); /* ICW2 */    IBC_BYTE_OUT (PIC_port2 (PIC2_BASE_ADR),0x02);	/* ICW3 */    IBC_BYTE_OUT (PIC_port2 (PIC2_BASE_ADR),0x01);	/* ICW4 */    /* Mask interrupts IRQ 8-15 by writing to OCW1 register */    IBC_BYTE_OUT (PIC_IMASK (PIC2_BASE_ADR),0xff);    /* IRQ 8-13 Edge Sensitive, 14-15 Level Sensitive */    IBC_BYTE_OUT (SL82565_INT2_ELC, 0xC0 );     /* Permanently turn off ISA refresh by never completing init steps */    IBC_BYTE_OUT (SL82565_TMR1_CMOD, 0x74);    /*	Perform the PCI Interrupt Ack cycle */    IBC_BYTE_IN (PCI_MSTR_IACK_BASE_ADRS + 0x30, &intVec);    /* Perform the end of interrupt procedure */    sysIbcEndOfInt (15);    sysIbcIntLevelSet (16);    return (OK);    }/********************************************************************************* sysIbcIntEnable - enable a IBC interrupt level** This routine enables a specified IBC interrupt level.** RETURNS: N/A*/void sysIbcIntEnable    (    int intNum        /* interrupt level to enable */    )    {    if (intNum < 8)        {        sysPicMask1 &= ~(1 << intNum);        IBC_BYTE_OUT (PIC_IMASK (PIC1_BASE_ADR), sysPicMask1 | sysPicLevel1);        }    else        {        sysPicMask2 &= ~(1 << (intNum - 8));        IBC_BYTE_OUT (PIC_IMASK (PIC2_BASE_ADR), sysPicMask2 | sysPicLevel2);        }    }/********************************************************************************* sysIbcIntDisable - disable a IBC interrupt level** This routine disables a specified IBC interrupt level.** RETURNS: N/A*/void sysIbcIntDisable    (    int intNum        /* interrupt level to disable */    )    {    if (intNum < 8)        {        sysPicMask1 |= (1 << intNum);        IBC_BYTE_OUT (PIC_IMASK (PIC1_BASE_ADR), sysPicMask1 | sysPicLevel1 );        }    else        {        sysPicMask2 |= (1 << (intNum - 8));        IBC_BYTE_OUT (PIC_IMASK (PIC2_BASE_ADR), sysPicMask2 | sysPicLevel2);        }    }/******************************************************************************** sysIbcIntHandler - handler of the sl82565 IBC interrupt.** This routine handles interrupts originating from the W83C553 PIB ISA Bus* Controller (IBC).  This device implements the functional equivalent of two* cascaded 8259 PICs.** This routine is entered with CPU external interrupts enabled.** Because the ISA bus is only accessible via the PCI bus, this driver first* initiates a PCI interrupt acknowledge cycle to read the interrupt number* (vector) coming from the IBC.** This routine then processes the interrupt by calling all interrupt service* routines chained to the vector.** Finally, this routine re-arms the interrupt at the IBC by performing a* IBC EOI.** RETURNS: N/A*/void sysIbcIntHandler (void)    {    UCHAR		intNum;    INT_HANDLER_DESC *	currHandler;    static int		lvl7Int = 0;    static int		lvl15Int = 0;    IBC_BYTE_IN (PCI_MSTR_IACK_BASE_ADRS + 0x30, &intNum);    /* Special check for phantom interrupts */    if ((intNum & IBC_INT_LVL7) == IBC_INT_LVL7)	        {        if (sysIbcPhantomInt (&intNum, lvl7Int, lvl15Int) == TRUE)            return;		/* It's phantom so just return. */        }    /*     * If cascade from IBC2 just EIO and return. It has been seen on      * certain PCI ISA bridge devices, that it is possible to see the     * cascade IRQ2.  In particular, this has been observed on the      * Winbond W83C553F on certain revs of the chip prior to Rev G.     */    if (intNum == IBC_INT_LVL2)         {        sysIbcEndOfInt (intNum);        return;        }    /* Keep track of level 7 and 15 nesting for phantom interrupt handling */    if (intNum == IBC_INT_LVL7)        lvl7Int++;    else if (intNum == IBC_INT_LVL15)        lvl15Int++;    if ((currHandler = sysIntTbl [intNum]) == NULL)        {        logMsg ("uninitialized IBC interrupt level %x\r\n", intNum, 0,0,0,0,0);        }    else        {        /* Call EACH respective chained interrupt handler */        while (currHandler != NULL)            {            currHandler->vec (currHandler->arg);            currHandler = currHandler->next;            }        }    /* Keep track of level 7 and 15 nesting for phantom interrupt handling */    if (intNum == IBC_INT_LVL7)        lvl7Int--;    else if (intNum == IBC_INT_LVL15)        lvl15Int--;    /* Re-arm (enable) the interrupt on the IBC */    sysIbcEndOfInt (intNum);    }/********************************************************************************* sysIbcPhantomInt - Determine if IRQ interrupt number 7 or 15 is "phantom".* * This routine determines if an IRQ number of 7 or 15 is a phantom* interrupt.  According to Intel 82C59A-2 documentation, the IR (interrupt* request) inputs must remain high until after the falling edge of the first* INTA (interrupt acknowledge).  If the IR goes low before this, a DEFAULT* (phantom) IRQ7 will occur when the CPU acknowledges the interrupt.  Note* that if an IRQ7 is generated it may really be another interrupt, IRQ4 for* example.  IRQ 7 is associated  with the master 8259, IRQ 15 is associated * with the slave 8259.  This function should only be called if the * acknowledged IRQ number is 7 or 15 but does behave sanely if called with * other IRQ numbers.** As mentioned above, IRQ 7 is supposed to be associated with the master* 8259. However, it has been observed that a phantom IRQ 7 was caused by* an interrupt on the slave 8259. Thus, the algorithm now implemented is* to scan both the master and the slave 8259 in the correct priority order* (from highest to lowest: 0 1 8 9 10 11 12 13 14 15 3 4 5 6 7).** RETURNS: TRUE if phantom IRQ, *intNum unaltered.* FALSE if no phantom interrupt, *intNum is "real" IRQ number.*/LOCAL UCHAR sysIbcPhantomInt    (    UCHAR *intNum,      /* interrupt number received on acknowledge */    int	  lvl7Int,	/* interrupt 7 nesting level */    int	  lvl15Int 	/* interrupt 15 nesting level */    )    {    UCHAR irqBit;    UINT  irqNum;    /* Read the master in-service register (ISR) */    IBC_BYTE_OUT (PIC_port1 (PIC1_BASE_ADR), PIC_OCW3_SEL + PIC_ISR_READ);    IBC_BYTE_IN (PIC_port1 (PIC1_BASE_ADR), &irqBit);    if (irqBit == 0)        {        logMsg ("sysIbcPhantomInt: no interrupt in master\n", 0,0,0,0,0,0);        return (TRUE);	/* No in-service int so it MUST be phantom */        }    for (irqNum = 0; ((irqBit & 1) == 0) ; irqNum++, irqBit >>= 1)        ;    if (irqNum == IBC_INT_LVL7)        if (lvl7Int > 1)            {            logMsg ("sysIbcPhantomInt: nested interrupt in master\n",                    0,0,0,0,0,0);            return (TRUE);  /* We're nested so it MUST be phantom */            }    /* if irqNum isn't 2 we have an interrupt on the master */    if (irqNum != IBC_INT_LVL2)        {        *intNum = irqNum;        return (FALSE);        }    /* Read the slave in-service register (ISR) */    IBC_BYTE_OUT (PIC_port1 (PIC2_BASE_ADR), PIC_OCW3_SEL + PIC_ISR_READ);    IBC_BYTE_IN (PIC_port1 (PIC2_BASE_ADR), &irqBit);    if (irqBit == 0)	/* should never happen, really */        {        logMsg ("sysIbcPhantomInt: no interrupt in slave\n", 0,0,0,0,0,0);        return (TRUE);	/* No in-service int so it MUST be phantom */        }    for (irqNum = 8; ((irqBit & 1) == 0) ; irqNum++, irqBit >>= 1)        ;    if (irqNum == 15)        if (lvl15Int > 1)            {            logMsg ("sysIbcPhantomInt: nested interrupt in slave\n",                    0,0,0,0,0,0);            return (TRUE);  /* We're nested so it MUST be phantom */            }    *intNum = irqNum;    return (FALSE);    }/********************************************************************************* sysIbcEndOfInt - send EOI (end of interrupt) signal.** This routine is called at the end of the interrupt handler to* send a non-specific end of interrupt (EOI) signal.** The second PIC is acked only if the interrupt came from that PIC.* The first PIC is always acked.*/LOCAL void sysIbcEndOfInt     (    int intNum /* interrupt number to retire */    )    {    if (intNum > IBC_INT_LVL7)        {        IBC_BYTE_OUT (PIC_IACK (PIC2_BASE_ADR), 0x20);        }    IBC_BYTE_OUT (PIC_IACK (PIC1_BASE_ADR), 0x20);    }/********************************************************************************* sysIbcIntLevelSet - set the interrupt priority level** This routine masks interrupts with real priority equal to or lower than* <intNum>.  The special* value 16 indicates all interrupts are enabled. Individual interrupt* numbers have to be specifically enabled by sysIbcIntEnable() before they* are ever enabled by setting the interrupt level value.** Note because of the IBM cascade scheme, the actual priority order for* interrupt numbers is (high to low) 0, 1, 8, 9, 10, 11, 12, 13, 14, 15,* 3, 4, 5, 6, 7, 16 (all enabled)** INTERNAL: It is possible that we need to determine if we are raising* or lowering our priority level.  It may be that the order of loading the* two mask registers is dependent upon raising or lowering the priority.** RETURNS: N/A*/LOCAL void sysIbcIntLevelSet    (    int intNum	/* interrupt level to implement */    )    {    if (intNum > 16)        intNum = 16;    sysPicLevelCur = intNum;    if (sysPicLevel2 != sysPicPriMask2[intNum])        {        sysPicLevel2 = sysPicPriMask2[intNum];        IBC_BYTE_OUT (PIC_IMASK (PIC2_BASE_ADR), sysPicMask2 | sysPicLevel2);        }    if (sysPicLevel1 != sysPicPriMask1[intNum])        {        sysPicLevel1 = sysPicPriMask1[intNum];        IBC_BYTE_OUT (PIC_IMASK (PIC1_BASE_ADR), sysPicMask1 | sysPicLevel1);        }    }/********************************************************************************* sysIbcMpicConnect - routine to connect IBC interrupts to MPIC** This function is called from sysHwInit2 and sets the IBC interrupt* handler into the MPIC interrupt vector table.** RETURNS: N/A*/LOCAL void sysIbcMpicConnect (void)    {    intConnect (INUM_TO_IVEC(PIB_INT_VEC), sysIbcIntHandler, 0);     intEnable (PIB_INT_LVL);    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本韩国欧美一区二区三区| 日本在线不卡一区| 国产69精品久久久久毛片| 国产亚洲人成网站| 福利一区福利二区| 国产精品欧美精品| 91色九色蝌蚪| 性做久久久久久久久| 欧美xxxxxxxx| 丁香桃色午夜亚洲一区二区三区| 国产精品免费丝袜| 欧美日韩一级二级| 国产在线不卡一区| 中文字幕日韩一区| 欧美另类z0zxhd电影| 精品一区二区三区在线视频| 国产精品美女www爽爽爽| 欧美在线观看视频在线| 免费观看在线综合| 亚洲欧洲av一区二区三区久久| 欧美精选在线播放| 国产丶欧美丶日本不卡视频| 亚洲欧美国产77777| 91精品欧美一区二区三区综合在| 国产一本一道久久香蕉| 夜色激情一区二区| 欧美一区二区在线免费播放| 成人av一区二区三区| 丝瓜av网站精品一区二区| 国产无遮挡一区二区三区毛片日本| 色欧美乱欧美15图片| 麻豆精品视频在线| 亚洲欧美日韩久久| 久久久久久久久久久久久久久99| 在线免费不卡视频| 懂色av噜噜一区二区三区av| 午夜激情一区二区| 自拍偷拍亚洲欧美日韩| 欧美大片在线观看| 在线观看国产日韩| 成人精品电影在线观看| 美女视频黄频大全不卡视频在线播放| 国产精品麻豆久久久| 日韩一区二区在线观看视频| 色悠悠久久综合| 国产乱子轮精品视频| 一个色综合av| 国产精品日日摸夜夜摸av| 日韩欧美二区三区| 欧美精品日韩精品| 色8久久人人97超碰香蕉987| 成人免费毛片aaaaa**| 另类中文字幕网| 婷婷久久综合九色综合伊人色| 国产精品超碰97尤物18| 久久美女高清视频| 欧美成人精品高清在线播放| 欧美三级视频在线| 91国偷自产一区二区三区观看| 国产成a人亚洲精| 国产一区二区三区高清播放| 日韩精品成人一区二区三区| 亚洲午夜视频在线观看| 亚洲精品国产精品乱码不99| 国产精品电影一区二区三区| 国产精品污网站| 国产欧美日本一区视频| 久久久亚洲高清| 欧美www视频| 欧美日韩国产123区| 一本大道av伊人久久综合| 99久久精品免费看国产| fc2成人免费人成在线观看播放| 国产电影一区在线| 成人免费观看视频| 成人高清视频在线| 91在线观看高清| 日本韩国欧美一区二区三区| 欧美在线|欧美| 欧美午夜精品免费| 88在线观看91蜜桃国自产| 欧美日韩国产乱码电影| 日韩一区二区电影在线| 日韩视频一区二区三区在线播放| 欧美一级片在线观看| 日韩亚洲欧美中文三级| 精品日韩一区二区三区| 337p日本欧洲亚洲大胆精品| 久久网这里都是精品| 国产亚洲美州欧州综合国| 国产免费观看久久| 亚洲欧美日韩在线| 视频一区在线播放| 国产在线观看免费一区| 91在线视频播放地址| 欧美午夜精品久久久久久超碰| 91精品婷婷国产综合久久性色 | 日韩精品中午字幕| 久久中文字幕电影| 亚洲国产精华液网站w| 日韩理论电影院| 午夜伊人狠狠久久| 久久国产精品露脸对白| 成人免费高清在线观看| 欧美亚洲国产一区在线观看网站| 91精品国产福利在线观看| 国产偷国产偷亚洲高清人白洁| 国产精品国产精品国产专区不片| 亚洲一线二线三线久久久| 男女视频一区二区| 不卡一区中文字幕| 欧美一区二区三区日韩| 欧美极品少妇xxxxⅹ高跟鞋| 亚洲一区二区精品视频| 国产精品一线二线三线| 欧美性videosxxxxx| 久久综合av免费| 亚洲电影一级黄| 成人av影视在线观看| 欧美一区二区在线免费播放| 国产精品电影一区二区三区| 青草av.久久免费一区| caoporm超碰国产精品| 欧美一区二区福利在线| 自拍偷拍欧美精品| 精品一区二区久久久| 91福利精品第一导航| 国产欧美一区二区精品仙草咪| 亚洲国产一区视频| 成人丝袜18视频在线观看| 欧美一区二区三区不卡| 中文字幕一区二区三中文字幕| 日韩电影在线免费观看| 色综合久久综合网欧美综合网| 欧美mv日韩mv国产网站| 亚洲一区二区在线视频| 成人av电影观看| 亚洲精品一区二区三区福利| 丝袜美腿一区二区三区| 色激情天天射综合网| 国产精品福利在线播放| 国产高清一区日本| 日韩欧美中文一区二区| 亚洲a一区二区| 91精彩视频在线观看| 综合自拍亚洲综合图不卡区| 国产精品91xxx| 精品久久久久久久久久久久包黑料 | 国产精品国产三级国产aⅴ无密码| 美女一区二区三区在线观看| 欧美日韩在线播放| 一区二区在线观看免费| 97se亚洲国产综合自在线观| 国产精品乱码久久久久久| 国产揄拍国内精品对白| 欧美xxxx在线观看| 蜜臀av亚洲一区中文字幕| 欧美久久久影院| 午夜国产不卡在线观看视频| 欧美系列在线观看| 亚洲国产精品人人做人人爽| 91久久精品国产91性色tv| 亚洲免费av高清| 色综合久久久久久久| 亚洲蜜桃精久久久久久久| 色婷婷精品久久二区二区蜜臂av| 中文字幕视频一区二区三区久| 国产.精品.日韩.另类.中文.在线.播放| 久久综合久久综合九色| 国产在线一区观看| 国产农村妇女毛片精品久久麻豆| 国产综合色产在线精品| 国产亚洲欧美激情| 成人免费看黄yyy456| 亚洲色图清纯唯美| 在线观看国产精品网站| 日韩综合一区二区| 欧美成人国产一区二区| 国产一区二区不卡在线| 国产精品久久久久久久久搜平片| 不卡视频一二三四| 亚洲色图第一区| 欧美日韩精品高清| 蜜臂av日日欢夜夜爽一区| 久久综合九色综合97婷婷女人 | 高清久久久久久| 欧美激情一区二区三区在线| 91麻豆免费观看| 亚洲123区在线观看| 日韩午夜在线观看| 粉嫩aⅴ一区二区三区四区| 亚洲桃色在线一区| 欧美日韩精品三区| 国产一区二区三区四| 亚洲欧美日韩在线播放| 91麻豆精品国产| 国产成人精品免费看| 亚洲精品国产精华液| 精品国产欧美一区二区| 91天堂素人约啪|