2013-10-01 236 views
4

我正在学习windows设备驱动程序,我发现很难区分PDO和FDO。让我告诉你,如果我错了,我脑中的流量会纠正我!windows设备驱动程序中pdo和fdo有什么区别?

当系统启动时加载将创建FDO的根总线驱动程序。现在它会枚举它的子设备,并且我会推出一些公交车司机的热插拔方法,当找到一个新的孩子并且该方法会通知PNP管理员。 PNP管理员会调用根总线驱动程序的AddDevice()例程,并且会为PCI等新的总线创建PDO,请详细解释整个流程,这只是我的想象。然后记录下来,系统将加载PCI总线的功能驱动程序,它将创建FDO? 这是什么FDO?为什么我需要这个?根据我的说法,PCI总线驱动程序也应遵循与根总线相同的方式,列举其子,并为它们创建PDO,或者通过此FDO它们仅指PDO?我这么多的困惑:(!!

回答

8

你在实际做,或者你只是想学吗?我只是想知道你怎么弄成这样低的筹码减少。

PDO =物理设备对象

FDO =功能设备对象

甲PDO 行为作为物理装置,但它并不一定必须是物理,它本质上是一个总线上的设备之间的接口,和总线本身。这在MSDN上已经很好的涵盖了。

Here是一个使用USB记忆棒的例子,这说明了它的不同之处。

Here是一个更深入的解释和重要的报价

如果你的参考点是PCI总线,然后PCI.SYS是功能驱动程序。但是如果你的参考点是Proseware Gizmo设备,那么Pci.sys就是公交车司机。这种双重角色在PnP设备树中是典型的。用作总线功能驱动程序的驱动程序也可用作总线子设备的总线驱动程序。

您还可以过滤驱动程序,让你可以PDO的和FDO的之间坐下,并开始做顽皮的东西一样的隐藏文件,POC的rootkit等。在这个阶段,你可以添加额外的功能,或完全阻止访问的PDO。

这里是所有的MSDN链接。

http://msdn.microsoft.com/en-us/library/windows/hardware/hh439632(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/hardware/ff554721(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/hardware/hh439643(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/hardware/ff554731(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/hardware/ff564859(v=vs.85).aspx http://technet.microsoft.com/en-us/library/cc776371(v=ws.10).aspx

如果不清除它适合你,随意张贴回来。

+0

非常感谢您的先生,我会阅读这些链接,如果我会卡住相同的地方然后我会ping你回来:) –

+0

在哪个例程的公交车司机PDO创建?以及PDO的用途是什么? –

1

According to me PCI bus driver should also follow the same as done by the root bus, enumerate its child and create PDOs for them - WRONG!

如果您在谈论WDM,PnP Manager将创建PDO。在此之前,YOU必须在DriverEntry()中创建它(检测到设备后)。

+0

根据MSDN,它是PCI总线驱动程序,枚举它的孩子并创建PDO。 PnP管理器的角色只是将设备节点与新创建的PDO相关联。 – kernel

2

 Layering of device objects and drivers in the Windows Driver Model.

下面是摘录形式 “编程微软Windows驱动程序模型”,第2版,沃尔一:

- PDO stands for physical device object. The bus driver uses this 
    object to represent the connection between the device and the bus. 
    
- FDO stands for function device object. The function driver uses 
    this object to manage the functionality of the device. 
- FiDO stands 
    for filter device object. A filter driver uses this object as a place 
    to store the information it needs to keep about the hardware and its 
    filtering activities. (The early beta releases of the Windows 2000 
    DDK used the term FiDO, and I adopted it then. The DDK no longer 
    uses this term because, I guess, it was considered too frivolous.) 

希望这有助于你出去。

相关问题