设备驱动程序与驱动程序堆栈

发布于 2024-09-08 06:48:26 字数 73 浏览 1 评论 0原文

驱动程序(设备驱动程序)和驱动程序堆栈有什么区别?我一直听到人们谈论“驱动程序堆栈”,但我以前从未真正听说过这个...... 谢谢!

What is the difference between a driver (device drivers) and a driver stack? I keep hearing people talking about "driver stacks" but I have never really heard of this before...
Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

木森分化 2024-09-15 06:48:27

驱动程序堆栈是指理论上的驱动程序垂直链,每个驱动程序在从硬件到用户代码的线上或从用户代码到硬件的线上执行特定的工作。

在 Windows 操作系统中,发送给硬件的消息(带有数据)在 IRP(IO 请求数据包)中建模,这些消息通过这条线路从一侧到达另一侧,并且在其途中每个驱动程序都会处理它们并执行其操作。

一个易于理解的例子是 Windows 中的一个名为“功能驱动程序”的主驱动程序,出于某种原因,您希望在其上方放置一个“过滤器驱动程序”来执行一些小工作,例如在用户模式到达之前修改一些数据你的主要驱动力。
如果您已经有一个您不想要或无法修改的工作驱动程序,您可能需要这个。

请参阅 Windows 驱动程序堆栈上的此分析:
https://learn.microsoft.com/en-我们/windows-hardware/drivers/gettingstarted/driver-stacks

The Driver stack refers to a theoretical vertical chain of drivers each of them performing a specific job on the line up from the HW to the user code or down from user code to the HW.

In windows OS, messages (with data) to the HW are modelled in IRPs (IO request packet) that go through this line from one side to the other and on its way each driver handles them and does its operation.

An example that will make it easy for understanding is a main driver in Windows called "Function Driver" and for some reason you want to put a "Filter Driver" above it to do some minor work like modifying some data from user mode before it reaches your main driver.
You may need this if you already have a working driver that you do not want or can't modify.

See this assay on Windows drivers stack:
https://learn.microsoft.com/en-us/windows-hardware/drivers/gettingstarted/driver-stacks

梦境 2024-09-15 06:48:26

司机就是……嗯……司机。

驱动程序堆栈是指驱动程序相互插入,每个驱动程序都在链中添加一点。例如,使用显卡驱动程序的 OpenGL 或 DirectX 驱动程序,而显卡驱动程序又使用 PCI Express 或 AGP 或任何驱动程序来设置资源并推送像素等。或者您的 USB 设备的驱动程序当然必须使用 USB 驱动程序才能进行通信。

从技术上讲,拥有一个由一个驱动程序组成的“堆栈”是可能的,但是当人们说“堆栈”时,他们几乎总是意味着多个驱动程序。或者他们只是想让自己听起来好像他们知道自己在说什么。

A driver is...well...a driver.

A driver stack is when drivers plug into each other, each one adding a bit to the chain. Like, say, OpenGL or DirectX drivers that use your video card's driver, which in turn uses PCI Express or AGP or whatever drivers to set up resources and push pixels and such. Or your USB devices' drivers that of course have to use the USB drivers in order to communicate.

It's technically possible to have a "stack" consisting of one driver, but when people say "stack", they almost always mean more than one. Or they're just trying to sound like they know what they're talking about.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文