fwzfwz1
驱动中牛
驱动中牛
  • 注册日期2002-11-01
  • 最后登录2007-06-01
  • 粉丝0
  • 关注0
  • 积分80分
  • 威望8点
  • 贡献值0点
  • 好评度8点
  • 原创分0分
  • 专家分0分
阅读:2408回复:2

有没有介绍pciConfigInLong和pcifinddevice等函数使用的手册!

楼主#
更多 发布于:2003-08-21 11:18
10分求助!
有了驱动,人才有了力量。
fwzfwz1
驱动中牛
驱动中牛
  • 注册日期2002-11-01
  • 最后登录2007-06-01
  • 粉丝0
  • 关注0
  • 积分80分
  • 威望8点
  • 贡献值0点
  • 好评度8点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2003-08-21 11:43
已经找到!
有了驱动,人才有了力量。
Sunyyanlin
驱动牛犊
驱动牛犊
  • 注册日期2003-08-21
  • 最后登录2003-08-26
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2003-08-21 12:00
The routines pciConfigInByte(), pciConfigInWord(), pciConfigInLong(),
pciConfigOutByte(), pciConfigOutWord(), and pciConfigOutLong() may be used
to access the Configuration Space of any PCI device, once the library
has been properly initialized.  It should be noted that, if no device exists
at the given BDF address, the resultant behavior of the Configuration Space
access routines is to return a value with all bits set, as set forth in the
PCI bus standard.

In addition to the BDF numbers obtained from the pciFindXxx functions,
an additional parameter specifying an offset into the PCI Configuration Space
must be specified when using the access routines.  VxWorks includes defined
offsets for all of the standard PCI Configuration Space structure members as
set forth in the PCI Local Bus Specification 2.1 and the PCI Local Bus PCI
to PCI Bridge Architecture Specification 1.0.  The defined offsets are all
prefixed by \"PCI_CFG_\".  For example, if Vendor ID information is required,
PCI_CFG_VENDOR_ID would be passed as the offset argument to the access routines.

In summary, the pci configuration space access functions described above
accept the following parameters.

Input routines:

.IP \"busNo\"
bus segment number on which the device resides
.IP \"deviceNo\"
device ID of the device
.IP \"funcNo\"
function number of the device
.IP \"offset\"
offset into the device configuration space
.IP \"pData\"
where to return the data
.LP

Ouput routines:

.IP \"busNo\"
bus segment number on which the device resides
.IP \"deviceNo\"
device ID of the device
.IP \"funcNo\"
function number of the device
.IP \"offset\"
offset into the device configuration space
.IP \"Data\"
data to be written
.LP

.SH PCI CONFIG SPACE OFFSET CHECKING

PciConfigWordIn(), pciConfigWordOut(), pciConfigLongIn(), and
pciConfigLongOut() check the offset parameter for proper offset alignment.
Offsets should be multiples of 4 for longword
accesses and multiples of 2 for word accesses. Misaligned accesses will
not be performed and ERROR will be returned.

The previous default behaviour for this library was to not check for
valid offset values.  This has been changed and checks are now done by
default.  These checks exist to insure that the user gets the correct data
using the correct configuration address offsets.  The user should define
PCI_CONFIG_OFFSET_NOCHECK to achieve the older behaviour.  If user code
behaviour changes, the user should investigate why and fix the code that is
calling into this library with invalid offset values.
游客

返回顶部