12.07.2015 Views

RedHawk Linux User's Guide version 6.3 日本語版

RedHawk Linux User's Guide version 6.3 日本語版

RedHawk Linux User's Guide version 6.3 日本語版

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

デバイス・ドライバbar_scan_rewindbar_scan_closefree_pci_devicebar_mmapbar_munmapスキャンを 再 開 しますアクティブ・スキャンを 閉 じて 関 連連 するメモリを 解 放 します見 つけたデバイスに 関 する 割 り 当 てられたメモリ 全 てを 解 放 します適遚 切 なページに 整 列 したBARファイルをmmapしますbar_mmapでマッピングしたBARファイルをmunmapしますbar_scan_open(3) 14これらのインターフェースを 使 用 するため、アプリケーションにlibccur_rtライブラリをリンクする 必 要 があることに 注 意 してください。gcc [options] file -lccur_rt ...これらの 機 能 の 使 用 を 解 説 する 例 は、/usr/share/doc/ccur/examples/pci_barscan.cに 提 供 されます。この 機 能 は、PCIデバイスの 検 索 のために 初 期 コンテキストを 作 成 するために 使 用 します。 返 されたbar_contextは、 反 復 子 (イテレータ)インターフェースの 状 況 データを 指 定 する/usr/include/pcibar.hに 定 義 された 不 透 明 なポインタ 型 です。この 値 はその 後 のbar_scan_next,bar_device_count, bar_scan_rewind, bar_scan_closeの 呼 び 出 しに 提 供 される 必 要 があります。概 要#include #include bar_context bar_scan_open(int vendor_id, int device_id);引 数 は 以 下 のように 定 義 されます:vendor_iddevice_id/usr/include/linux/pci_ids.hに 定 義 されたベンダーIDの 値 または 特 殊 な 値ANY_VENDOR。ANY_VENDORはホストシステム 上 の 全 てのデバイスに 対 する全 てのvendor_id の 値 と 適遚 合 します。/usr/include/linux/pci_ids.hに 定 義 されたデバイスIDの 値 または 特 殊 な 値ANY_DEVICE。ANY_DEVICEはホストシステム 上 の 全 てのデバイスに 対 する 全てのdevice_id の 値 と 適遚 合 します。エラー 状 態 についてはmanページを 参 照 して 下 さい。bar_scan_next(3) 14この 機 能 は、 検 出 した 次 に 一 致 するPCIデバイスのpci_device 構 造造 体 オブジェクトへのポインターを 返 します。概 要#include #include struct pci_device * bar_scan_next(bar_context ctx);引 数 は 以 下 のように 定 義 されます:14-3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!