[go: up one dir, main page]

JP3584977B2 - PCI device, PCI bus system including the same, and data collection method - Google Patents

PCI device, PCI bus system including the same, and data collection method Download PDF

Info

Publication number
JP3584977B2
JP3584977B2 JP2001167800A JP2001167800A JP3584977B2 JP 3584977 B2 JP3584977 B2 JP 3584977B2 JP 2001167800 A JP2001167800 A JP 2001167800A JP 2001167800 A JP2001167800 A JP 2001167800A JP 3584977 B2 JP3584977 B2 JP 3584977B2
Authority
JP
Japan
Prior art keywords
data
pci
register
configuration
address
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.)
Expired - Fee Related
Application number
JP2001167800A
Other languages
Japanese (ja)
Other versions
JP2002358251A (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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP2001167800A priority Critical patent/JP3584977B2/en
Publication of JP2002358251A publication Critical patent/JP2002358251A/en
Application granted granted Critical
Publication of JP3584977B2 publication Critical patent/JP3584977B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、PCI(Peripheral Component Interconnect)バスに接続されるPCIデバイスおよびそのPCIデバイスを備えるPCIシステムに関する。さらには、そのPCIデバイス内に格納されたデータを収集する方法に関する。
【0002】
【従来の技術】
PCIバスはコンピュータ用バスアーキテクチャの一つであって、モデムカードやビデオカードなど種々のPCIデバイスの接続(増設)が可能である。このようなPCIバスを備えるPCIバスシステムの一例として、特開平10−21152号公報には、大容量のLAN回線を収容してデータ通信を専用に行うLANP(LAN Processor)のシステムが開示されている。図10は、そのシステムの概略構成を示すブロック図である。
【0003】
図10を参照すると、LANPは、中央処理装置(CPU)200と主記憶装置(MEM)201がシステムバス210を介して接続され、システムバス210にPCIバス制御用LSI(PCL)202が接続され、PCL202にLAN回線接続アダプタ(NIC)203およびホスト接続装置(OLA)204がPCIバス211を介して接続された構成となっている。
【0004】
上記のLANPは、NIC203を介してLAN回線222と接続することができる。また、LANPは、OLA204がIOインタフェース212を介して外部のホストコンピュータ221と接続されており、ホストコンピュータ221との間でデータの送受信を行うことができる。ここで、NIC203およびOLA204は通信プロトコルを制御するPCI拡張カード(PCIデバイス)である。
【0005】
図11に、PCI拡張カードの一例を示す。このPCI拡張カードは図10に示したOLA204であって、その構成は、ホストコンピュータ221とのデータ伝送の制御を行うマイクロプロセッサ(MPU)301と、PCIバス211を介したデータ転送の制御をMPU301とは独立して行うPCIバスコントローラ(PBC)300と、データの一時記憶などに用いられる、DRAMよりなるローカルメモリ(LM)302とからなる。PBC300およびMPU301はそれぞれ内部バスを介してLM302に接続されており、それぞれがLM302にアクセスしてデータの読み出し/書き込みを行うことができる。また、PBC300は、図10に示したCPU200やMEM201とのPCIバス211を介したデータの送受信を行うことができる。
【0006】
PBC300は、内部にSRAMで構成されたコンフィグレーション空間(CFG)310を備える。コンフィグレーション空間はコンフィグレーション情報を記憶するための記録領域であって、システム設定時にコンフィグレーション情報が設定される。コンフィグレーション情報は定義済みヘッダ領域とデバイス依存領域からなり、通常は、PCIバス仕様で、全体として256バイトある。定義済みヘッダ領域は64バイトであり、そのレイアウトはPCIバスの規格として定められている。デバイス依存領域は192バイトあり、通常、各PCIデバイス毎に任意の情報を設定することができる。PBC300は、PCIバス211を介したPCIバストランザクションを受け付けると、その受け付けたトランザクションの内容に応じて、LM302にアクセスしてデータの読み出し/書き込みを行ったり、PCIバス211を介したデータの転送を行ったりする。これらのデータ伝送に際して必要となる制御ビットやPCI拡張カードをCPU200に認識させるめの情報などがコンフィグレーション情報として設定されている。
【0007】
【発明が解決しようとする課題】
上述したようなPCI拡張カード(PCIデバイス)がPCIバスに接続されるシステムにおいて、PCIデバイス内に故障が生じた場合には、そのPCIデバイス内のデータ、例えば図11のLM302に記憶されているデータを収集して故障原因を解析する、といったことが行われる。また、PCIデバイスの開発時のデバッグの際にも、PCIデバイス内のデータの収集が行われる。
【0008】
しかしながら、PCIデバイス内で障害が検出されている場合やデバッグ時には、PCIデバイス内のPCIバス関連の設定情報が失われていたり、正しく設定されていなかったりする場合があり、そのような場合には、PCIデバイスは通常のPCIバストランザクションを受け付けることができなくなり、その結果、PCIデバイス内のデータを収集することができなくなってしまう。
【0009】
更に、PCIデバイスがPCIトランザクションを受け付けられない状態の時に、オペレーティングシステム(OS)からPCIデバイスに対して情報収集のためのIOトランザクションが発行されると、PCIデバイスはOSからのIOトランザクションの結果としてPCIバス上に発行されるトランザクションに対する動作を保証できない。その場合、PCIホスト(図10のPCL202)が致命的なエラーを検出するか、またはPCIバス上のトランザクションが消失するというような事象が発生する。その結果、OSが動作を続けることができなくなり、PCIデバイス内のデータ収集動作によりシステム全体が停止する(システムエラーの発生)という問題があった。
【0010】
本発明の目的は、上記問題を解決し、データの収集を確実に行うことのできる、PCIデバイスおよびデータ収集方法を提供することにある。
【0011】
本発明のさらなる目的は、そのようなPCIデバイスを用いたPCIバスシステムを提供することにある。
【0012】
【課題を解決するための手段】
上記目的を達成するため、本発明のPCIデバイスは、PCIバスに接続される、任意にレジスタの設定が可能なデバイス固有領域を含むコンフィグレーション空間を持つPCIデバイスであって、
前記デバイス固有領域として定義されるレジスタが実装され、データ収集指示を受けると、前記レジスタの内容に従って指示されたデータの収集を行うデータ収集制御手段と、
前記PCIバスを介して前記デバイス固有領域に対するコンフィグレーションアクセスを受けると、前記データ収集制御手段に対して前記データ収集指示を送出するとともに、該データ収集指示に応じて前記データ収集制御手段が収集したデータを前記PCIバス上に送出するコンフィグレーションアクセス制御手段とを有する。
【0013】
本発明のPCIバスシステムは、上述のいずれかのPCIデバイスと、前記PCIデバイスが接続されるPCIバスとを有することを特徴とする。
【0014】
本発明のデータ収集方法は、任意にレジスタの設定が可能なデバイス固有領域を含むコンフィグレーション空間を持つPCIデバイスがPCIバスに接続されたPCIバスシステムにおいて行われるデータ収集方法であって、
前記デバイス固有領域を使用して、前記PCIデバイスに対してデータの収集を指示するコンフィグレーションアクセスを実行するステップと、
前記PCIデバイスが、前記コンフィグレーションアクセスに従って指定されたデータの収集を行い、該収集したデータを前記PCIバス上に送出するステップとを含むことを特徴とする。
【0015】
上記のとおりの本発明においては、PCIバスにおけるコンフィギュレーションアクセスを利用してPCIデバイス内に格納されたデータの収集が行われる。このPCIバスにおけるコンフィギュレーションアクセスは、PCIデバイスに何も設定されていない状態であっても、PCIバス仕様で定義されるIDESL信号により対象のPCIデバイスを指定してアクセスすることが可能であるため、PCIバス上のPCIデバイスの障害のみならず、OSやデバイスドライバなどのソフトウェアの不具合によりPCIバス動作に関する情報が正常に設定されていない場合でも、PCIデバイス内のデータを収集することが可能である。よって、本発明によれば、PCIデバイス内で障害が検出されている場合やデバッグ時に、PCIデバイス内のPCIバス関連の設定情報が失われていたり、正しく設定されていなかったりしていても、PCIデバイス内のデータを収集することができる。
【0016】
また、従来は、障害時の情報収集の際にPCIホストが致命的なエラーを検出したり、PCIバス上のトランザクションが消失したりして、OSが動作を続けることができなくなってシステム全体が停止する(システムエラーの発生)という問題があったが、本発明では、上記のとおり、障害時においてPCIデバイス内のデータを収集する動作を確実に行うことが可能であるので、そのようなシステムエラーは発生しない。
【0017】
【発明の実施の形態】
次に、本発明の実施形態について図面を参照して説明する。
【0018】
本発明のPCIデバイスは、周知のPCIバスに接続されるものであって、例えばコンピュータのマザーボードに拡張ボード(カード)として取り付けられる。図1に、本発明のPCIデバイスの一実施形態であるPCIカードの概略構成を示す。
【0019】
本実施形態のPCIカード102は、PCIバス101に接続されるものであって、その構成は、PCIバスインターフェース制御部103、Configアクセス制御部104、ノーマルアクセス制御部105、PCIバストレーサ106、Configレジスタ107、内部レジスタ108、データ収集制御部109、内部バストレーサ110、内部バスインタフェース制御部111、内部バス112、ローカルメモリ113、マイクロプロセッサ(MPU:Micro Processing Unit)114からなる。
【0020】
PCIカード102はコンフィグレーション空間という特別な256バイトのレジスタを有する。図2に、PCIバス仕様におけるコンフィギュレーション空間のアドレスマップの一例を示す。先頭より64バイトはヘッダ領域(定義済みヘッダ領域)であって、各PCIデバイス毎に装備する必要がある。残りの192バイトはデバイス固有領域(デバイス依存領域)であって、その使用は各PCIデバイスで自由である。ヘッダ領域として定義されるレジスタはConfigレジスタ107内に実装され、デバイス固有領域として定義されるレジスタはデータ収集制御部109内に実装される。後述するデータ収集制御部109へのデータ収集を指示するコンフィギュレーションアクセスは、この図2に示したコンフィギュレーション空間のデバイス固有領域を使用して実行される。
【0021】
図3に、PCIバス仕様のコンフィギュレーションアクセスにおけるAD(アドレス・データ)線のアドレスフェーズの定義を示す。ビット0〜1で「タイプ」、ビット7〜2で「レジスタ番号」、ビット10〜8で「機能番号」、ビット31〜11で「予約」がそれぞれ定義されている。コンフィギュレーション空間のどのアドレスをアクセスするかは、ビット7〜2で定義されるレジスタ番号によって決定する。6ビットのレジスタ番号はダブルワード(32ビット)単位での指定となるため、例えば10h〜3Fh(「**h」は16進数表現であることを示す)の値であればデバイス固有領域を示している。
【0022】
PCIバスインターフェース制御部103はPCIバス101に接続されており、PCIバス101を介してコンフィグレーションアクセスを受けた場合は、Configアクセス制御部104に対してそのコンフィグレーションアクセスに応じた処理の実行を指示し、メモリリードやメモリライトなど、コンフィグレーションアクセス以外のPCIバストランザクションを受け付けた場合は、ノーマルアクセス制御部105に対してそのPCIバストランザクションに応じた処理の実行を指示する。
【0023】
Configアクセス制御部104は、PCIバスインターフェース制御部103からの指示に従って、受け付けたコンフィグレーションアクセスの内容に応じて、Configレジスタ107へのアクセスを実行したり、データ収集制御部109に対してデータ収集の指示を出したりする。例えば、Configアクセス制御部104は、図3に示したコンフィギュレーションサイクルのビット7〜2で定義されるレジスタ番号が「00h」〜「0Fh」であれば、図2に示したコンフィグレーション空間のヘッダ領域であるため、Configレジスタ107へのアクセスを実行し、レジスタ番号が「10h」〜「3Fh」であれば、図2に示したコンフィグレーション空間のデバイス固有領域であるため、データ収集制御部109にデータ収集を指示する。
【0024】
ノーマルアクセス制御部105は、PCIバスインターフェース制御部103からの指示に応じて、受け付けたPCIバストランザクションの内容に従って、内部レジスタ108へアクセスしたり、内部バスインターフェース制御部111を介して内部バス112へアクセスして、最終的にローカルメモリ113やMPU114へのアクセスを実行する。
【0025】
PCIバストレーサ106は、PCIバスインターフェース制御部103を通して、PCIバス101上で実行されるトランザクションのトレースデータを格納する。同様に、内部バストレーサ110は内部バス114上で実行されるトランザクションのトレースデータを格納する。
【0026】
データ収集制御部109は、デバイス固有領域に対するコンフィギュレーションアクセスによりConfigアクセス制御部104からデータ収集の指示を受ると、その指示に従って、指示されたデータの収集を行う。例えばPCIバストレーサ106に関するデータ収集指示であれば、データ収集制御部109は、PCIバストレーサ106からデータを読み出してConfigアクセス制御部104へその読み出したデータを渡す。ローカルメモリ113に関するデータ収集指示であれば、データ収集制御部109は、内部バス112を介してローカルメモリ113へ指示を出してローカルメモリ113のダンプデータをリードし、Configアクセス制御部104へそのリードしたダンプデータを渡す。MPU114に関するデータ収集指示であれば、データ収集制御部109は、内部バス112を介してMPU114へ指示を出してMPU114のダンプデータをリードし、Configアクセス制御部104へそのリードしたダンプデータを渡す。内部バストレーサ110に関するデータ収集指示であれば、データ収集制御部109は、内部バストレーサ110からデータを読み出し、Configアクセス制御部104へその読み出したデータを渡す。内部レジスタ108に関するデータ収集指示であれば、データ収集制御部109は、内部レジスタ108からデータを読み出し、Configアクセス制御部104へその読み出したデータを渡す。各々から収集されたデータはPCIバスインターフェース制御部103を介してPCIバス101へ出力される。
【0027】
次に、本実施形態のPCIカード102の動作について具体的に説明する。図4は、図1のPCIカード102内でマッピングされているアドレス空間の一例を示す模式図である。この例では、アドレス「00000000h〜000003FFh」は内部レジスタ領域、アドレス「00000400h〜000FFFFFh」は未使用、アドレス「00100000h〜001FFFFFh」はPCIバストレーサ領域、アドレス「00200000h〜002FFFFFh」は内部バストレーサ領域、「00300000h〜012FFFFFh」はローカルメモリ領域、「01300000h〜FFFFFDFFh」は未使用、「FFFFFE00h〜FFFFFFFFh」はMPU領域となっている。
【0028】
PCIバス101上のアドレスフェーズで、図3で図示されるコンフィギュレーションサイクルが実行された時、PCIカード102は、バスマスタであるPCIホストにバス接続ではなく1対1で接続されるIDSEL(イニシャライズデバイスセレクト)信号がアサートされている(アクティブ状態)と、実行されているコンフィギュレーションサイクルがPCIカード102自身をターゲットとしたコンフィギュレーションサイクルであることを認識する。つまり、コンフィギュレーションサイクルはターゲットとなるPCIデバイスをIDSEL信号によって指定するため、PCIデバイス側、ここではPCIカード102側に何の設定もされていない状態でもアクセス可能である。通常のメモリリード/ライトのトランザクションなどでは、PCIデバイス側にアドレス空間などの設定が完了した後でないと、アクセス不可能である。
【0029】
PCIバス101から本PCIカード102に対するコンフィギュレーションアクセスを受け付けると、PCIバスインターフェース制御部103は、Configアクセス制御部104へ図3における機能番号及びレジスタ番号を通知する。Configアクセス制御部104は、PCIバスインターフェース制御部103から受け取った機能番号及びレジスタ番号によりアクセス先を判定する。ここで、PCIカード102が単一機能デバイスであると仮定すると、機能番号は0固定となる。この場合、アクセス先はレジスタ番号によって決定され、6ビットのレジスタ番号はダブルワード(32ビット)単位でコンフィギュレーションレジスタを示し、それは図2で示される256バイトの領域のどのレジスタにアクセスするかを示す。
【0030】
レジスタ番号はダブルワード単位で振られているため、レジスタ番号を4倍すると図2におけるレジスタのアドレスとなる。例えば、レジスタ番号が「02h」を示している場合、アドレスは「08h」で先頭から64バイト以内のヘッダ領域となるから、Configアクセス制御部はConfigレジスタ107にアクセスする。Configレジスタ107内のコンフィギュレーションレジスタはPCIバス仕様に決められ、アドレス「08h」のレジスタはクラスコードとレビジョン番号を格納している。レジスタ番号が「10h」以上であれば、デバイス固有領域を指し示しているため、Configアクセス制御部104はデータ収集制御部109へデータ収集の指示を出す。つまり、図2のヘッダ領域はConfigレジスタ107内に実装され、デバイス固有領域はデータ収集制御部109内に実装される。
【0031】
データ収集制御部109にデータ収集を行わせるためには、2回のコンフィギュレーションアクセスを実行する必要がある。ここで、図2におけるデバイス固有領域はアドレス「40h」からの32ビットのレジスタのみを使用する。つまり、コンフィギュレーションアクセスにおけるレジスタ番号は「10h」のみ使用する。
【0032】
1回目のコンフィギュレーションアクセスでは、レジスタ番号「10h」に対してコンフィギュレーションライトを実行する。ライトするデータはデータ収集を行うアドレスであり、PCIカード102内のアドレスマッピングは図4で示されている通りである。例えば「00000000h」のアドレスであれば、データ収集制御部109は内部レジスタ108の先頭のレジスタのデータを収集する。また、データ収集制御部109は、このコンフィギュレーションライトによって指示されたアドレスが「00100000h〜001FFFFFh」であればPCIバストレーサ106からデータを収集し、「00200000h〜002FFFFFh」であれば内部バストレーサ110からデータを収集し、「00300000h〜012FFFFFh」であればローカルメモリ113からデータを収集し、「FFFFFE00h〜FFFFFFFFh」であればMPU114からデータを収集する。これらの収集データはレジスタ番号「10h」のレジスタに格納される。
【0033】
2回目のコンフィギュレーションアクセスでは、レジスタ番号「10h」に対してコンフィギュレーションリードを実行する。このリードでは、データ収集制御部109が1回目のコンフィギュレーションライトにより収集したデータをConfigアクセス制御部104へリプライする。Configアクセス制御部104は、PCIバスインターフェース制御部103を介してPCIバス101へ収集データを出力する。
【0034】
一方、PCIバス101から受け取ったトランザクションが通常のトランザクション、例えばメモリリードであれば、PCIバスインターフェース制御部103はノーマルアクセス制御部105へ制御を移し、ノーマルアクセス制御部105がそのメモリリードトランザクションで受け取ったアドレスと、PCIカード102として設定されているベースアドレスにより、PCIカード102内のどの領域に対するアクセスかを判定する。PCIカード102内のアドレスマッピングは図4に示されている通りである。例えば、上記メモリリードが内部レジスタ領域に対するアクセスであれば、ノーマルアクセス制御部105は内部レジスタ108にアクセスし、ローカルメモリ領域に対するアクセスであれば、ノーマルアクセス制御部105は内部バスインターフェース制御部111に指示を出して、内部バス112を介してローカルメモリ113にアクセスする。
【0035】
なお、図4に示されているアドレスマッピングは、実際的にはPCIカード102内がアドレスマッピングされていない場合であっても、図4の通りに仮想的にアドレスマッピングして、その仮想的なアドレスマッピングに従って動作することも可能である。
【0036】
次に、上述のPCIカードを備えるPCIバスシステムについて説明する。図5は、図1に示したPCIカードを備えるPCIバスシステムの一構成例を示すブロック図である。このPCIバスシステムは、ローカルバス3にCPU1、メモリ2、PCIホスト(ブリッジ)4がそれぞれ接続されており、PCIホスト(ブリッジ)4にはPCIバス101を介してPCIカード102が接続されている。ここで、PCIカード102は複数設けられてもよい。
【0037】
CPU1は、システム全体の動作を制御するものであって、その制御はメモリ2に予め記憶された種々のプログラムに従って行われる。メモリ2には、プログラムの1つとして、PCIカード102を制御するためのプログラム、すなわちデバイスドライバが用意されており、このデバイスドライバによってPCIカード102の本来の動作と後述するような障害時のデータ収集動作が制御される。
【0038】
図6は、図5のPCIバスシステムにおける、PCIカード102の障害発生時のデータ収集動作の一例を示すフローチャートである。以下、図6を参照して障害発生時のデータ収集動作を説明する。
【0039】
まず、PCIカード102内で障害を検出すると(ステップS10)、PCIカード102はPCIバス101へ割り込みを発生する方法などにより、障害が発生したことをデバイスドライバへ通知する(ステップS11)。デバイスドライバは、障害の発生したPCIカード102から障害発生の通知を受けると(ステップS12)、その障害の発生したPCIカード102に対して障害情報を収集するためにPCIカード102内のデータ収集を指示する(ステップS13)とともに、その指示に際して、まずデータ収集を行うアドレスをコンフィギュレーションライトにより通知する(ステップS14)。障害の発生したPCIカード102側では、データ収集制御部109がその指示されたアドレスのデータを収集する(ステップS15)。次いで、デバイスドライバは、コンフィギュレーションリードを実行する(ステップS16)。障害の発生したPCIカード102側では、そのコンフィギュレーションリードを受けて、データ収集制御部109により収集されたデータがPCIバスインタフェース制御部103を介してPCIバス101上に送出される(ステップS17)。デバイスドライバは、そのPCIバス101上に送出されたデータを障害情報として例えばメモリ2内に格納する(ステップS18)。
【0040】
更にデータ収集を行う場合は、デバイスドライバが再度コンフィギュレーションライトによりデータ収集を行うアドレスを通知し、上述のステップS14〜S18の処理が繰り返される。必要な全てのデータが収集されると、データ収集動作を完了する(ステップS19)。
【0041】
以上説明したとおり、本形態のPCIデバイスにおいては、PCIバスインターフェース制御部103を通して、PCIバス101からPCIカード102に対するデータ収集を指示するコンフィギュレーションアクセスをConfigアクセス制御部104が受け取ると、その指示に従ってPCIバストレーサ106やローカルメモリ113などに格納されているデータの収集を行い、収集されたデータをPCIバス101へ出力する。この動作により、PCIカード102内のMPU114がハングアップして停止しているような障害が発生している場合であっても、最も確実で安全なPCIバストランザクションであるコンフィギュレーションアクセスによりPCIカード102内のデータを収集することが可能になる。
【0042】
また、PCIバス101におけるコンフィギュレーションアクセスは、PCIデバイスに何も設定されていない状態であっても、PCIバス仕様で定義されるIDESL信号により対象のPCIデバイスを指定してアクセスするため、PCIバス上のPCIカード102の障害のみならず、OSやドライバなどのソフトウェアの不具合によりPCIバス動作に関する情報が正常に設定されていない状態にあったとしても、同様にPCIカード102内のデータを収集することが可能となる。
【0043】
上記のコンフィギュレーションアクセスの使用では、OSが動作不可能になることはない。これは、元々コンフィギュレーションアクセスはPCIバス初期化時に、PCIデバイスが接続されているかどうかを確認するリソースチェックの手段として使用されており、PCIデバイスが接続されているかどうか不明なリソースに対してコンフィギュレーションアクセスが実行されることを前提としているため、コンフィギュレーションアクセスに対してPCIデバイスが応答せず、PCIホストが強制的にコンフィギュレーションアクセスをマスタアボートするような場合にも、致命的なエラーとはならないためである。従って、本形態では、PCIバス関連の情報が設定されていない場合でも、PCIデバイス内のデータをそのまま収集することができる。また、万が一、PCIバスインターフェース制御部103の故障によりPCIトランザクションに対して応答できないような場合があったとしても、システムの停止に至る重大な問題を引き起こすことがなく、PCIデバイスから確実にデータを収集することが可能である。
【0044】
(他の実施形態1)
上述の実施形態では、データ収集制御部109において使用されるPCIコンフィギュレーション空間のデバイス固有領域はアドレス「40h」のレジスタのみである。そのため、32ビット(つまり4バイト)のデータを収集する毎にアドレスの設定(デバイスドライバによるデータ収集を行うアドレスの通知)が必要とされる。つまり、4バイトのデータを収集するために2回のコンフィギュレーションアクセスが必要とされる。
【0045】
図7は、データ収集制御部109において使用されるPCIコンフィギュレーション空間のデバイス固有領域のレジスタ構造の一例を示す模式図である。この例では、デバイス固有領域のアドレス「43h〜40h」がデータ収集行うアドレスの先頭を設定するアドレス設定レジスタとされ、このアドレス設定レジスタで設定されたアドレスから64バイト分のデータが収集され、アドレス「44h〜83h」までのデータ収集レジスタ群にその収集されたデータが格納される。アドレス「44h〜83h」までの16個のレジスタを順々にコンフィギュレーションリードすることにより、まとめて64バイトのデータ収集が可能となる。
【0046】
前述の図1に示した例においては、64バイトのデータ収集のためには32回のコンフィギュレーションアクセスが必要であるが、図7に示したレジスタ構造にすることで、約半分の17回のコンフィギュレーションアクセスで64バイトのデータ収集が可能となる。
【0047】
なお、図7の例では、まとめて収集されるデータ長は64バイトであるが、データ長は4バイトから192バイトまでのいずれのサイズでも可能である。ただし、データ長を192バイトとする場合は、前述の実施形態と同様に、アドレス設定レジスタにも収集されたデータを格納する必要がある。
【0048】
(他の実施形態2)
上述の図7の例では、収集されたデータを格納するデータ収集レジスタ群のサイズを予め決められたサイズに固定する必要がある。その場合、本当に必要な部分のみのデータ収集を行うことはできない。本形態では、必要に応じたサイズのデータを収集するために以下のようなデバイス固有領域のレジスタ構造を採用する。
【0049】
図8は、データ収集制御部109において使用されるPCIコンフィギュレーション空間のデバイス固有領域のレジスタ構造の一例を示す模式図である。この例では、デバイス固有領域のアドレス「43h〜40h」がデータ収集行うアドレスの先頭を設定するアドレス設定レジスタとされるとともに、アドレス「47h〜44h」が収集されるデータの大きさを設定する収集データ長設定レジスタとされ、アドレス設定レジスタに設定されたアドレスから収集データ長設定レジスタに設定されたサイズのデータが収集され、アドレス「48h〜XXh」までのデータ収集レジスタ群にその収集されたデータが格納される。このように構成することにより、必要に応じたサイズのデータを収集することが可能となる。
【0050】
(他の実施形態3)
上述の図8の例では、収集データ長設定レジスタを設けることにより収集されるデータの大きさを指示しているが、図3における機能番号を使用することによってもデータの大きさを指示することができる。
【0051】
図9は、データ収集制御部109内のレジスタ構造の一例を示す模式図である。この例では、PCIコンフィギュレーション空間のデバイス固有領域としてのレジスタに加えて機能番号保持レジスタを備える。デバイス固有領域のアドレス「43h〜40h」がデータ収集行うアドレスの先頭を設定するアドレス設定レジスタとされ、このアドレス設定レジスタに設定された先頭アドレスから機能番号保持レジスタに格納されたデータによって指定されたサイズのデータが収集され、アドレス「44h〜XXh」までのデータ収集レジスタ群にその収集されたデータが格納される。
【0052】
本形態の場合は、まず、データ収集を行うためのアドレスをアドレス設定レジスタに設定するためのコンフィギュレーションライトが実行されるが、この時のアドレスフェーズの機能番号が機能番号保持レジスタに格納される。データフェーズでライトされるデータはアドレス設定レジスタに格納される。
【0053】
機能番号は3ビットであり、従って、機能番号保持レジスタには3ビットのデータが格納される。つまり、3ビットのデータで8パターンのデータ長を指示することが可能である。例えば、4,8,16,32,64,96,128,192バイトのデータ長を設定することができる。これにより、機能番号を使用して自由に収集データ長を設定し、必要に応じたサイズのデータを収集することが可能になる。
【0054】
【発明の効果】
以上説明したように、本発明によれば、PCIデバイスがどんな状態であっても、システムエラーを生じることなく、PCIデバイス内のデータを確実に収集することができるという効果がある。
【図面の簡単な説明】
【図1】本発明のPCIデバイスの一実施形態であるPCIカードの概略構成を示すブロック図である。
【図2】本発明に適用される、PCIバス仕様におけるコンフィギュレーション空間のアドレスマップの一例を示す模式図である。
【図3】本発明に適用される、PCIバス仕様のコンフィギュレーションアクセスにおけるAD(アドレス・データ)線のアドレスフェーズの定義を示す模式図である。
【図4】図1に示すPCIカード内でマッピングされているアドレス空間の一例を示す模式図である。
【図5】図1に示すPCIカードを備えるPCIバスシステムの一構成例を示すブロック図である。
【図6】図5に示すPCIバスシステムにおけるデータ収集動作の一例を示すフローチャート図である。
【図7】図1に示すデータ収集制御部において使用されるPCIコンフィギュレーション空間のデバイス固有領域のレジスタ構造の一例を示す模式図である。
【図8】図1に示すデータ収集制御部において使用されるPCIコンフィギュレーション空間のデバイス固有領域のレジスタ構造の一例を示す模式図である。
【図9】図1に示すデータ収集制御部109内のレジスタ構造の一例を示す模式図である。
【図10】特開平10−21152号公報に記載されたLANPシステムの概略構成を示すブロック図である。
【図11】図10に示すPCI拡張カードの一例を示すブロック図である。
【符号の説明】
1、200 CPU
2 メモリ
3 ローカルバス
4 PCIホスト
101、211 PCIバス
102 PCIカード
103 PCIバスインターフェース制御部
104 Configアクセス制御部
105 ノーマルアクセス制御部
106 PCIバストレーサ
107 Configレジスタ
108 内部レジスタ
109 データ収集制御部
110 内部バストレーサ
111 内部バスインターフェース制御部
112 内部バス
113 ローカルメモリ
114、301 MPU
201 MEM
202 PCL
203 NIC
204 OLA
210 システムバス
212 IOインタフェース
220 LANP
221 ホストコンピュータ
222 LAN回線
300 PBC
302 LM
310 CFG
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a PCI device connected to a PCI (Peripheral Component Interconnect) bus and a PCI system including the PCI device. Further, the present invention relates to a method for collecting data stored in the PCI device.
[0002]
[Prior art]
The PCI bus is one of computer bus architectures, and allows connection (addition) of various PCI devices such as a modem card and a video card. As an example of a PCI bus system having such a PCI bus, Japanese Patent Application Laid-Open No. H10-21152 discloses a LANP (LAN Processor) system that accommodates a large-capacity LAN line and exclusively performs data communication. I have. FIG. 10 is a block diagram showing a schematic configuration of the system.
[0003]
Referring to FIG. 10, in the LANP, a central processing unit (CPU) 200 and a main storage device (MEM) 201 are connected via a system bus 210, and a PCI bus control LSI (PCL) 202 is connected to the system bus 210. , A LAN line connection adapter (NIC) 203 and a host connection device (OLA) 204 are connected to a PCL 202 via a PCI bus 211.
[0004]
The LANP can be connected to the LAN line 222 via the NIC 203. In the LANP, the OLA 204 is connected to an external host computer 221 via the IO interface 212, and can transmit and receive data to and from the host computer 221. Here, the NIC 203 and the OLA 204 are PCI expansion cards (PCI devices) that control a communication protocol.
[0005]
FIG. 11 shows an example of a PCI expansion card. This PCI expansion card is the OLA 204 shown in FIG. 10 and has a microprocessor (MPU) 301 for controlling data transmission with the host computer 221 and an MPU 301 for controlling data transfer via the PCI bus 211. And a local memory (LM) 302 composed of a DRAM used for temporary storage of data and the like. The PBC 300 and the MPU 301 are each connected to the LM 302 via an internal bus, and each can access the LM 302 to read / write data. Further, the PBC 300 can transmit and receive data to and from the CPU 200 and the MEM 201 shown in FIG. 10 via the PCI bus 211.
[0006]
The PBC 300 includes a configuration space (CFG) 310 internally configured by an SRAM. The configuration space is a recording area for storing configuration information, and the configuration information is set when the system is set. The configuration information includes a defined header area and a device-dependent area, and generally has a PCI bus specification and has a total of 256 bytes. The defined header area is 64 bytes, and its layout is defined as a PCI bus standard. The device-dependent area has 192 bytes, and arbitrary information can usually be set for each PCI device. When the PBC 300 receives a PCI bus transaction via the PCI bus 211, the PBC 300 accesses the LM 302 to read / write data or transfer data via the PCI bus 211 according to the content of the received transaction. Or go. Control bits required for data transmission and information for causing the CPU 200 to recognize the PCI expansion card are set as configuration information.
[0007]
[Problems to be solved by the invention]
In a system in which a PCI expansion card (PCI device) is connected to a PCI bus as described above, when a failure occurs in a PCI device, data in the PCI device is stored in, for example, the LM 302 in FIG. For example, data is collected and the cause of the failure is analyzed. Also, at the time of debugging during development of the PCI device, data in the PCI device is collected.
[0008]
However, when a failure is detected in the PCI device or during debugging, the PCI bus-related setting information in the PCI device may be lost or not set correctly. In such a case, , The PCI device cannot receive a normal PCI bus transaction, and as a result, it becomes impossible to collect data in the PCI device.
[0009]
Further, when an IO transaction for information collection is issued from the operating system (OS) to the PCI device while the PCI device is in a state where the PCI device cannot accept the PCI transaction, the PCI device may generate a result of the IO transaction from the OS. The operation for the transaction issued on the PCI bus cannot be guaranteed. In such a case, an event occurs such that the PCI host (the PCL 202 in FIG. 10) detects a fatal error or the transaction on the PCI bus is lost. As a result, there has been a problem that the OS cannot continue to operate, and the entire system stops due to the data collection operation in the PCI device (the occurrence of a system error).
[0010]
An object of the present invention is to provide a PCI device and a data collection method that can solve the above-mentioned problem and reliably collect data.
[0011]
A further object of the present invention is to provide a PCI bus system using such a PCI device.
[0012]
[Means for Solving the Problems]
In order to achieve the above object, a PCI device of the present invention is a PCI device connected to a PCI bus and having a configuration space including a device-specific area in which registers can be arbitrarily set,
A register defined as the device-specific area is mounted, and upon receiving a data collection instruction, data collection control means for collecting data specified according to the contents of the register,
Upon receiving a configuration access to the device-specific area via the PCI bus, the device sends the data collection instruction to the data collection control unit, and the data collection control unit collects the data in response to the data collection instruction. Configuration access control means for transmitting data onto the PCI bus.
[0013]
A PCI bus system according to the present invention includes any one of the PCI devices described above and a PCI bus to which the PCI device is connected.
[0014]
The data collection method according to the present invention is a data collection method performed in a PCI bus system in which a PCI device having a configuration space including a device-specific area in which registers can be arbitrarily set is connected to a PCI bus.
Performing a configuration access to instruct the PCI device to collect data using the device-specific area;
Collecting the specified data in accordance with the configuration access, and transmitting the collected data to the PCI bus.
[0015]
In the present invention as described above, data stored in a PCI device is collected using configuration access on a PCI bus. In the configuration access on the PCI bus, even when nothing is set in the PCI device, the target PCI device can be specified and accessed by the IDESL signal defined in the PCI bus specifications. In addition, data in a PCI device can be collected not only when a failure occurs in a PCI device on the PCI bus but also when information relating to the operation of the PCI bus is not set normally due to a defect in software such as an OS or a device driver. is there. Therefore, according to the present invention, when a failure is detected in a PCI device or during debugging, even if the PCI bus-related setting information in the PCI device is lost or incorrectly set, Data in a PCI device can be collected.
[0016]
Conventionally, when collecting information at the time of failure, a PCI host detects a fatal error or a transaction on a PCI bus is lost, so that the OS cannot continue to operate. Although there is a problem of stopping (occurrence of a system error), in the present invention, as described above, the operation of collecting data in the PCI device at the time of a failure can be reliably performed. No error occurs.
[0017]
BEST MODE FOR CARRYING OUT THE INVENTION
Next, an embodiment of the present invention will be described with reference to the drawings.
[0018]
The PCI device of the present invention is connected to a well-known PCI bus, and is attached to, for example, a motherboard of a computer as an expansion board (card). FIG. 1 shows a schematic configuration of a PCI card which is an embodiment of the PCI device of the present invention.
[0019]
The PCI card 102 according to the present embodiment is connected to a PCI bus 101, and includes a PCI bus interface control unit 103, a Config access control unit 104, a normal access control unit 105, a PCI bus tracer 106, and a Config. It comprises a register 107, an internal register 108, a data collection control unit 109, an internal bus tracer 110, an internal bus interface control unit 111, an internal bus 112, a local memory 113, and a microprocessor (MPU: Micro Processing Unit) 114.
[0020]
The PCI card 102 has a special 256-byte register called a configuration space. FIG. 2 shows an example of an address map of the configuration space in the PCI bus specification. The first 64 bytes are a header area (defined header area), which must be provided for each PCI device. The remaining 192 bytes are a device-specific area (device-dependent area), and its use is free for each PCI device. The register defined as the header area is implemented in the Config register 107, and the register defined as the device-specific area is implemented in the data collection control unit 109. The configuration access for instructing data collection to the data collection control unit 109, which will be described later, is executed using the device unique area of the configuration space shown in FIG.
[0021]
FIG. 3 shows the definition of the address phase of an AD (address / data) line in the configuration access of the PCI bus specification. Bits 0-1 define "type", bits 7-2 define "register number", bits 10-8 define "function number", and bits 31-11 define "reservation". Which address in the configuration space is accessed is determined by the register number defined by bits 7-2. Since the 6-bit register number is specified in units of double words (32 bits), a value of, for example, 10h to 3Fh ("** h" indicates hexadecimal notation) indicates a device-specific area. ing.
[0022]
The PCI bus interface control unit 103 is connected to the PCI bus 101, and when receiving a configuration access via the PCI bus 101, executes a process according to the configuration access to the Config access control unit 104. When a PCI bus transaction other than the configuration access, such as a memory read or a memory write, is accepted, the normal access control unit 105 is instructed to execute a process corresponding to the PCI bus transaction.
[0023]
The Config access control unit 104 executes access to the Config register 107 according to the content of the received configuration access, and performs data collection to the data collection control unit 109 in accordance with an instruction from the PCI bus interface control unit 103. Or give instructions. For example, if the register number defined by bits 7 to 2 of the configuration cycle shown in FIG. 3 is “00h” to “0Fh”, the Config access control unit 104 may set the header of the configuration space shown in FIG. Since the area is an area, access to the Config register 107 is performed. If the register number is “10h” to “3Fh”, the data collection control unit 109 is an area specific to the device in the configuration space shown in FIG. To collect data.
[0024]
The normal access control unit 105 accesses the internal register 108 or connects to the internal bus 112 via the internal bus interface control unit 111 in accordance with the content of the accepted PCI bus transaction in accordance with the instruction from the PCI bus interface control unit 103. Then, the access to the local memory 113 and the MPU 114 is finally executed.
[0025]
The PCI bus tracer 106 stores, through the PCI bus interface control unit 103, trace data of a transaction executed on the PCI bus 101. Similarly, the internal bus tracer 110 stores trace data of transactions executed on the internal bus 114.
[0026]
When receiving the data collection instruction from the Config access control unit 104 by the configuration access to the device unique area, the data collection control unit 109 performs the collection of the specified data according to the instruction. For example, in the case of a data collection instruction relating to the PCI bus tracer 106, the data collection control unit 109 reads data from the PCI bus tracer 106 and passes the read data to the Config access control unit 104. If the instruction is a data collection instruction related to the local memory 113, the data collection control unit 109 issues an instruction to the local memory 113 via the internal bus 112 to read the dump data in the local memory 113, and reads the dump data to the Config access control unit 104. Hand over the dump data. If the instruction is a data collection instruction related to the MPU 114, the data collection control unit 109 issues an instruction to the MPU 114 via the internal bus 112 to read the dump data of the MPU 114, and passes the read dump data to the Config access control unit 104. If the instruction is a data collection instruction related to the internal bus tracer 110, the data collection control unit 109 reads the data from the internal bus tracer 110 and passes the read data to the Config access control unit 104. If the instruction is a data collection instruction for the internal register 108, the data collection control unit 109 reads the data from the internal register 108 and passes the read data to the Config access control unit 104. The data collected from each is output to the PCI bus 101 via the PCI bus interface control unit 103.
[0027]
Next, the operation of the PCI card 102 of the present embodiment will be specifically described. FIG. 4 is a schematic diagram showing an example of an address space mapped in the PCI card 102 of FIG. In this example, addresses “00000000h to 000003FFh” are internal register areas, addresses “0000400h to 000FFFFFh” are unused, addresses “00100000h to 001FFFFFh” are PCI bus tracer areas, and addresses “00200000h to 002FFFFFh” are internal bus tracer areas. “00300000h to 012FFFFFh” is a local memory area, “0130000000h to FFFFFDFFh” is unused, and “FFFFFE00h to FFFFFFFFh” is an MPU area.
[0028]
When the configuration cycle shown in FIG. 3 is executed in the address phase on the PCI bus 101, the PCI card 102 is connected to the PCI host, which is the bus master, by an IDSEL (initializing device) connected one-to-one instead of a bus connection. When the (select) signal is asserted (active state), it recognizes that the configuration cycle being executed is a configuration cycle targeting the PCI card 102 itself. In other words, since the target PCI device is specified by the IDSEL signal in the configuration cycle, it is possible to access the PCI device side, in this case, the PCI card 102 side without any setting. In a normal memory read / write transaction or the like, access is impossible only after the setting of an address space and the like on the PCI device side is completed.
[0029]
When a configuration access to the PCI card 102 is received from the PCI bus 101, the PCI bus interface control unit 103 notifies the Config access control unit 104 of the function number and the register number in FIG. The Config access control unit 104 determines an access destination based on the function number and the register number received from the PCI bus interface control unit 103. Here, assuming that the PCI card 102 is a single function device, the function number is fixed to 0. In this case, the access destination is determined by the register number, and the 6-bit register number indicates the configuration register in units of double words (32 bits), which indicates which register in the 256-byte area shown in FIG. Show.
[0030]
Since the register number is assigned in units of double words, if the register number is multiplied by four, it becomes the register address in FIG. For example, if the register number indicates “02h”, the address is “08h”, which is a header area within 64 bytes from the beginning, so the Config access control unit accesses the Config register 107. The configuration register in the Config register 107 is determined by the PCI bus specification, and the register at the address “08h” stores the class code and the revision number. If the register number is “10h” or more, it indicates a device unique area, and the Config access control unit 104 issues a data collection instruction to the data collection control unit 109. That is, the header area in FIG. 2 is implemented in the Config register 107, and the device unique area is implemented in the data collection control unit 109.
[0031]
In order for the data collection control unit 109 to perform data collection, it is necessary to execute two configuration accesses. Here, the device unique area in FIG. 2 uses only the 32-bit register from the address “40h”. That is, the register number in the configuration access uses only “10h”.
[0032]
In the first configuration access, a configuration write is executed for the register number “10h”. The data to be written is an address at which data is collected, and the address mapping in the PCI card 102 is as shown in FIG. For example, if the address is “00000000h”, the data collection control unit 109 collects the data of the first register of the internal register 108. In addition, the data collection control unit 109 collects data from the PCI bus tracer 106 when the address specified by the configuration write is “00100000h to 001FFFFFh”, and collects data from the internal bus tracer 110 when the address is “00200000h to 002FFFFFh”. Data is collected. If “00300000h to 012FFFFFh”, data is collected from the local memory 113, and if “FFFFFE00h to FFFFFFFFh”, data is collected from the MPU 114. These collected data are stored in the register with the register number “10h”.
[0033]
In the second configuration access, a configuration read is executed for the register number “10h”. In this read, the data collection control unit 109 replies the data collected by the first configuration write to the Config access control unit 104. The Config access control unit 104 outputs the collected data to the PCI bus 101 via the PCI bus interface control unit 103.
[0034]
On the other hand, if the transaction received from the PCI bus 101 is a normal transaction, for example, a memory read, the PCI bus interface control unit 103 transfers control to the normal access control unit 105, and the normal access control unit 105 receives the transaction in the memory read transaction. Based on the address and the base address set as the PCI card 102, it is determined which area in the PCI card 102 is to be accessed. The address mapping in the PCI card 102 is as shown in FIG. For example, if the memory read is an access to the internal register area, the normal access control unit 105 accesses the internal register 108. If the memory read is an access to the local memory area, the normal access control unit 105 sends an instruction to the internal bus interface control unit 111. An instruction is issued to access the local memory 113 via the internal bus 112.
[0035]
In the address mapping shown in FIG. 4, even if the inside of the PCI card 102 is not actually mapped, the address mapping is virtually performed as shown in FIG. It is also possible to operate according to the address mapping.
[0036]
Next, a PCI bus system including the above-described PCI card will be described. FIG. 5 is a block diagram illustrating a configuration example of a PCI bus system including the PCI card illustrated in FIG. In this PCI bus system, a CPU 1, a memory 2, and a PCI host (bridge) 4 are connected to a local bus 3, and a PCI card 102 is connected to the PCI host (bridge) 4 via a PCI bus 101. . Here, a plurality of PCI cards 102 may be provided.
[0037]
The CPU 1 controls the operation of the entire system, and the control is performed in accordance with various programs stored in the memory 2 in advance. The memory 2 is provided with a program for controlling the PCI card 102, ie, a device driver, as one of the programs. The device driver performs the original operation of the PCI card 102 and the data at the time of failure as described later. The collection operation is controlled.
[0038]
FIG. 6 is a flowchart illustrating an example of a data collection operation when a failure occurs in the PCI card 102 in the PCI bus system in FIG. Hereinafter, the data collection operation when a failure occurs will be described with reference to FIG.
[0039]
First, when a failure is detected in the PCI card 102 (step S10), the PCI card 102 notifies the device driver of the occurrence of the failure by a method of generating an interrupt to the PCI bus 101 (step S11). Upon receiving the notification of the occurrence of the failure from the failed PCI card 102 (step S12), the device driver collects data in the PCI card 102 in order to collect failure information for the failed PCI card 102. At the same time as instructing (step S13), at the time of the instructing, an address for data collection is notified by a configuration write (step S14). On the side of the PCI card 102 where the failure has occurred, the data collection control unit 109 collects the data of the specified address (step S15). Next, the device driver executes a configuration read (Step S16). On the PCI card 102 side in which the failure has occurred, the data collected by the data collection control unit 109 is sent out onto the PCI bus 101 via the PCI bus interface control unit 103 in response to the configuration read (step S17). . The device driver stores the data transmitted on the PCI bus 101 as failure information, for example, in the memory 2 (step S18).
[0040]
When performing further data collection, the device driver notifies the address at which data collection is to be performed again by the configuration write, and the above-described processing in steps S14 to S18 is repeated. When all necessary data has been collected, the data collection operation is completed (step S19).
[0041]
As described above, in the PCI device of the present embodiment, when the Config access control unit 104 receives a configuration access for instructing data collection from the PCI bus 101 to the PCI card 102 via the PCI bus interface control unit 103, the configuration access control unit 104 follows the instruction. The data stored in the PCI bus tracer 106 and the local memory 113 is collected, and the collected data is output to the PCI bus 101. With this operation, even if a failure such as the MPU 114 in the PCI card 102 being hung up and stopped has occurred, the PCI card 102 is accessed by the configuration access, which is the most reliable and safe PCI bus transaction. It is possible to collect data within.
[0042]
The configuration access on the PCI bus 101 is performed by specifying the target PCI device by the IDESL signal defined in the PCI bus specification even when the PCI device is not set. Even if the information on the PCI bus operation is not set properly due to not only the failure of the above PCI card 102 but also the malfunction of the software such as the OS and the driver, the data in the PCI card 102 is similarly collected. It becomes possible.
[0043]
Using the above configuration access does not render the OS inoperable. This is because the configuration access is originally used as a resource check means for confirming whether a PCI device is connected when the PCI bus is initialized, and the configuration access is performed for a resource for which it is unknown whether the PCI device is connected. If the PCI device does not respond to the configuration access and the PCI host forcibly aborts the configuration access, a fatal error will occur. Because it must not be. Therefore, in this embodiment, even when the information related to the PCI bus is not set, the data in the PCI device can be collected as it is. Also, even if the PCI bus interface control unit 103 fails to respond to a PCI transaction due to a failure, the data can be reliably transmitted from the PCI device without causing a serious problem to stop the system. It is possible to collect.
[0044]
(Other Embodiment 1)
In the above embodiment, the device unique area of the PCI configuration space used in the data collection control unit 109 is only the register at the address “40h”. Therefore, every time data of 32 bits (that is, 4 bytes) is collected, address setting (notification of an address at which data collection is performed by a device driver) is required. That is, two configuration accesses are required to collect 4 bytes of data.
[0045]
FIG. 7 is a schematic diagram illustrating an example of a register structure of a device unique area in a PCI configuration space used in the data acquisition control unit 109. In this example, the address "43h to 40h" of the device-specific area is an address setting register for setting the head of the address for data collection, and 64 bytes of data are collected from the address set by this address setting register. The collected data is stored in the data collection register group of “44h to 83h”. By sequentially reading the configuration of the 16 registers from the address “44h to 83h”, data of 64 bytes can be collectively collected.
[0046]
In the example shown in FIG. 1 described above, 32 configuration accesses are required to collect 64 bytes of data. However, the register structure shown in FIG. 64 bytes of data can be collected by configuration access.
[0047]
In the example of FIG. 7, the data length collectively collected is 64 bytes, but the data length can be any size from 4 bytes to 192 bytes. However, when the data length is 192 bytes, it is necessary to store the collected data in the address setting register as in the above-described embodiment.
[0048]
(Other Embodiment 2)
In the example of FIG. 7 described above, it is necessary to fix the size of the data collection register group storing the collected data to a predetermined size. In that case, it is not possible to collect only the necessary data. In the present embodiment, the following register structure of the device-specific area is adopted in order to collect data of a required size.
[0049]
FIG. 8 is a schematic diagram showing an example of a register structure of a device unique area of a PCI configuration space used in the data collection control unit 109. In this example, the address "43h to 40h" of the device unique area is an address setting register for setting the head of the address for data collection, and the address "47h to 44h" is a collection for setting the size of data to be collected. The data length setting register is used to collect data of the size set in the collected data length setting register from the address set in the address setting register and store the collected data in a data collection register group from address "48h to XXh". Is stored. With this configuration, it is possible to collect data of a size as required.
[0050]
(Other Embodiment 3)
In the example of FIG. 8 described above, the size of the data to be collected is indicated by providing the collection data length setting register. However, the size of the data is also indicated by using the function number in FIG. Can be.
[0051]
FIG. 9 is a schematic diagram illustrating an example of a register structure in the data collection control unit 109. In this example, a function number holding register is provided in addition to a register as a device unique area in the PCI configuration space. The address "43h to 40h" of the device-specific area is an address setting register for setting the head of the address at which data is collected, and is specified by the data stored in the function number holding register from the head address set in the address setting register. Data of the size is collected, and the collected data is stored in a data collection register group of addresses “44h to XXh”.
[0052]
In the case of this embodiment, first, a configuration write for setting an address for performing data collection in the address setting register is executed, and the function number of the address phase at this time is stored in the function number holding register. . Data written in the data phase is stored in the address setting register.
[0053]
The function number is 3 bits, and thus the function number holding register stores 3-bit data. That is, it is possible to indicate the data length of eight patterns with 3-bit data. For example, data lengths of 4, 8, 16, 32, 64, 96, 128, and 192 bytes can be set. As a result, it is possible to freely set the collection data length using the function number, and to collect data of a required size.
[0054]
【The invention's effect】
As described above, according to the present invention, data in a PCI device can be reliably collected without causing a system error regardless of the state of the PCI device.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a schematic configuration of a PCI card which is one embodiment of a PCI device of the present invention.
FIG. 2 is a schematic diagram showing an example of an address map of a configuration space in a PCI bus specification applied to the present invention.
FIG. 3 is a schematic diagram showing a definition of an address phase of an AD (address / data) line in a configuration access conforming to a PCI bus specification applied to the present invention.
FIG. 4 is a schematic diagram showing an example of an address space mapped in the PCI card shown in FIG. 1;
5 is a block diagram illustrating a configuration example of a PCI bus system including the PCI card illustrated in FIG.
6 is a flowchart showing an example of a data collection operation in the PCI bus system shown in FIG.
FIG. 7 is a schematic diagram showing an example of a register structure of a device unique area of a PCI configuration space used in the data acquisition control unit shown in FIG.
FIG. 8 is a schematic diagram showing an example of a register structure of a device unique area in a PCI configuration space used in the data acquisition control unit shown in FIG.
FIG. 9 is a schematic diagram showing an example of a register structure in the data collection control unit 109 shown in FIG.
FIG. 10 is a block diagram showing a schematic configuration of a LANP system described in Japanese Patent Application Laid-Open No. 10-21152.
FIG. 11 is a block diagram showing an example of a PCI expansion card shown in FIG.
[Explanation of symbols]
1,200 CPU
2 memory
3 Local bus
4 PCI host
101, 211 PCI bus
102 PCI card
103 PCI bus interface control unit
104 Config access control unit
105 Normal access control unit
106 PCI Bus Tracer
107 Config register
108 Internal register
109 Data collection control unit
110 Internal bus tracer
111 Internal bus interface control unit
112 internal bus
113 Local memory
114,301 MPU
201 MEM
202 PCL
203 NIC
204 OLA
210 System bus
212 IO interface
220 LANP
221 Host computer
222 LAN line
300 PBC
302 LM
310 CFG

Claims (13)

PCIバスに接続される、任意にレジスタの設定が可能なデバイス固有領域を含むコンフィグレーション空間を持つPCIデバイスであって、
前記デバイス固有領域として定義されるレジスタが実装され、データ収集指示を受けると、前記レジスタの内容に従って指示されたデータの収集を行うデータ収集制御手段と、
前記PCIバスを介して前記デバイス固有領域に対するコンフィグレーションアクセスを受けると、前記データ収集制御手段に対して前記データ収集指示を送出するとともに、該データ収集指示に応じて前記データ収集制御手段が収集したデータを前記PCIバス上に送出するコンフィグレーションアクセス制御手段とを有するPCIデバイス。
A PCI device connected to a PCI bus and having a configuration space including a device-specific area in which registers can be arbitrarily set,
A register defined as the device-specific area is mounted, and upon receiving a data collection instruction, data collection control means for collecting data specified according to the contents of the register,
Upon receiving a configuration access to the device-specific area via the PCI bus, the device sends the data collection instruction to the data collection control unit, and the data collection control unit collects the data in response to the data collection instruction. A configuration access control means for transmitting data onto the PCI bus.
コンフィグレーションアクセスはコンフィグレーションライトとコンフィグレーションリードの2つのアクセスからなり、
データ収集手段は、前記コンフィグレーションライトによって、デバイス固有領域の所定のアドレスからの所定のビット数のレジスタに対してデータ収集を行うべきアドレスが書き込まれ、該書き込まれたアドレスに従ってデータが収集され、該収集されたデータが前記所定のビット数のレジスタに格納され、さらに前記コンフィグレーションリードによって、前記所定のビット数のレジスタに格納されたデータがコンフィグレーションアクセス制御手段に送出されるように構成されていることを特徴とする請求項1に記載のPCIデバイス。
Configuration access consists of two accesses: configuration write and configuration read.
In the data collection means, the configuration write writes an address to perform data collection to a register of a predetermined number of bits from a predetermined address of the device-specific area, and collects data according to the written address. The collected data is stored in the register of the predetermined number of bits, and the data stored in the register of the predetermined number of bits is transmitted to the configuration access control means by the configuration read. The PCI device according to claim 1, wherein
コンフィグレーションアクセスはコンフィグレーションライトとコンフィグレーションリードの2つのアクセスからなり、
データ収集手段は、前記コンフィグレーションライトによって、デバイス固有領域の所定のアドレスのアドレス設定レジスタにデータ収集を行うべきアドレスの先頭アドレスが書き込まれ、該書き込まれた先頭アドレスから所定のバイト分のデータが収集され、該収集されたデータが前記デバイス固有領域の複数のアドレスにわたるレジスタ群に格納され、さらに前記コンフィグレーションリードによって、前記レジスタ群に格納されたデータが順次読み出されてコンフィグレーションアクセス制御手段に送出されるように構成されていることを特徴とする請求項1に記載のPCIデバイス。
Configuration access consists of two accesses: configuration write and configuration read.
The data collection means writes, by the configuration write, a head address of an address at which data collection is to be performed to an address setting register of a predetermined address in the device unique area, and data of a predetermined byte from the written head address is written. Collected, the collected data is stored in a register group extending over a plurality of addresses of the device-specific area, and the configuration read is performed by sequentially reading out the data stored in the register group by the configuration read. The PCI device according to claim 1, wherein the PCI device is configured to be transmitted to the PCI device.
データ収集手段は、デバイス固有領域の所定のアドレスに収集データのサイズを指定するためのサイズ指定用レジスタを有し、レジスタの設定アドレスに書き込まれた先頭アドレスから前記サイズ指定用レジスタで指定されたデータサイズ分のデータが収集されてレジスタ群に格納されるように構成されていることを特徴とする請求項3に記載のPCIデバイス。The data collection means has a size specification register for specifying the size of the collected data at a predetermined address of the device-specific area, and the size specified by the size specification register from the head address written in the set address of the register 4. The PCI device according to claim 3, wherein data of a data size is collected and stored in a register group. データ収集手段は、コンフィグレーション空間に対して行われる操作であるコンフィグレーションサイクルの所定のビットによって定義された機能番号が格納される機能番号保持レジスタを有し、レジスタの設定アドレスに書き込まれた先頭アドレスから前記機能番号保持レジスタに格納されたデータで指定されるデータサイズ分のデータが収集されてレジスタ群に格納されるように構成されていることを特徴とする請求項3に記載のPCIデバイス。The data collection means has a function number holding register in which a function number defined by a predetermined bit of a configuration cycle, which is an operation performed on the configuration space, is stored. 4. The PCI device according to claim 3, wherein data of a data size specified by data stored in the function number holding register is collected from an address and stored in a register group. . コンフィグレーション空間のヘッダ領域として定義されるレジスタを実装するコンフィグレーションレジスタをさらに有し、
コンフィグレーションアクセス制御手段は、PCIバスを介して前記ヘッダ領域に対するコンフィグレーションアクセスを受けると、前記コンフィグレーションレジスタに対してアクセスするように構成されていることを特徴とする請求項1に記載のPCIデバイス。
A configuration register that implements a register defined as a header area of the configuration space,
2. The PCI according to claim 1, wherein the configuration access control means is configured to access the configuration register when receiving a configuration access to the header area via a PCI bus. device.
PCIバスを介したデータ伝送を制御するPCIバスインターフェース制御手段と、
所定のノーマルアクセス動作を制御するノーマルアクセス制御手段とをさらに有し、
前記PCIバスインターフェース制御手段が、前記PCIバスを介してコンフィグレーションアクセスを受けた場合は、コンフィグレーションアクセス手段に対して前記コンフィグレーションアクセスの内容に応じた動作の実行を指示し、前記PCIバスを介して前記コンフィグレーションアクセス以外のPCIバストランザクションを受けた場合は、前記ノーマルアクセス制御手段に対してPCIバストランザクションの内容に応じたノーマルアクセス動作の実行を指示するように構成されていることを特徴とする請求項1に記載のPCIデバイス。
PCI bus interface control means for controlling data transmission via a PCI bus;
Normal access control means for controlling a predetermined normal access operation,
When the PCI bus interface control means receives a configuration access via the PCI bus, the PCI bus interface control means instructs the configuration access means to execute an operation according to the content of the configuration access, and sets the PCI bus to When a PCI bus transaction other than the configuration access is received via the CPU, the normal access control means is instructed to execute a normal access operation according to the content of the PCI bus transaction. The PCI device according to claim 1, wherein
請求項1乃至7のいずれか1項に記載のPCIデバイスと、前記PCIデバイスが接続されるPCIバスとを有するPCIバスシステム。A PCI bus system comprising: the PCI device according to claim 1; and a PCI bus to which the PCI device is connected. 任意にレジスタの設定が可能なデバイス固有領域を含むコンフィグレーション空間を持つPCIデバイスがPCIバスに接続されたPCIバスシステムにおいて行われるデータ収集方法であって、
前記デバイス固有領域を使用して、前記PCIデバイスに対してデータの収集を指示するコンフィグレーションアクセスを実行するステップと、
前記PCIデバイスが、前記コンフィグレーションアクセスに従って指定されたデータの収集を行い、該収集したデータを前記PCIバス上に送出するステップとを含むことを特徴とするデータ収集方法。
A data collection method performed in a PCI bus system in which a PCI device having a configuration space including a device-specific area in which registers can be arbitrarily set is connected to a PCI bus,
Performing a configuration access to instruct the PCI device to collect data using the device-specific area;
A step of the PCI device collecting specified data according to the configuration access, and transmitting the collected data to the PCI bus.
コンフィグレーションアクセスがコンフィグレーションライトとコンフィグレーションリードの2つのアクセスからなり、
前記コンフィグレーションライトによって、PCIデバイス内に実装されたデバイス固有領域の所定のアドレスからの所定のビット数のレジスタに対して、データ収集を行うべきアドレスを書き込むステップと、
前記PCIデバイスが、前記書き込まれたデータ収集を行うべきアドレスに従ってデータを収集し、該収集したデータを前記所定のビット数のレジスタに格納するステップと、
前記コンフィグレーションリードによって、前記所定のビット数のレジスタに格納されたデータを読み出すステップとを含むことを特徴とする請求項9に記載のデータ収集方法。
Configuration access consists of two accesses, configuration write and configuration read,
Writing, by the configuration write, an address at which data collection is to be performed to a register having a predetermined number of bits from a predetermined address in a device-specific area mounted in the PCI device;
The PCI device collecting data according to the address at which the written data is to be collected, and storing the collected data in the register having the predetermined number of bits;
10. The data collection method according to claim 9, further comprising: reading data stored in the register having the predetermined number of bits by the configuration read.
コンフィグレーションアクセスがコンフィグレーションライトとコンフィグレーションリードの2つのアクセスからなり、
前記コンフィグレーションライトによって、PCIデバイス内に実装されたデバイス固有領域の所定のアドレスのアドレス設定レジスタにデータ収集を行うべきアドレスの先頭アドレスを書き込むステップと、
前記PCIデバイスが、前記アドレス設定レジスタに書き込まれた先頭アドレスに従ってデータを収集し、該収集したデータを前記デバイス固有領域の複数のアドレスにわたるレジスタ群に格納するステップと、
前記コンフィグレーションリードによって、前記レジスタ群に格納されたデータを読み出すステップとを含むことを特徴とする請求項9に記載のデータ収集方法。
Configuration access consists of two accesses, configuration write and configuration read,
Writing, by the configuration write, a head address of an address at which data collection is to be performed to an address setting register of a predetermined address in a device unique area mounted in the PCI device;
The PCI device collecting data according to a head address written in the address setting register, and storing the collected data in a register group extending over a plurality of addresses in the device-specific area;
10. The data collection method according to claim 9, further comprising: reading out data stored in the register group by the configuration read.
デバイス固有領域の所定のアドレスのレジスタをサイズ指定用レジスタとし、該サイズ指定用レジスタに収集すべきデータのサイズを設定するステップをさらに含み、
PCIデバイスによるデータ収集のステップが、レジスタの設定アドレスに書き込まれた先頭アドレスから前記サイズ指定用レジスタで指定されたデータサイズ分のデータを収集し、該収集したデータをレジスタ群に格納するステップであることを特徴とする請求項11に記載のデータ収集方法。
Setting a register at a predetermined address of the device-specific area as a size designation register, and setting a size of data to be collected in the size designation register;
The step of collecting data by the PCI device is a step of collecting data of a data size specified by the size specifying register from a head address written in a setting address of the register, and storing the collected data in a register group. The data collection method according to claim 11, wherein:
コンフィグレーション空間に対して行われる操作であるコンフィグレーションサイクルの所定のビットによって定義された機能番号をPCIデバイス内に実装された機能番号保持レジスタに格納するステップをさらに含み、
PCIデバイスによるデータ収集のステップが、レジスタの設定アドレスに書き込まれた先頭アドレスから前記機能番号保持レジスタに格納されたデータで指定されるデータサイズ分のデータを収集し、該収集したデータを前記デバイス固有領域の複数のアドレスにわたるレジスタ群に格納するステップであることを特徴とする請求項11に記載のデータ収集方法。
Storing a function number defined by a predetermined bit of a configuration cycle, which is an operation performed on the configuration space, in a function number holding register implemented in the PCI device;
The step of collecting data by the PCI device collects data of a data size specified by the data stored in the function number holding register from a head address written in a setting address of the register, and transfers the collected data to the device. 12. The data collection method according to claim 11, wherein the data is stored in a register group covering a plurality of addresses of the unique area.
JP2001167800A 2001-06-04 2001-06-04 PCI device, PCI bus system including the same, and data collection method Expired - Fee Related JP3584977B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001167800A JP3584977B2 (en) 2001-06-04 2001-06-04 PCI device, PCI bus system including the same, and data collection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001167800A JP3584977B2 (en) 2001-06-04 2001-06-04 PCI device, PCI bus system including the same, and data collection method

Publications (2)

Publication Number Publication Date
JP2002358251A JP2002358251A (en) 2002-12-13
JP3584977B2 true JP3584977B2 (en) 2004-11-04

Family

ID=19010136

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001167800A Expired - Fee Related JP3584977B2 (en) 2001-06-04 2001-06-04 PCI device, PCI bus system including the same, and data collection method

Country Status (1)

Country Link
JP (1) JP3584977B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4945053B2 (en) * 2003-03-18 2012-06-06 ルネサスエレクトロニクス株式会社 Semiconductor device, bus interface device, and computer system
US8166207B2 (en) 2008-09-29 2012-04-24 Intel Corporation Querying a device for information
JP5380392B2 (en) * 2010-08-04 2014-01-08 ルネサスエレクトロニクス株式会社 Semiconductor device, bus interface device, and computer system
JP5324676B2 (en) * 2012-02-17 2013-10-23 ルネサスエレクトロニクス株式会社 Processor, bus interface device, and computer system

Also Published As

Publication number Publication date
JP2002358251A (en) 2002-12-13

Similar Documents

Publication Publication Date Title
US5729767A (en) System and method for accessing peripheral devices on a non-functional controller
US6263373B1 (en) Data processing system and method for remotely controlling execution of a processor utilizing a test access port
US5682512A (en) Use of deferred bus access for address translation in a shared memory clustered computer system
US6282643B1 (en) Computer system having flash memory BIOS which can be accessed remotely while protected mode operating system is running
KR100395393B1 (en) System, device, and method for communicating with and initializing a computer peripheral
US8566644B1 (en) System and method for debugging a target computer using SMBus
JP4491194B2 (en) Modular microcontroller that manages CPUs and devices without an operating system
US7131035B2 (en) Serial bus host controller diagnosis
US7840736B2 (en) Bus communication enumeration
US11609874B2 (en) System-on-chips and methods of controlling reset of system-on-chips
EP0628910A1 (en) Error capture logic for peripheral bus in multiple bus computer system
JPH09508227A (en) Additional board with enable / disable expansion ROM for PCI bus computer
US6611912B1 (en) Method and apparatus having a system BIOS write configuration data of a riser card to a controller configuration space when connecting the riser card to a motherboard
US7225288B2 (en) Extended host controller test mode support for use with full-speed USB devices
US7644263B2 (en) Storage control system and boot control system
US6898646B1 (en) Highly concurrent DMA controller with programmable DMA channels
CN112231005A (en) Method for managing FPGA (field programmable Gate array) version based on UBOOT (Universal boot on Board)
US6148384A (en) Decoupled serial memory access with passkey protected memory areas
JP3584977B2 (en) PCI device, PCI bus system including the same, and data collection method
JPH1055331A (en) Programmable read and write access signal and its method
US20030065868A1 (en) Distributed peer-to-peer communication for interconnect busses of a computer system
JPH10116187A (en) Microcomputer
US7424580B2 (en) Data transfer control device, electronic instrument, program and method of fabricating electronic instrument
CN116627472A (en) Firmware program upgrading method and server of high-speed peripheral component equipment
US20040153810A1 (en) Computer system equipped with a BIOS debugging card

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040708

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040714

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040727

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees