Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results
The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.
Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/
Upcoming OSR Seminars | ||
---|---|---|
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead! | ||
Kernel Debugging | 9-13 Sept 2024 | Live, Online |
Developing Minifilters | 15-19 July 2024 | Live, Online |
Internals & Software Drivers | 11-15 Mar 2024 | Live, Online |
Writing WDF Drivers | 20-24 May 2024 | Live, Online |
Comments
d
d
If i'm interpreting this correctly, I have to write a whole other driver just to do this. The other problem I have is even if I write a Bus Filter driver, if it's not Microsoft Driver Signed I won't be able to install it by clicking Update driver in the Device Manager. I've actually written an upper filter driver but everytime I go to install the driver it says that it can't install because it can't find the software. I have to resort back to the old machine.inf file in order for it to work properly again.
Now, if for some reason I can install my function driver as a filter driver maybe this would help but I'm still lost as to how to write to the PCI Bridge adapter configuration space.
> -----Original Message-----
> From: [email protected] [mailto:bounce-276220-
> [email protected]] On Behalf Of [email protected]
> Sent: Friday, January 19, 2007 12:42 PM
> To: Windows System Software Devs Interest List
> Subject: RE:[ntdev] IoEnumerateDeviceObjectList help
>
> Wouldn't you still need to know the transparent bridge adapter's device
> object in order to write to it's configuration space? How do you
> distinguish the device objects of the pci devices. Is there a flag or
> can you somehow retrieve the actual Device ID through the device
> object?
>
> ---
> 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
I appreciate everyone's response. Thanks all!
d
I'm using IoGetDeviceProperty right now but I don't see the hardware ID of the PCI Bridge adapter I'm trying to access.
1) Getting the top of the stack via IoGetAttachedDeviceReference
2) allocating a PIRP
3) setting up the next stack location for IRP_MJ_PNP/IRP_MN_QUERY_DEVICE_RELATIONS(TargetDeviceRelations)
4) init the status to STATUS_NOT_SUPPORTED
5) send the irp, wait for it synchronously
6) on success, get the PDO out of the DEVICE_RELATIONS list. You will then need to
a) free the relations list
b) dereference the PDO (ObDereferenceObject) since the PDO was referenced when it was returned to you
d
1) Call ObReferenceObjectByName to retrieve the driver object for pci.sys
2) Call the IoEnumerateDeviceObjectList to get all of the DO's associated with that driver object
3) For each DO call the IoGetAttachedDeviceReference to get to the top of the stack
4) Allocate the PIRP
5) Call IoGetNextIrpStackLocation
6) Send an IRP_MJ_PNP/IRP_MN_QUERY_DEVICE_RELATIONS(TargetDeviceRelations) for each DO
Once I receive the DO I can then use IoGetDevicePropertyType to get the DevicePopertyHarwareID.
I can then compare this string to the actual Hardware ID of the PCI bridge adapter and if it's a match, use the Bus Interface Standard to write to the PCI Configuration Space.
I realize writing a Bus Filter Driver is the way to go but will this method work? Should I be able to see the transparent PCI Bridge adapter's DO? I'm hoping I will since it's enumerated and I can view it in the Device Manager window.