Hi,
I have have a simple PnP driver that needs to be loaded before the graphics driver is loaded. My PnP driver just does read/write into PCI config space. It does not control any hardware. I want my driver to be loaded the before the graphics driver is loaded.
I changed the StartType variable in the registry to SERVICE_BOOT_START(Graphics driver is set to SERVICE_DEMAND_START). It didnt work. Is it possible to control the driver load order?
thanks
asku
Don’t get soaked. Take a quick peak at the forecast
with theYahoo! Search weather shortcut.
There is a key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ServiceGroupOrder with the list of all services/drivers groups set in order they should be loaded. Choose one of the listed group or create your own one and put its name in the Group (string value) in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\yourdriver.
Cheers - Krzysiek
Um, the statements “read/write into PCI config space” and “does not control any hardware” contradict each other. Perhaps you should install your driver as a lower device filter driver of the graphics device. That way, you are guaranteed to be able to access the PCI config space of the correct device (without tree-walking hacks), and are guaranteed to be able to do this before the graphics driver loads.
From: xxxxx@lists.osr.com [xxxxx@lists.osr.com] On Behalf Of anand sk [xxxxx@yahoo.com]
Sent: Thursday, January 25, 2007 2:20 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Need to control driver load order
Hi,
I have have a simple PnP driver that needs to be loaded before the graphics driver is loaded. My PnP driver just does read/write into PCI config space. It does not control any hardware. I want my driver to be loaded the before the graphics driver is loaded.
I changed the StartType variable in the registry to SERVICE_BOOT_START(Graphics driver is set to SERVICE_DEMAND_START). It didnt work. Is it possible to control the driver load order?
thanks
asku
Don’t get soaked. Take a quick peak at the forecast http:
with theYahoo! Search weather shortcut.http: — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</http:></http:>
Krzysiek’s suggestion only works for boot start drivers. Any demand start, pnp loaded driver will not use the load order list that he refers to. Arlie’s suggestion of installing yourself as a lower filter is the best approach. You will be able to process the pnp start device irp before the graphics driver does, so you can perform your special configuration there.
I would guess though that this is not the only time you would wnat to perform this configuration and that you would want to do it again when the graphics cards transitions from a low power state to D0. If so, you will need to perform the same action in the D0 power irp as well. BTW, this is very trival to do in a KMDF driver. If you perform your configuration in EvtDeviceD0Entry, it will cover both cases and you get the rest of the filtering logic for free.
d
This does not work for drivers loaded by PnP.
–
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
wrote in message news:xxxxx@ntdev…
> There is a key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ServiceGroupOrder with the
list of all services/drivers groups set in order they should be loaded. Choose
one of the listed group or create your own one and put its name in the Group
(string value) in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\yourdriver.
>
> Cheers - Krzysiek
>
Correct me if I’m wrong - i’d like to get load order straight. My understanding is that that DriverEntry is still called in an order determined by the rule system that pre-dates PnP (ServiceOrderGroup, etc). It’s AddDevice that is called in an order that is determined by the specific device parent. PnP obviously starts the driver and calls DriverEntry if it comes time to call AddDevice for a device that hasn’t yet been started.
If someone really needed to write config space in a load ordered fashion, they could probably do it from a DriverEntry called routine using HalSetBusData (assuming they didn’t care about future compatibility).
Pnp Driver are Demand Start drivers, the reason being that the PnP
manager starts the drivers when they have been detected by the
underlying Bus Drivers. ServiceGroupOrder only works on Drivers
that are BootStart, SystemStart, and AutoStart drivers.
–Mark Cariddi
Consulting Associate
OSR, Open Systems Resources, Inc.
On Fri, 26 Jan 2007 09:12:16 -0500 (EST), xxxxx@VirtualIron.com
wrote:
Correct me if I’m wrong - i’d like to get load order straight. My understanding is that that DriverEntry is still called in an order determined by the rule system that pre-dates PnP (ServiceOrderGroup, etc). It’s AddDevice that is called in an order that is determined by the specific device parent. PnP obviously starts the driver and calls DriverEntry if it comes time to call AddDevice for a device that hasn’t yet been started.
If someone really needed to write config space in a load ordered fashion, they could probably do it from a DriverEntry called routine using HalSetBusData (assuming they didn’t care about future compatibility).