CN1877537A - 外围部件互连设备信息识别系统及方法 - Google Patents

外围部件互连设备信息识别系统及方法 Download PDF

Info

Publication number
CN1877537A
CN1877537A CNA2005100352800A CN200510035280A CN1877537A CN 1877537 A CN1877537 A CN 1877537A CN A2005100352800 A CNA2005100352800 A CN A2005100352800A CN 200510035280 A CN200510035280 A CN 200510035280A CN 1877537 A CN1877537 A CN 1877537A
Authority
CN
China
Prior art keywords
pci
address
facility information
equipment
peripheral parts
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2005100352800A
Other languages
English (en)
Inventor
游永兴
何凤龙
彭正全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry Co Ltd
Original Assignee
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hongfujin Precision Industry Shenzhen Co Ltd, Hon Hai Precision Industry Co Ltd filed Critical Hongfujin Precision Industry Shenzhen Co Ltd
Priority to CNA2005100352800A priority Critical patent/CN1877537A/zh
Priority to US11/308,650 priority patent/US20060282585A1/en
Publication of CN1877537A publication Critical patent/CN1877537A/zh
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4221Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus
    • G06F13/423Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus with synchronous protocol

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Small-Scale Networks (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明提供一种外围部件互连(PeripheralComponent Interface,PCI)设备信息识别系统及方法,该方法包括如下步骤:初始化一地址变量及一地址偏移量;向一配置端口写入第一地址值;从一数据端口读取一笔数据;根据该笔数据判断在PCI总线上是否存在对应的PCI设备;若存在一对应的PCI设备,则向配置端口写入第二地址值;从数据端口读取一PCI设备信息;将地址偏移量加上1;判断地址偏移量是否小于64;若地址偏移量小于64,则读取该PCI设备的所有信息;判断所有PCI设备是否识别完毕;若所有PCI设备已经识别完毕,则读取并显示所有PCI设备信息。实施本发明,可直接从PCI配置空间的层面上识别出PCI总线上所有PCI设备信息,方便对PCI设备的测试。

Description

外围部件互连设备信息识别系统及方法
【技术领域】
本发明涉及一种识别计算机设备信息的系统及方法,特别是涉及一种识别外围部件互连设备信息的系统及方法。
【背景技术】
微型计算机界以Intel公司为主推出了计算机外围部件互连(Peripheral Component Interface,PCI)总线的规范。该规范采用PCI设备所具有的配置空间以及PCI总线通过桥接电路与微处理器相连的技术,使得PCI总线具有广泛的适应性;而且PCI总线采用宽字节和高达66Mb/Sec的时钟频率以及主控方式传输来满足高速设备的要求。因此,PCI总线可同时支持多个外围设备,例如显卡、声卡、网卡、内置ADSL、USB卡、IDE适配卡、电视卡、视频采集卡以及其它种类繁多的外围卡。
PCI提供了自动配置功能,从而保证了用户在安装外围卡时,不需要手工调整跨接线。每个功能设备都有一个相互独立的配置空间(256个字节),其可分为两部分:一部分为64字节的配置首区,其是为PCI特殊定义,并具有相同的格式,配置首区的内容随其首区类型的不同而变化,PCI定义了桥类设备以及非桥类设备这两种首区类型;另一部份为192字节的设备特殊配置缓存器空间,其随不同的设备而变化。每个功能设备对PCI配置空间的访问方式有两种:直接地址的访问以及基本输入输出系统(Basic Input/Output System,BIOS)指令访问。其中,PCI分别使用一配置端口和一数据端口来完成直接地址的访问,主要通过对配置端口写入指定的地址字,其由总线号、设备号、功能号以及缓存器号构成,然后对数据端口读写就可以对指定缓存器进行读写操作;而BIOS指令访问是通过使用BIOS中断来完成的。
目前测试PCI设备的软件较多,其功能各异。相关PCI测试技术曾揭露于2004年07月28日公开的申请号为03101406.2的中国专利申请案,其名称为“外围部件互连总线的测试方法”。该专利申请揭露了一种外围部件互连总线的测试方法,其通过PCI测试卡直接操作PCI总线映像的I/O、内存空间,将PCI测试卡插入PCI插槽中,根据配置信息为该PCI测试卡分配主机访问所需的参数,再将该参数写入PCI测试卡的PCI配置空间,根据该配置空间确定该PCI测试卡的埠映像方式,分别向32位及64位地址写入数据,最后根据读取结果得出测试结论。
然而,上述技术是通过一插在PCI插槽中的PCI测试卡来测试PCI总线的。有鉴于此,需提供一种识别PCI设备信息的系统及方法,其无需增加任何硬件设备就可识别出PCI总线上所有PCI设备信息。
【发明内容】
鉴于以上内容,在此以较佳实施例说明一种外围部件互连(Peripheral Component Interface,PCI)设备信息识别系统,其可识别出一PCI总线上所有PCI设备信息。该系统包括一PCI设备信息识别模块、一PCI总线以及多个PCI设备。其中,PCI设备信息识别模块用于配置每一PCI设备的地址,根据该PCI设备地址于PCI总线上查找对应的PCI设备,以及读取并显示PCI设备信息。所述PCI设备信息包括PCI设备的厂商标识、设备号、设备版本号、设备资源、配置空间以及设备状态等信息。所述PCI设备信息识别模块包括一PCI设备地址配置子模块、一PCI设备查找子模块以及一PCI设备信息读取子模块。其中,PCI设备地址配置子模块用于配置每一种PCI设备在PCI总线上的地址;PCI设备查找子模块用于根据配置的PCI设备地址于PCI总线上查找对应的PCI设备;PCI设备信息读取子模块用于读取并显示每一PCI设备信息。
本发明较佳实施例还提供一种外围部件互连设备信息识别方法,其可识别出一PCI总线上所有PCI设备信息,该方法包括如下步骤:(a)初始化一地址变量及一地址偏移量;(b)向一配置端口写入第一地址值;(c)从一数据端口读取一笔数据;(d)根据该笔数据判断在PCI总线上是否存在对应的PCI设备;(e)若不存在一对应的PCI设备,则配置下一个PCI设备地址;若存在一对应的PCI设备,则向所述的配置端口写入第二地址值;(f)从所述的数据端口读取一PCI设备信息;(g)将地址偏移量加上1;(h)判断地址偏移量是否小于64;(i)若地址偏移量小于64,则读取该PCI设备的所有信息;若地址偏移量等于64,则配置其它PCI设备地址;(j)判断所有PCI设备是否查找完毕;(k)若还有其它PCI设备没有查找完毕,则继续配置下一个PCI设备地址;若所有PCI设备已经查找完毕,则读取并显示所有PCI设备信息。
相较于现有技术,本发明提供一种外围部件互连设备信息识别系统及方法,其可直接从PCI配置空间的层面上识别出PCI总线上所有PCI设备信息,从而让PCI设备测试人员了解当前PCI设备信息,方便PCI设备的测试。
【附图说明】
图1是本发明外围部件互连设备信息识别系统的较佳实施例的示意图。
图2是本发明外围部件互连设备信息识别方法的较佳实施例的主流程图。
图3是本发明外围部件互连设备信息识别方法的较佳实施例的细化方法流程图。
【具体实施方式】
如图1所示,是本发明外围部件互连(Peripheral ComponentInterface,PCI)设备信息识别系统的较佳实施例示意图。该系统包括一PCI设备信息识别模块1、一PCI总线2以及多个PCI设备3。其中,PCI设备信息识别模块1装载于操作系统上的一独立的软件上,而各种PCI设备3连接于PCI总线2上,PCI设备信息识别模块1通过操作系统层直接识别开获取每一PCI设备3的信息。该PCI设备信息识别模块1,用于配置每一PCI设备3的地址,根据该PCI设备地址于PCI总线2上查找对应的PCI设备3,以及读取并显示PCI设备信息。所述PCI设备信息包括PCI设备3的厂商标识、设备号、设备版本号、设备资源、配置空间以及设备状态等信息。
所述PCI设备信息识别模块1包括一PCI设备地址配置子模块11、一PCI设备查找子模块12以及一PCI设备信息读取子模块13。其中,PCI设备地址配置子模块11用于配置每一种PCI设备3于PCI总线2上的地址;PCI设备查找子模块12用于根据配置的PCI设备地址于PCI总线2上查找对应的PCI设备3;PCI设备信息读取子模块13用于读取并显示每一PCI设备信息。
如图2所示,是本发明外围部件互连设备信息识别方法的较佳实施例的主流程图。PCI设备地址配置子模块11配置一PCI设备3于PCI总线2上的地址(步骤S20)。PCI设备查找子模块12根据该PCI设备地址于PCI总线2上查找对应的PCI设备3(步骤S21)。PCI设备信息读取子模块13于PCI总线2上读取该PCI设备3的信息(步骤S22)。接着PCI设备地址配置子模块11判断于PCI总线2上的所有PCI设备3是否查找完毕(步骤S23)。若还有PCI设备3未查找完毕,则流程转向步骤S20配置下一个PCI设备地址;若所有PCI设备3均查找完毕,则显示所有PCI设备信息(步骤S24),让PCI设备测试人员了解当前PCI设备信息,从而方便PCI设备的测试。
如图3所示,是本发明外围部件互连设备信息识别方法的较佳实施例的细化方法流程图。初始化一地址变量addr为“0x00”,以及地址偏移量offset为“0x00”(步骤S30)。PCI设备地址配置子模块11向地址为“0xCF8”的配置端口中写入第一地址值“0x80000000+addr”(步骤S31)。其中该“0x80000000”为一个32位的十六进制值,其在PCI总线规范中规定:第16位至第23位标示总线号,第11位至第15位标示设备号,第8位至第10位标示功能号,其它位为保留位。而后PCI设备地址配置子模块11从地址为“0xCFC”的数据端口中读取一笔数据val(步骤S32)。PCI设备查找子模块12判断读取的数据val值是否等于“0xFFFFFFFF”,即判断在PCI总线2上是否存在对应的PCI设备3(步骤S33)。若val值等于“0xFFFFFFFF”,表明在该PCI总线2上没有找到一对应的PCI设备3,则PCI设备地址配置子模块11将地址变量addr加上“0x80000000”来配置其它PCI设备地址值(步骤S34);若val值不等于“0xFFFFFFFF”,表明在该PCI总线2上找到一对应的PCI设备3,则PCI设备地址配置子模块11向地址为“0xCF8”的配置端口中写入第二地址值“0x80000000+addr+offset”,所述的地址偏移量offset值的取值范围为1至64(步骤S35)。而后PCI设备信息读取子模块13从地址为“0xCFC”的数据端口中读取该PCI设备3的一笔信息,同时PCI设备地址配置子模块11将地址偏移量offset值加上1(步骤S36)。接着PCI设备地址配置子模块11判断地址偏移量offset值是否小于64,即判断该PCI设备3的所有信息是否读取完毕(步骤S37)。若地址偏移量offset值小于64,则流程转向步骤S35继续读取该PCI设备3的所有信息;若地址偏移量offset值等于64,则流程转向步骤S34配置其它PCI设备地址值。最后PCI设备地址配置子模块11判断地址变量addr是否大于“0x80FFFF00”,即判断PCI总线2上的所有PCI设备信息是否读取完毕(步骤S38)。若地址变量addr小于或等于“0x80FFFF00”,则流程转向步骤S31继续配置下一个PCI设备地址,以便读取下一个PCI设备3的信息;若地址变量addr大于“0x80FFFF00”,则流程结束,表明在PCI总线2上的所有PCI设备信息已经识别完毕。

Claims (14)

1.一种外围部件互连设备信息识别系统,其可识别出一PCI总线上所有PCI设备信息,其特征在于,该系统包括:
一PCI设备信息识别模块,用于配置每一PCI设备的地址,查找对应的PCI设备,以及读取并显示PCI设备信息,该PCI设备信息识别模块包括:
一PCI设备地址配置子模块,用于配置每一PCI设备于PCI总线上的地址;
一PCI设备查找子模块,用于根据配置的PCI设备地址于PCI总线上查找对应的PCI设备;
一PCI设备信息读取子模块,用于读取并显示每一PCI设备信息。
2.如权利要求1所述的外围部件互连设备信息识别系统,其特征在于,其中该PCI设备信息识别模块是装载于一操作系统中一独立的软件上。
3.如权利要求1所述的外围部件互连设备信息识别系统,其特征在于,其中该PCI设备信息识别模块是通过操作系统层直接识别并获取每一PCI设备信息。
4.一种外围部件互连设备信息识别方法,其可识别出一PCI总线上所有PCI设备信息,其特征在于,该方法包括如下步骤:
配置一PCI设备于PCI总线上的地址;
根据该PCI设备地址于PCI总线上查找对应的PCI设备;
读取该PCI设备的所有信息;
判断所有PCI设备是否查找完毕;
若还有PCI设备未查找完毕,则配置下一个PCI设备的地址;
若所有PCI设备均查找完毕,则显示所有PCI设备的信息。
5.一种外围部件互连设备信息识别方法,其可识别出一PCI总线上所有PCI设备信息,其特征在于,该方法包括如下步骤:
初始化一地址变量以及一地址偏移量;
向一配置端口写入第一地址值;
从一数据端口读取一笔数据;
判断在PCI总线上是否存在对应的PCI设备;
若存在一对应的PCI设备,则向所述的配置端口写入第二地址值;
从所述的数据端口读取一PCI设备信息;
将地址偏移量加上1;
判断地址偏移量是否小于64;
若地址偏移量小于64,则读取该PCI设备的所有信息;
判断所有PCI设备是否查找完毕;
若还有其它PCI设备没有查找完毕,则配置下一个PCI设备地址。
6.如权利要求5所述的外围部件互连设备信息识别方法,其中该配置端口的地址是为十六进制数“0xCF8”。
7.如权利要求5所述的外围部件互连设备信息识别方法,其特征在于,其中该数据端口的地址是为十六进制数“0xCFC”。
8.如权利要求5所述的外围部件互连设备信息识别方法,其特征在于,其中该第一地址值是等于十六进制数“0x80000000”与所述地址变量的和。
9.如权利要求5所述的外围部件互连设备信息识别方法,其特征在于,其中该第二地址值是等于十六进制数“0x80000000”、所述地址变量及所述地址偏移量的和。
10.如权利要求5所述的外围部件互连设备信息识别方法,其特征在于,其中该判断在PCI总线上是否存在对应的PCI设备的步骤,是通过判断读取的数据是否等于十六进制数“0xFFFFFFFF”来实现。
11.如权利要求5所述的外围部件互连设备信息识别方法,其特征在于,其中该判断所有PCI设备是否查找完毕的步骤,是通过判断所述的地址变量是否大于十六进制数“0x80FFFF00”来实现。
12.如权利要求5所述的外围部件互连设备信息识别方法,其特征在于,其中该判断在PCI总线上是否存在对应的PCI设备的步骤还包括一步骤:若不存在一对应的PCI设备,则配置下一个PCI设备的地址。
13.权利要求5所述的外围部件互连设备信息识别方法,其特征在于,其中该判断地址偏移量是否小于64的步骤还包括一步骤:若地址偏移量等于64,则配置下一个PCI设备的地址。
14.如权利要求5所述的外围部件互连设备信息识别方法,其特征在于,其中该PCI设备信息包括厂商标识、设备号、版本号、设备资源、配置空间以及设备状态。
CNA2005100352800A 2005-06-10 2005-06-10 外围部件互连设备信息识别系统及方法 Pending CN1877537A (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CNA2005100352800A CN1877537A (zh) 2005-06-10 2005-06-10 外围部件互连设备信息识别系统及方法
US11/308,650 US20060282585A1 (en) 2005-06-10 2006-04-17 Method and system for identifying peripheral component interconnect device information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2005100352800A CN1877537A (zh) 2005-06-10 2005-06-10 外围部件互连设备信息识别系统及方法

Publications (1)

Publication Number Publication Date
CN1877537A true CN1877537A (zh) 2006-12-13

Family

ID=37509980

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2005100352800A Pending CN1877537A (zh) 2005-06-10 2005-06-10 外围部件互连设备信息识别系统及方法

Country Status (2)

Country Link
US (1) US20060282585A1 (zh)
CN (1) CN1877537A (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101377754B (zh) * 2007-08-30 2010-09-22 英业达股份有限公司 桥接sas信道测试系统及其测试方法
CN101359307B (zh) * 2007-08-03 2010-12-08 英业达股份有限公司 Sas信道的测试装置及其测试方法
CN101739323B (zh) * 2008-11-07 2012-05-23 英业达股份有限公司 桥接sas信道测试系统及其测试方法
CN111124842A (zh) * 2019-12-10 2020-05-08 山东超越数控电子股份有限公司 一种国产固件界面显示设备信息的方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103870376B (zh) * 2012-12-12 2016-07-06 联想(北京)有限公司 一种电子设备的扩展板卡检测方法及电子设备
US9454378B2 (en) * 2013-09-30 2016-09-27 Apple Inc. Global configuration broadcast

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2547654B2 (ja) * 1990-06-29 1996-10-23 三洋電機株式会社 データ処理装置
US5805924A (en) * 1994-11-08 1998-09-08 Stoevhase; Bent Method and apparatus for configuring fabrics within a fibre channel system
US6418493B1 (en) * 1997-12-29 2002-07-09 Intel Corporation Method and apparatus for robust addressing on a dynamically configurable bus
US6442640B1 (en) * 1998-11-23 2002-08-27 Lucent Technologies, Inc. Method and apparatus for determining an address uniquely identifying a hardware component on a common bus
JP3791742B2 (ja) * 1999-05-28 2006-06-28 株式会社沖データ Pciバス制御システム
US6789136B1 (en) * 2000-12-29 2004-09-07 Intel Corporation Efficient method to obtain device addresses from devices on a bus
US6928498B2 (en) * 2001-01-31 2005-08-09 Efficient Networks, Inc. System and method for identifying open peripheral component interconnect (PCI) slots
US6820164B2 (en) * 2001-04-17 2004-11-16 International Business Machines Corporation Peripheral component interconnect bus detection in logically partitioned computer system involving authorizing guest operating system to conduct configuration input-output operation with functions of pci devices
US7139839B2 (en) * 2001-11-26 2006-11-21 Schneider Automation Inc. Method and apparatus for assigning a network node address
US7324231B2 (en) * 2002-12-05 2008-01-29 Hewlett-Packard Development Company, L.P. Printer expansion method and apparatus
KR100599112B1 (ko) * 2004-05-08 2006-07-13 삼성전자주식회사 Pci 시스템에서 에이전트간 통신 방법 및 통신 장치
TWI244594B (en) * 2004-07-13 2005-12-01 Quanta Comp Inc Method for automatically assigning the address of communication ports and a blade server system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101359307B (zh) * 2007-08-03 2010-12-08 英业达股份有限公司 Sas信道的测试装置及其测试方法
CN101377754B (zh) * 2007-08-30 2010-09-22 英业达股份有限公司 桥接sas信道测试系统及其测试方法
CN101739323B (zh) * 2008-11-07 2012-05-23 英业达股份有限公司 桥接sas信道测试系统及其测试方法
CN111124842A (zh) * 2019-12-10 2020-05-08 山东超越数控电子股份有限公司 一种国产固件界面显示设备信息的方法

Also Published As

Publication number Publication date
US20060282585A1 (en) 2006-12-14

Similar Documents

Publication Publication Date Title
US7987438B2 (en) Structure for initializing expansion adapters installed in a computer system having similar expansion adapters
US7890690B2 (en) System and method for dual-ported flash memory
US5724529A (en) Computer system with multiple PC card controllers and a method of controlling I/O transfers in the system
EP1133730B1 (en) Method for flashing a read only memory (rom) chip of a host adapter with updated bios code
US6505278B1 (en) Method for flashing ESCD and variables into a ROM
US7873754B2 (en) Structure for option ROM characterization
US7526578B2 (en) Option ROM characterization
US7003627B2 (en) Deferred tuple space programming of expansion modules
US8578360B1 (en) Dynamically updating a computer system and firmware image utilizing an option read only memory (OPROM) data structure
CN1877537A (zh) 外围部件互连设备信息识别系统及方法
KR20020082721A (ko) 디바이스 드라이버 설치방법
EP1252569B1 (en) Virtual rom for device enumeration
CN1516014A (zh) 外围部件互连总线的测试方法
KR20070006717A (ko) 파일 시스템의 상호 운용성을 지원하는 메모리 카드
US7752429B2 (en) Computer system and boot code accessing method thereof
US7216211B2 (en) Variable sized flash memory in PCI
CN110795373B (zh) 一种i2c总线到并行总线的转换方法、终端及存储介质
US8527983B2 (en) Host bus adaptor driver and operating system installation method
US20050092846A1 (en) Simulated smartmedia/XD-picture memory card capable of using various kinds on non-volatile memory
US7568061B2 (en) Initializing expansion adapters installed in a computer system having similar expansion adapters
US6826628B2 (en) PCI-PCMCIA smart card reader
US20070208929A1 (en) Device information managements systems and methods
US7085877B1 (en) Method and apparatus for combination host bus adapter
US6742073B1 (en) Bus controller technique to control N buses
KR101284145B1 (ko) 메모리 액세스 방식 pcmcia 카드의 읽기 액세스 지원네트워크 프로세서 시스템

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication