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

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? pci.c

?? linux下的BOOT程序原碼,有需要的可以來(lái)下,保證好用
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/* PCI.c - PCI functions *//* Copyright - Galileo technology. */#include <common.h>#include <pci.h>#include <galileo/pci.h>static const unsigned char pci_irq_swizzle[2][PCI_MAX_DEVICES] = {#ifdef CONFIG_ZUMA_V2	{0, 0, 0, 0, 0, 0, 0, 29,[8 ... PCI_MAX_DEVICES - 1] = 0},	{0, 0, 0, 0, 0, 0, 0, 28,[8 ... PCI_MAX_DEVICES - 1] = 0}#else				/* EVB??? This is a guess */	{0, 0, 0, 0, 0, 0, 0, 27, 27,[9 ... PCI_MAX_DEVICES - 1] = 0},	{0, 0, 0, 0, 0, 0, 0, 29, 29,[9 ... PCI_MAX_DEVICES - 1] = 0}#endif};static const unsigned int pci_p2p_configuration_reg[] = {	PCI_0P2P_CONFIGURATION, PCI_1P2P_CONFIGURATION};static const unsigned int pci_configuration_address[] = {	PCI_0CONFIGURATION_ADDRESS, PCI_1CONFIGURATION_ADDRESS};static const unsigned int pci_configuration_data[] = {	PCI_0CONFIGURATION_DATA_VIRTUAL_REGISTER,	PCI_1CONFIGURATION_DATA_VIRTUAL_REGISTER};static const unsigned int pci_error_cause_reg[] = {	PCI_0ERROR_CAUSE, PCI_1ERROR_CAUSE};static const unsigned int pci_arbiter_control[] = {	PCI_0ARBITER_CONTROL, PCI_1ARBITER_CONTROL};static const unsigned int pci_snoop_control_base_0_low[] = {	PCI_0SNOOP_CONTROL_BASE_0_LOW, PCI_1SNOOP_CONTROL_BASE_0_LOW};static const unsigned int pci_snoop_control_top_0[] = {	PCI_0SNOOP_CONTROL_TOP_0, PCI_1SNOOP_CONTROL_TOP_0};static const unsigned int pci_access_control_base_0_low[] = {	PCI_0ACCESS_CONTROL_BASE_0_LOW, PCI_1ACCESS_CONTROL_BASE_0_LOW};static const unsigned int pci_access_control_top_0[] = {	PCI_0ACCESS_CONTROL_TOP_0, PCI_1ACCESS_CONTROL_TOP_0};static const unsigned int pci_scs_bank_size[2][4] = {	{PCI_0SCS_0_BANK_SIZE, PCI_0SCS_1_BANK_SIZE,	 PCI_0SCS_2_BANK_SIZE, PCI_0SCS_3_BANK_SIZE},	{PCI_1SCS_0_BANK_SIZE, PCI_1SCS_1_BANK_SIZE,	 PCI_1SCS_2_BANK_SIZE, PCI_1SCS_3_BANK_SIZE}};static const unsigned int pci_p2p_configuration[] = {	PCI_0P2P_CONFIGURATION, PCI_1P2P_CONFIGURATION};static unsigned int local_buses[] = { 0, 0 };/********************************************************************* pciWriteConfigReg - Write to a PCI configuration register*                    - Make sure the GT is configured as a master before writing*                      to another device on the PCI.*                    - The function takes care of Big/Little endian conversion.*** Inputs:   unsigned int regOffset: The register offset as it apears in the GT spec*                   (or any other PCI device spec)*           pciDevNum: The device number needs to be addressed.**  Configuration Address 0xCF8:**       31 30    24 23  16 15  11 10     8 7      2  0     <=bit Number*  |congif|Reserved|  Bus |Device|Function|Register|00|*  |Enable|        |Number|Number| Number | Number |  |    <=field Name**********************************************************************/void pciWriteConfigReg (PCI_HOST host, unsigned int regOffset,			unsigned int pciDevNum, unsigned int data){	volatile unsigned int DataForAddrReg;	unsigned int functionNum;	unsigned int busNum = PCI_BUS (pciDevNum);	unsigned int addr;	if (pciDevNum > 32)	/* illegal device Number */		return;	if (pciDevNum == SELF) {	/* configure our configuration space. */		pciDevNum =			(GTREGREAD (pci_p2p_configuration_reg[host]) >> 24) &			0x1f;		busNum = GTREGREAD (pci_p2p_configuration_reg[host]) &			0xff0000;	}	functionNum = regOffset & 0x00000700;	pciDevNum = pciDevNum << 11;	regOffset = regOffset & 0xfc;	DataForAddrReg =		(regOffset | pciDevNum | functionNum | busNum) | BIT31;	GT_REG_WRITE (pci_configuration_address[host], DataForAddrReg);	GT_REG_READ (pci_configuration_address[host], &addr);	if (addr != DataForAddrReg)		return;	GT_REG_WRITE (pci_configuration_data[host], data);}/********************************************************************* pciReadConfigReg  - Read from a PCI0 configuration register*                    - Make sure the GT is configured as a master before reading*                     from another device on the PCI.*                   - The function takes care of Big/Little endian conversion.* INPUTS:   regOffset: The register offset as it apears in the GT spec (or PCI*                        spec)*           pciDevNum: The device number needs to be addressed.* RETURNS: data , if the data == 0xffffffff check the master abort bit in the*                 cause register to make sure the data is valid**  Configuration Address 0xCF8:**       31 30    24 23  16 15  11 10     8 7      2  0     <=bit Number*  |congif|Reserved|  Bus |Device|Function|Register|00|*  |Enable|        |Number|Number| Number | Number |  |    <=field Name**********************************************************************/unsigned int pciReadConfigReg (PCI_HOST host, unsigned int regOffset,			       unsigned int pciDevNum){	volatile unsigned int DataForAddrReg;	unsigned int data;	unsigned int functionNum;	unsigned int busNum = PCI_BUS (pciDevNum);	if (pciDevNum > 32)	/* illegal device Number */		return 0xffffffff;	if (pciDevNum == SELF) {	/* configure our configuration space. */		pciDevNum =			(GTREGREAD (pci_p2p_configuration_reg[host]) >> 24) &			0x1f;		busNum = GTREGREAD (pci_p2p_configuration_reg[host]) &			0xff0000;	}	functionNum = regOffset & 0x00000700;	pciDevNum = pciDevNum << 11;	regOffset = regOffset & 0xfc;	DataForAddrReg =		(regOffset | pciDevNum | functionNum | busNum) | BIT31;	GT_REG_WRITE (pci_configuration_address[host], DataForAddrReg);	GT_REG_READ (pci_configuration_address[host], &data);	if (data != DataForAddrReg)		return 0xffffffff;	GT_REG_READ (pci_configuration_data[host], &data);	return data;}/********************************************************************* pciOverBridgeWriteConfigReg - Write to a PCI configuration register where*                               the agent is placed on another Bus. For more*                               information read P2P in the PCI spec.** Inputs:   unsigned int regOffset - The register offset as it apears in the*           GT spec (or any other PCI device spec).*           unsigned int pciDevNum - The device number needs to be addressed.*           unsigned int busNum - On which bus does the Target agent connect*                                 to.*           unsigned int data - data to be written.**  Configuration Address 0xCF8:**       31 30    24 23  16 15  11 10     8 7      2  0     <=bit Number*  |congif|Reserved|  Bus |Device|Function|Register|01|*  |Enable|        |Number|Number| Number | Number |  |    <=field Name**  The configuration Address is configure as type-I (bits[1:0] = '01') due to*   PCI spec referring to P2P.**********************************************************************/void pciOverBridgeWriteConfigReg (PCI_HOST host,				  unsigned int regOffset,				  unsigned int pciDevNum,				  unsigned int busNum, unsigned int data){	unsigned int DataForReg;	unsigned int functionNum;	functionNum = regOffset & 0x00000700;	pciDevNum = pciDevNum << 11;	regOffset = regOffset & 0xff;	busNum = busNum << 16;	if (pciDevNum == SELF) {	/* This board */		DataForReg = (regOffset | pciDevNum | functionNum) | BIT0;	} else {		DataForReg = (regOffset | pciDevNum | functionNum | busNum) |			BIT31 | BIT0;	}	GT_REG_WRITE (pci_configuration_address[host], DataForReg);	if (pciDevNum == SELF) {	/* This board */		GT_REG_WRITE (pci_configuration_data[host], data);	} else {		/* configuration Transaction over the pci. */		/* The PCI is working in LE Mode So it swap the Data. */		GT_REG_WRITE (pci_configuration_data[host], WORD_SWAP (data));	}}/********************************************************************* pciOverBridgeReadConfigReg  - Read from a PCIn configuration register where*                               the agent target locate on another PCI bus.*                             - Make sure the GT is configured as a master*                               before reading from another device on the PCI.*                             - The function takes care of Big/Little endian*                               conversion.* INPUTS:   regOffset: The register offset as it apears in the GT spec (or PCI*                        spec). (configuration register offset.)*           pciDevNum: The device number needs to be addressed.*           busNum: the Bus number where the agent is place.* RETURNS: data , if the data == 0xffffffff check the master abort bit in the*                 cause register to make sure the data is valid**  Configuration Address 0xCF8:**       31 30    24 23  16 15  11 10     8 7      2  0     <=bit Number*  |congif|Reserved|  Bus |Device|Function|Register|01|*  |Enable|        |Number|Number| Number | Number |  |    <=field Name**********************************************************************/unsigned int pciOverBridgeReadConfigReg (PCI_HOST host,					 unsigned int regOffset,					 unsigned int pciDevNum,					 unsigned int busNum){	unsigned int DataForReg;	unsigned int data;	unsigned int functionNum;	functionNum = regOffset & 0x00000700;	pciDevNum = pciDevNum << 11;	regOffset = regOffset & 0xff;	busNum = busNum << 16;	if (pciDevNum == SELF) {	/* This board */		DataForReg = (regOffset | pciDevNum | functionNum) | BIT31;	} else {		/* agent on another bus */		DataForReg = (regOffset | pciDevNum | functionNum | busNum) |			BIT0 | BIT31;	}	GT_REG_WRITE (pci_configuration_address[host], DataForReg);	if (pciDevNum == SELF) {	/* This board */		GT_REG_READ (pci_configuration_data[host], &data);		return data;	} else {		/* The PCI is working in LE Mode So it swap the Data. */		GT_REG_READ (pci_configuration_data[host], &data);		return WORD_SWAP (data);	}}/********************************************************************* pciGetRegOffset - Gets the register offset for this region config.** INPUT:   Bus, Region - The bus and region we ask for its base address.* OUTPUT:   N/A* RETURNS: PCI register base address*********************************************************************/static unsigned int pciGetRegOffset (PCI_HOST host, PCI_REGION region){	switch (host) {	case PCI_HOST0:		switch (region) {		case PCI_IO:			return PCI_0I_O_LOW_DECODE_ADDRESS;		case PCI_REGION0:			return PCI_0MEMORY0_LOW_DECODE_ADDRESS;		case PCI_REGION1:			return PCI_0MEMORY1_LOW_DECODE_ADDRESS;		case PCI_REGION2:			return PCI_0MEMORY2_LOW_DECODE_ADDRESS;		case PCI_REGION3:			return PCI_0MEMORY3_LOW_DECODE_ADDRESS;		}	case PCI_HOST1:		switch (region) {		case PCI_IO:			return PCI_1I_O_LOW_DECODE_ADDRESS;		case PCI_REGION0:			return PCI_1MEMORY0_LOW_DECODE_ADDRESS;		case PCI_REGION1:			return PCI_1MEMORY1_LOW_DECODE_ADDRESS;		case PCI_REGION2:			return PCI_1MEMORY2_LOW_DECODE_ADDRESS;		case PCI_REGION3:			return PCI_1MEMORY3_LOW_DECODE_ADDRESS;		}	}	return PCI_0MEMORY0_LOW_DECODE_ADDRESS;}static unsigned int pciGetRemapOffset (PCI_HOST host, PCI_REGION region){	switch (host) {	case PCI_HOST0:		switch (region) {		case PCI_IO:			return PCI_0I_O_ADDRESS_REMAP;		case PCI_REGION0:			return PCI_0MEMORY0_ADDRESS_REMAP;		case PCI_REGION1:			return PCI_0MEMORY1_ADDRESS_REMAP;		case PCI_REGION2:			return PCI_0MEMORY2_ADDRESS_REMAP;		case PCI_REGION3:			return PCI_0MEMORY3_ADDRESS_REMAP;		}	case PCI_HOST1:		switch (region) {		case PCI_IO:			return PCI_1I_O_ADDRESS_REMAP;		case PCI_REGION0:			return PCI_1MEMORY0_ADDRESS_REMAP;		case PCI_REGION1:			return PCI_1MEMORY1_ADDRESS_REMAP;		case PCI_REGION2:			return PCI_1MEMORY2_ADDRESS_REMAP;		case PCI_REGION3:			return PCI_1MEMORY3_ADDRESS_REMAP;		}	}	return PCI_0MEMORY0_ADDRESS_REMAP;}bool pciMapSpace (PCI_HOST host, PCI_REGION region, unsigned int remapBase,		  unsigned int bankBase, unsigned int bankLength){	unsigned int low = 0xfff;	unsigned int high = 0x0;	unsigned int regOffset = pciGetRegOffset (host, region);	unsigned int remapOffset = pciGetRemapOffset (host, region);	if (bankLength != 0) {		low = (bankBase >> 20) & 0xfff;		high = ((bankBase + bankLength) >> 20) - 1;	}	GT_REG_WRITE (regOffset, low | (1 << 24));	/* no swapping */	GT_REG_WRITE (regOffset + 8, high);	if (bankLength != 0) {	/* must do AFTER writing maps */		GT_REG_WRITE (remapOffset, remapBase >> 20);	/* sorry, 32 bits only.								   dont support upper 32								   in this driver */	}	return true;}unsigned int pciGetSpaceBase (PCI_HOST host, PCI_REGION region){	unsigned int low;	unsigned int regOffset = pciGetRegOffset (host, region);	GT_REG_READ (regOffset, &low);	return (low & 0xfff) << 20;}unsigned int pciGetSpaceSize (PCI_HOST host, PCI_REGION region){	unsigned int low, high;	unsigned int regOffset = pciGetRegOffset (host, region);	GT_REG_READ (regOffset, &low);	GT_REG_READ (regOffset + 8, &high);	high &= 0xfff;	low &= 0xfff;	if (high <= low)

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆91在线播放| 成人午夜看片网址| 一区二区中文字幕在线| 5566中文字幕一区二区电影| 91天堂素人约啪| av不卡在线播放| 国产成人精品三级| 韩国成人在线视频| 狠狠色丁香婷婷综合| 狠狠色狠狠色综合日日91app| 免费久久99精品国产| 蜜桃一区二区三区在线观看| 蜜桃久久av一区| 激情文学综合丁香| 国产成人午夜视频| 国产精品一区在线观看你懂的| 国产呦萝稀缺另类资源| 国产成人高清视频| 色94色欧美sute亚洲线路二| 日韩电影一二三区| 欧美日韩aaa| 制服丝袜中文字幕亚洲| 日韩美女视频在线| 日本一区二区在线不卡| 日韩伦理av电影| 五月天中文字幕一区二区| 三级成人在线视频| 国产成人在线看| 99久久精品久久久久久清纯| 欧美日韩亚洲高清一区二区| 日韩免费视频一区二区| 国产精品久久久久久久裸模| 一区二区三区久久久| 热久久一区二区| 成人免费视频一区| 欧美性xxxxxxxx| 久久婷婷色综合| 亚洲精品国产精品乱码不99| 蜜臀av一区二区三区| 成人手机电影网| 777午夜精品免费视频| 中文字幕乱码久久午夜不卡| 夜色激情一区二区| 国产成人aaa| 欧美精品aⅴ在线视频| 国产精品午夜在线| 日韩国产欧美在线播放| 成人综合在线视频| 91精品国产91久久综合桃花| 国产精品欧美一区喷水| 奇米精品一区二区三区四区| eeuss鲁片一区二区三区在线观看| 欧美丰满嫩嫩电影| 亚洲美女淫视频| 国产99久久久国产精品潘金网站| 欧美精品1区2区3区| 亚洲天天做日日做天天谢日日欢 | 欧美在线观看你懂的| 久久综合色播五月| 欧美丰满嫩嫩电影| 国产一区二区三区香蕉| 麻豆一区二区在线| 欧美午夜寂寞影院| 亚洲女人的天堂| 国产精品18久久久久久久久| 欧美刺激午夜性久久久久久久| 国产精品久久久久一区二区三区| 国产又黄又大久久| 精品国产伦理网| 久久99热这里只有精品| 91精品国产综合久久婷婷香蕉| 亚洲人成网站色在线观看| 丁香婷婷综合网| 中文在线免费一区三区高中清不卡| 美女免费视频一区二区| 欧美一三区三区四区免费在线看| 亚洲第一综合色| 欧美日韩另类国产亚洲欧美一级| 一区二区三区四区不卡在线| av在线这里只有精品| 精品乱码亚洲一区二区不卡| 97久久人人超碰| 国产亚洲精品精华液| 秋霞午夜鲁丝一区二区老狼| 欧美肥妇毛茸茸| 日韩电影免费在线看| 欧美一区二区三区人| 青青草97国产精品免费观看无弹窗版 | 老司机精品视频导航| 日韩欧美在线不卡| 韩国欧美一区二区| 日韩视频不卡中文| 国产一区二区在线看| 亚洲国产精品ⅴa在线观看| 懂色一区二区三区免费观看| 欧美国产丝袜视频| 91国偷自产一区二区开放时间 | 91色综合久久久久婷婷| 91蜜桃视频在线| 精品久久免费看| 欧美精品一区二区在线播放 | 欧美二区乱c少妇| 日av在线不卡| 日本一区二区免费在线| 99r精品视频| 日韩在线一区二区三区| 欧美精品一区男女天堂| aaa欧美大片| 日韩精品成人一区二区在线| 精品久久久三级丝袜| 成人91在线观看| 日日摸夜夜添夜夜添国产精品| wwwwxxxxx欧美| 在线免费观看视频一区| 秋霞电影网一区二区| 欧美—级在线免费片| 欧美日韩久久久一区| 国产精品一区二区三区乱码| 一区二区三区在线视频观看58| 亚洲高清在线视频| 香蕉成人啪国产精品视频综合网| 日韩你懂的在线播放| 国产91精品一区二区麻豆网站| 一区二区视频免费在线观看| 欧美va在线播放| 91行情网站电视在线观看高清版| 裸体健美xxxx欧美裸体表演| 中文字幕一区二区三区精华液| 在线亚洲免费视频| www.欧美亚洲| 国内成人自拍视频| 日韩精品欧美成人高清一区二区| 欧美国产激情二区三区| 日韩一区二区在线免费观看| 色综合久久天天| 国产精品99久久久| 日本va欧美va精品发布| 一区二区三区日韩欧美精品| 国产区在线观看成人精品 | 亚洲线精品一区二区三区八戒| 久久午夜色播影院免费高清 | 国内精品伊人久久久久av一坑| 一区二区三区精品视频在线| 亚洲男女毛片无遮挡| 久久久久国产精品麻豆| 国产老妇另类xxxxx| 青青草国产精品97视觉盛宴| 亚洲午夜av在线| 亚洲欧美国产三级| 樱桃视频在线观看一区| 中文字幕制服丝袜成人av| 国产色综合久久| 欧美国产日韩a欧美在线观看 | 看电影不卡的网站| 日本视频一区二区| 爽好久久久欧美精品| 午夜视频一区在线观看| 亚洲亚洲精品在线观看| 亚洲一区二区不卡免费| 亚洲福利国产精品| 午夜国产不卡在线观看视频| 亚洲高清视频中文字幕| 亚洲成人免费观看| 日本中文字幕一区二区有限公司| 五月婷婷激情综合| 蜜桃一区二区三区在线| 国产一区二区三区不卡在线观看| 99视频热这里只有精品免费| 国产99精品在线观看| 成人一区二区三区视频在线观看 | 日韩av网站免费在线| 日本一不卡视频| 国内欧美视频一区二区| 懂色av一区二区在线播放| 不卡av在线免费观看| 91久久线看在观草草青青| 亚洲线精品一区二区三区八戒| 国产精品免费看片| 国产一区二区成人久久免费影院| 视频在线观看一区| 久久精品国产99| 成人av综合一区| 欧美系列在线观看| 久久婷婷国产综合精品青草| 国产精品欧美综合在线| 亚洲综合久久久| 久久99热这里只有精品| 本田岬高潮一区二区三区| 欧美日韩一区不卡| 欧美精品一区二区三区在线| 国产精品另类一区| 亚洲成人av资源| 国产剧情av麻豆香蕉精品| 色综合天天综合网天天狠天天| 久久国产精品露脸对白| 另类小说图片综合网| 成人app在线| 国产一区二区精品久久99| 亚洲精品一区二区三区四区高清| 成人福利视频在线看|