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

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

?? syspciautoconfig.c

?? WINDRIVER SBC405 BSP
?? C
字號:
/* sysPciAutoConfig.c - sbc405gp PCI autoconfig support *//* Copyright 1984-2001 Wind River Systems, Inc. *//*modification history--------------------01a,09may01,g_h    written.*//*DESCRIPTIONThis file contains functions needed to initialize and kick off the PCIauto-configuration process, functions needed by the PCI auto-configurationsroutines to perform configuration cycles (mechanism 0), and a function toinitialize the PCI bridge in the 405GP.*//* includes */#include "vxWorks.h"#include "logLib.h"#include "taskLib.h"#include "config.h"#include "wrSbc405gp.h"#include "drv/pci/pciConfigLib.h"#include "drv/pci/pciAutoConfigLib.h"#include "pci/pciAutoConfigLib.c"/* defines */typedef enum regSize     {    REG_8BIT  = 1,    REG_16BIT = 2,    REG_32BIT = 4    } REG_SIZE;/* typedefs *//* globals */PCI_SYSTEM sysParams;/* locals *//* forward declarations */LOCAL UCHAR  sysPciAutoConfigIntAsgn ( PCI_SYSTEM * pSys, PCI_LOC * pFunc, UCHAR intPin );LOCAL STATUS sysPciAutoConfigInclude ( PCI_SYSTEM * pSys, PCI_LOC * pciLoc, UINT devVend );/* subroutines *//**************************************************************************** sysPciAutoConfigInclude - Determine if function is to be autoConfigured** This function is called with PCI bus, device, function, and vendor* information.  It returns an indication of whether or not the particular* function should be included in the automatic configuration process.* This capability is useful if it is desired that a particular function* NOT be automatically configured.  Of course, if the device is not* included in automatic configuration, it will be unusable unless the* user's code made provisions to configure the function outside of the* the automatic process.** RETURNS: TRUE if function is to be included in automatic configuration,* FALSE otherwise.*/LOCAL int sysPciAutoConfigInclude    (    PCI_SYSTEM * pSys,	 /* input: AutoConfig system information */    PCI_LOC    * pciLoc, /* input: PCI address of this function  */    UINT         devVend /* input: Device/vendor ID number       */    )    {    BOOL retVal = OK;    /* If it's the host bridge then exclude it */    if ((pciLoc->bus == 0) && (pciLoc->device == 0) && (pciLoc->function == 0))        return ERROR;    switch (devVend)        {        default:            retVal = OK;            break;        }    return retVal;    }/***************************************************************************** sysPciAutoConfigIntAssign - Assign the "interrupt line" value.** This routiner assign the interrupt line value.** RETURNS: "interrupt line" value.*/LOCAL UCHAR sysPciAutoConfigIntAsgn    (     PCI_SYSTEM * pSys,		/* input: AutoConfig system information */    PCI_LOC * pFunc,    UCHAR intPin 		/* input: interrupt pin number */    )    {    UCHAR retVal = 0xFF;    switch(pFunc->bus)         {         case PPC405PCI_BRIDGE:	     /* Base board */             retVal = SBC405GP_PCI_INTA_IRQ; /* Carrier board PCI slot */    	     break;         case INTEL21154PCI_BRIDGE:	     /* PCI Expansion board */             switch (pFunc->device)                  {                  case EXPANTION_BOARD_PCI_SLOT_J26:                      retVal = PCI_EXPAND_PCI_INTA_IRQ;	              break;                  case EXPANTION_BOARD_PCI_SLOT_J25:                      retVal = PCI_EXPAND_PCI_INTB_IRQ;                      break;                  case EXPANTION_BOARD_PCI_SLOT_J24:                      retVal = PCI_EXPAND_PCI_INTC_IRQ;                      break;                  case EXPANTION_BOARD_cPCI_SLOT_J22:                      retVal = PCI_EXPAND_PCI_INTD_IRQ;                      break;                  }             }    return(retVal);    }/***************************************************************************** sysPciConfigWrite - write to one PCI configuration space register location** This routine writes one PCI configuration space register location of the * specified size (1, 2 or 4 bytes).** RETURNS: OK** SEE ALSO: sysPciConfigRead()*/STATUS sysPciConfigWrite    (    int  bus,    int  device,    int  function,    int  offset,   /* offset into the configuration space */    int  width,    /* data width                          */    UINT data      /* data to be written                  */    )    {    int      key;    UINT     busDevFunc;    /*     * bit 31 must be 1 and bits 1:0 must be 0 (note LE bit notation)     */    busDevFunc = pciConfigBdfPack (bus, device, function);    key = intLock ();    sysPciOutLong (PCI_ADDRESS_REGISTER, busDevFunc | 0x80000000 | (offset & ~3));	    switch (width)	{	case 4:	    sysPciOutLong (PCI_DATA_REGISTER, data);            break;	case 2:            sysPciOutWord (PCI_DATA_REGISTER + (offset & 3), data);            break;	case 1:	default:            sysPciOutByte (PCI_DATA_REGISTER + (offset & 3), data);            break;	}    intUnlock (key);    return (OK);    }/***************************************************************************** sysPciConfigRead - reads one PCI configuration space register location** This routine reads one PCI configuration space register location of the* specified size (1, 2 or 4 bytes).** RETURNS : OK** SEE ALSO: sysPciConfigWrite()*/STATUS sysPciConfigRead    (    int    bus,    int    device,    int    function,    int    offset,     /* offset into the configuration space */    int    width,      /* data width                          */    void * pResult    )    {     int      key;    UINT32   data;    UCHAR  * pCfgByte;    UINT16 * pCfgWord;    UINT   * pCfgLong;    UINT     busDevFunc;    /*     * bit 31 must be 1 and bits 1:0 must be 0 (note LE bit notation)     */    busDevFunc = pciConfigBdfPack (bus, device, function);    key = intLock ();    sysPciOutLong (PCI_ADDRESS_REGISTER, busDevFunc | 0x80000000 | (offset & ~3));	    switch (width)	{	case 4:	    data      = sysPciInLong (PCI_DATA_REGISTER);            pCfgLong  = (UINT *)pResult;            *pCfgLong = (UINT)data;	    break;	case 2:            data      = sysPciInWord (PCI_DATA_REGISTER + (offset & 3));            pCfgWord  = (UINT16 *)pResult;            *pCfgWord = (UINT16)data;	    break;	case 1:	default:            data      = sysPciInByte (PCI_DATA_REGISTER + (offset & 3));            pCfgByte  = (UCHAR *)pResult;            *pCfgByte = (UCHAR)data;	    break;	}    intUnlock (key);  /* mutual exclusion stop */	    return (OK);    }/**************************************************************************** sysPciHostBridgeInit - Initialize the 405GP PCI Host Bridge** Initializes the PCI bridge so it can operate as both a PCI master and slave.** NOTE: Parameters set are:*           CPU->PCI (master/initiator) address translation*           PCI->CPU (slave/target) address translation** RETURNS: N/A*/STATUS sysPciHostBridgeInit    (    void    )    {    UINT16 tempShort;    /*     * 405GP PCI Master configuration.     * Map one 512 MB range of PLB/processor addresses to PCI memory space.     * PLB address 0x80000000-0x9FFFFFFF ==> PCI address 0x80000000-0x9FFFFFFF     * Use byte reversed out routines to handle endianess.     */    sysPciOutLong (PCIL_PMM0MA,    PMM_UNUSED); /* ensure disabled b4 setting PMM0LA */    sysPciOutLong (PCIL_PMM0LA,    0x80000000);    sysPciOutLong (PCIL_PMM0PCILA, 0x80000000);    sysPciOutLong (PCIL_PMM0PCIHA, PMM_UNUSED);    sysPciOutLong (PCIL_PMM0MA,    0xE0000001); /* no prefetching, and enable region */    /*     * Map one 512 MB range of PLB/processor addresses to PCI memory space.     * PLB address 0xA0000000-0xBFFFFFFF ==> PCI address 0x00000000-0x1FFFFFFF     * Use byte reversed out routines to handle endianess.     * This space is for the VGA card.     */    sysPciOutLong (PCIL_PMM1MA,    PMM_UNUSED); /* ensure disabled b4 setting PMM1LA */    sysPciOutLong (PCIL_PMM1LA,    0xA0000000);    sysPciOutLong (PCIL_PMM1PCILA, PMM_UNUSED);    sysPciOutLong (PCIL_PMM1PCIHA, PMM_UNUSED);    sysPciOutLong (PCIL_PMM1MA,    0xE0000001); /* no prefetching, and enable region */    /*     * PMM2 is not used.  Initialize them to zero.     */    sysPciOutLong (PCIL_PMM2MA,    PMM_UNUSED); /* ensure disabled b4 setting PMM2LA */    sysPciOutLong (PCIL_PMM2LA,    PMM_UNUSED);    sysPciOutLong (PCIL_PMM2PCILA, PMM_UNUSED);    sysPciOutLong (PCIL_PMM2PCIHA, PMM_UNUSED);    sysPciOutLong (PCIL_PMM2MA,    PMM_UNUSED); /* not enabled */    /*     * 405GP PCI Target configuration.  (PTM1)     * Map one 2 GB range of PCI addresses to PLB/processor address space.     * PCI address 0x00000000-0x7FFFFFFF ==> PLB address 0x00000000-0x7FFFFFFF     * The 0x00000008 default value of the 405GP PTM1 Base Address Register     * (in the PCI config header) is correct for this mapping.     * Note: PTM1MS is hardwire enabled but we set the enable bit anyway.     */    sysPciOutLong (PCIL_PTM1LA,    PMM_UNUSED);    sysPciOutLong (PCIL_PTM1MS,    0x80000001); /* 2GB, enable bit is hard-wired to 1 */    /*     * 405GP PCI Target configuration.  (PTM2) Not used here.     * It is possible that the enable bit in PTM2MS could be set at power     * up.  The ROM monitor only needs to use PTM1, so we must make sure that     * PTM2 is disabled to avoid PCI target conflicts.     * Note: PTM2MS must be enabled to write PTM 2 BAR.     * Zero out PTM 2 BAR, then disable via PTM2MS.     */    sysPciOutLong (PCIL_PTM2LA,    PMM_UNUSED);    sysPciOutLong (PCIL_PTM2MS,    0x00000001); /* set enable bit */    sysPciConfigWrite (PCI_HOST_BUS, 	               PCI_HOST_DEVICE, 		       PCI_HOST_FUNCTION, 		       PCIBASEADDR2,		       4, 		       PMM_UNUSED);    sysPciOutLong (PCIL_PTM2MS,    PMM_UNUSED); /* disable */    /*     * Write the 405GP PCI Configuration regs.     * Enable 405GP to be a master on the PCI bus (PMM).     * Enable 405GP to act as a PCI memory target (PTM).     */    sysPciConfigRead (PCI_HOST_BUS,                      PCI_HOST_DEVICE,     		      PCI_HOST_FUNCTION,		      PCICMD, 2, &tempShort);    sysPciConfigWrite (PCI_HOST_BUS,	               PCI_HOST_DEVICE,		       PCI_HOST_FUNCTION,		       PCICMD, 		       2,		       tempShort | BM_EN | MEM_EN);    return (OK);    }/***************************************************************************** sysPciAutoConfig - PCI autoConfig support routine** This routine instantiates the PCI_SYSTEM structure needed to configure* the system. This consists of assigning address ranges to each category* of PCI system resource: Prefetchable and Non-Prefetchable 32-bit Memory, and* 16- and 32-bit I/O. Global values for the Cache Line Size and Maximum* Latency are also specified. Finally, the four supplemental routines for * device inclusion/exclusion, interrupt assignment, and pre- and* post-enumeration bridge initialization are specified. ** RETURNS: N/A*/void sysPciAutoConfig     (    void    )    {    /* 32-bit Non-prefetchable Memory Space */    sysParams.pciMemIo32           = PCI_MEMIO_ADRS;    sysParams.pciMemIo32Size       = PCI_MEMIO_SIZE;    /* 32-bit Prefetchable Memory Space */    sysParams.pciMem32             = PCI_MEM_ADRS;    sysParams.pciMem32Size         = PCI_MEM_SIZE;    /* 16-bit ISA I/O Space - First block of memory in the I/O space */    sysParams.pciIo16              = PCI_ISA_IO_ADRS;    sysParams.pciIo16Size          = PCI_ISA_IO_SIZE;    /* 32-bit PCI I/O Space - Remaining memory in the I/O space */    sysParams.pciIo32              = PCI_IO_ADRS;    sysParams.pciIo32Size          = PCI_IO_SIZE;    /* Configuration space parameters */    sysParams.cacheSize            = (_CACHE_ALIGN_SIZE / 2); /* Should be equal to 16  */    sysParams.maxLatency           = PCI_LAT_TIMER;           /* Should be equal to 255 */    sysParams.autoIntRouting       = FALSE;    sysParams.includeRtn           = sysPciAutoConfigInclude;    sysParams.intAssignRtn         = sysPciAutoConfigIntAsgn;    sysParams.bridgePreConfigInit  = NULL;    sysParams.bridgePostConfigInit = NULL;    /* Perform AutoConfig */    pciAutoConfig (&sysParams);	    /* PciConfig leaves error bits in bridge status register */    sysPciConfigWrite (PCI_HOST_BUS,      /* bus      */	               PCI_HOST_DEVICE,   /* device   */		       PCI_HOST_FUNCTION, /* function */		       6,                 /* offset   */		       2,                 /* width    */		       0xf800             /* data     */);     }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
奇米精品一区二区三区四区 | 99国产一区二区三精品乱码| 一本大道av伊人久久综合| 91精品国产综合久久久久久| 国产精品久久久久7777按摩| 蜜桃久久精品一区二区| 色婷婷亚洲一区二区三区| 国产欧美日韩亚州综合| 日韩电影在线观看网站| 在线观看亚洲a| 国产精品剧情在线亚洲| 国产一区二区主播在线| 欧美一区二区啪啪| 亚洲综合色婷婷| 成a人片亚洲日本久久| 2021中文字幕一区亚洲| 欧美bbbbb| 欧美一级生活片| 午夜精品在线视频一区| 日本国产一区二区| 最近日韩中文字幕| 成人午夜激情在线| 久久免费的精品国产v∧| 久久精品国产精品亚洲红杏| 欧美精品日韩一区| 日韩精品视频网| 在线免费精品视频| 亚洲五月六月丁香激情| 欧美亚洲高清一区| 亚洲国产精品久久人人爱蜜臀| 91浏览器在线视频| 亚洲女女做受ⅹxx高潮| 91麻豆国产在线观看| 亚洲日本一区二区| 91免费观看国产| 一区二区三区波多野结衣在线观看| 粗大黑人巨茎大战欧美成人| 一区在线观看免费| 91丨porny丨中文| 亚洲一二三四区| 欧美精品免费视频| 麻豆精品视频在线观看免费| 精品999在线播放| 国产成人精品一区二区三区网站观看| 久久这里都是精品| 成人午夜视频在线观看| 亚洲男人的天堂网| 欧美日韩高清一区| 蜜桃视频一区二区| 国产欧美一区二区精品忘忧草| 丁香天五香天堂综合| 国产精品白丝在线| 91久久精品国产91性色tv| 香蕉乱码成人久久天堂爱免费| 欧美乱妇20p| 国产一区二三区| 亚洲裸体xxx| 欧美一区2区视频在线观看| 国产成人小视频| 亚洲美女在线国产| 日韩免费视频一区二区| 懂色av一区二区三区蜜臀 | 91亚洲男人天堂| 亚洲自拍偷拍网站| 日韩欧美在线1卡| 成人黄色综合网站| 亚洲线精品一区二区三区| 精品美女一区二区三区| 99久久夜色精品国产网站| 亚洲成人av在线电影| 久久精品网站免费观看| 日本高清无吗v一区| 久草热8精品视频在线观看| 亚洲天堂久久久久久久| 日韩三级视频中文字幕| 99re亚洲国产精品| 久久国产精品99精品国产| 中文字幕日韩精品一区 | 欧美一区二区三区免费观看视频 | 久久se精品一区精品二区| 国产精品成人午夜| 欧美大黄免费观看| 色综合久久综合中文综合网| 久久66热偷产精品| 一区二区三区视频在线看| 久久久久久久久岛国免费| 欧美日韩大陆在线| 一本一道波多野结衣一区二区| 免费看欧美美女黄的网站| 一区二区三区精品视频在线| 国产精品免费av| 欧美精品一区二区三区在线播放 | 欧美激情资源网| 日韩精品一区二区三区在线播放| 一本到高清视频免费精品| 国产麻豆精品95视频| 奇米色777欧美一区二区| 亚洲国产日韩a在线播放性色| 国产精品久久久久久亚洲伦| 久久婷婷久久一区二区三区| 51精品视频一区二区三区| 一本色道亚洲精品aⅴ| 成人午夜av影视| 国产成人精品免费| 国产一区二区在线电影| 青青国产91久久久久久| 日韩成人一级大片| 偷拍亚洲欧洲综合| 亚洲成在线观看| 亚洲bt欧美bt精品777| 亚洲资源中文字幕| 亚洲激情中文1区| 综合久久国产九一剧情麻豆| 欧美国产日本韩| 国产精品日韩成人| 国产精品国产三级国产普通话蜜臀| 久久看人人爽人人| 欧美国产日韩精品免费观看| 国产三区在线成人av| 国产欧美中文在线| 国产精品乱子久久久久| 国产精品久久久久久久久图文区 | 国产精品福利一区二区三区| 国产精品美女www爽爽爽| 欧美激情一区二区三区不卡| 国产欧美一区二区精品性| 国产精品全国免费观看高清| 中文字幕一区二区三区在线观看| 亚洲色图一区二区| 亚洲成人黄色影院| 热久久免费视频| 国产在线不卡视频| 99久久99久久精品免费观看 | 视频一区欧美精品| 国产精品综合二区| 91性感美女视频| 欧美三级在线视频| 精品国产乱码91久久久久久网站| 国产调教视频一区| 亚洲欧美日韩国产一区二区三区| 亚洲一区二区av在线| 精品一区二区三区视频| 成人性生交大片免费看在线播放| 91麻豆123| 日韩限制级电影在线观看| 国产日本亚洲高清| 亚洲国产日韩一级| 国产在线精品免费av| 91麻豆免费观看| 精品国产a毛片| 亚洲精品视频一区| 久久黄色级2电影| 99久久精品情趣| 欧美成人bangbros| 国产精品国产馆在线真实露脸| 丝瓜av网站精品一区二区| 国产精品一区二区三区99| 在线观看亚洲一区| 久久综合av免费| 五月天国产精品| 不卡的电影网站| 日韩欧美另类在线| 一区二区三区在线观看网站| 国内成人精品2018免费看| 欧美精品在线一区二区三区| 国产精品乱码久久久久久| 日本成人在线视频网站| 91色九色蝌蚪| 国产亚洲欧美在线| 日韩精品电影在线| 在线亚洲免费视频| 国产喂奶挤奶一区二区三区| 日本中文一区二区三区| 色美美综合视频| 国产精品午夜在线观看| 精品无人码麻豆乱码1区2区 | 亚洲va欧美va人人爽| 成人精品小蝌蚪| 欧美精品一区二区高清在线观看| 亚洲激情中文1区| eeuss鲁片一区二区三区在线看| 日韩一区二区三区视频| 亚洲一线二线三线久久久| av在线播放不卡| 日本一二三四高清不卡| 国产一区二区三区蝌蚪| 欧美一级爆毛片| 欧美aaaaa成人免费观看视频| 欧美体内she精高潮| 亚洲另类在线视频| 色综合色狠狠综合色| 亚洲三级电影网站| 91欧美一区二区| 亚洲欧美日韩一区| 色先锋资源久久综合| 亚洲丝袜美腿综合| 色老汉一区二区三区| 玉足女爽爽91| 欧美日韩国产三级| 日韩成人伦理电影在线观看|