为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

WDM驱动程序开发之PCI设备的配置空间

2018-04-28 4页 doc 17KB 9阅读

用户头像

is_977556

暂无简介

举报
WDM驱动程序开发之PCI设备的配置空间WDM驱动程序开发之PCI设备的配置空间 WDM驱动程序开发之PCI设备的配置空间: KPciConfiguration, KPciSlot类: 一、Overview KPciSlot类和KPciConfiguration类用于在驱动开发过程中协助支持基于PCI总线的设备。KDevice的派生类可以包含KPciConfiguration类的一个实例来存取设备配置空间的内容。为了满足这些需要,驱动编写人员需要提供PCI vendor ID和device ID给它的构造函数。这个类使用系统服务来确定设备所在的总线序号和插槽...
WDM驱动程序开发之PCI设备的配置空间
WDM驱动程序开发之PCI设备的配置空间 WDM驱动程序开发之PCI设备的配置空间: KPciConfiguration, KPciSlot类: 一、Overview KPciSlot类和KPciConfiguration类用于在驱动开发过程中协助支持基于PCI总线的设备。KDevice的派生类可以包含KPciConfiguration类的一个实例来存取设备配置空间的内容。为了满足这些需要,驱动编写人员需要提供PCI vendor ID和device ID给它的构造函数。这个类使用系统服务来确定设备所在的总线序号和插槽序号。KPciConfiguration的成员函数可以使驱动程序完成读写PCI配置空间中各个域的读写。 KPciSlot类是KPciConfiguration类的一个基类,并且不被用于其他的地方。它的大多数成员函数对于WDM都是禁用的。然而,这个类的实例是KPciConfiguration::Enumerate()的一个参数。这个类的目的是要封装一个特别的PCI设备驻留在系统中的位置的信息。特别的,它为一个PCI设备保存总线序号,插槽序号和功能序号。KPciSlot类中的成员函数有助于列举系统中所有的PCI设备。 二、Member Functions of KPciConfiguration 1、KPciConfiguration , Constructor (4 forms)构造函数四种形式 2、Initialize , Initialization when default constructor used当用默认的不带参数的构造函数时,这个函数完成初始化任务 3、Invalidate , Removes the object from an initialized state从一个初始化了的状态删除对象资源 4、IsValid , Test if the object is initialized测试这个对象是否已经初始化成功 5、ReadHeader , Read PCI configuration header读PCI配置空间的头信息 6、WriteHeader , Write PCI configuration header写PCI配置空间的头信息 7、ReadDeviceSpecificConfig , Read device specific area of PCI configuration space读PCI配置空间中关于设备的具体区域 8、WriteDeviceSpecificConfig , Write device specific area of PCI configuration space写PCI配置空间中关于设备的具体区域 9、ReadCommandRegister , Read the PCI command register读PCI命令寄存器 10、WriteCommandRegister , Write the PCI command register写PCI命令寄存器 11、Control , Access the PCI control register读写PCI的控制寄存器 12、ReadStatusRegister , Read the PCI status register读PCI的状态寄存器 13、ReadBaseAddress , Read one of the base address registers from the PCI configuration space (two forms)从PCI配置空间中读一个基地址寄存器(两种形式) 14、WriteBaseAddress , Write one of the base address registers in the PCI configuration space (two forms)从PCI配置空间中写一个基地址寄存器(两种形式) 15、ReadInterrupt , Read the interrupt register读中断寄存器 16、WriteInterrupt , Write the interrupt register写中断寄存器 17、Enumerate , Static member to enumerate all PCI devices静态函数,用于列举所有PCI设备。 三、Member Functions of KPciSlot 1、KPciSlot , Constructor构造函数 2、Initialize , Initialize the object初始化对象的函数 3、Invalidate , Removes the object from an initialized state从一个初始化了的状态删除对象 4、Slot , Accessor to retrieve the slot vector获取插槽向量 5、Bus , Accessor to retrieve the bus number获取总线序号 6、Device , Accessor to retrieve the device number获取设备序号 7、Function , Accessor to retrieve the function number获取功能序号 8、Increment , Advance to the next function前进到下一个功能 9、IncrementDevice , Advance to the next device前进到下一个设备 10、MarkInvalid , Mark the object as invalid把对象标记为不合法 11、IsValid , Test the validity of the object测试对象的合法性 四、Example 这段示例代码显示了KPciConfiguration对象在KDevice派生类中的典型用法: class SuperFastCard : public KDevice { public: SuperFastCard(void); protected: KPciConfiguration m_Config; }; SuperFastCard::SuperFastCard(void) : KDevice(L"SuperFastCard", FILE_DEVICE_UNKNOWN), m_Config(SFC_VENDOR_ID, SFC_DEVICE_ID) { if (! m_Config.IsValid() ) { m_ConstructorStatus = STATUS_UNSUCCESSFUL; return; } else { basePhysAddress = m_Config.ReadBaseAddress(0); . . . } . . . }
/
本文档为【WDM驱动程序开发之PCI设备的配置空间】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索