Commit graph

3 commits

Author SHA1 Message Date
Sir Richard 6b6a3291e8 [NTOS]: Re-implement IoGetDeviceProperty. Main changes are usage of existing (and new) helper functions for registry/IRP access, much better factored code, correct implementation of DevicePropertyPhysicalDeviceObjectName, fixed implementation of DevicePropertyBootConfigurationTranslated and DevicePropertyBootConfiguration (do not crash the system anymore), and support for more device properties.
[NTOS]: Fix caller of IoGetDeviceProperty in pnpres.c to work with new function behavior (which matches WDK documentation and test cases).
[NTOS]: Implement helper function PnpBusTypeGuidGet, should be used later in other PnP code, but now used only for this patch.
[NTOS]: Implement helper function PnpDetermineResourceListSize, ditto. N.B. Current IopCalculateResourceListSize function is broken and callers should use this one instead.
[NTOS]: Implement helper function PpIrpQueryCapabilities, should be used later in device node code, but now only used for this patch.
[NTOS]: Implement helper function PnpDeviceObjectToDeviceInstance, ditto.
Main purpose of this patch is to unblock the new PCIx driver.

svn path=/trunk/; revision=47388
2010-05-28 23:03:27 +00:00
Cameron Gutman 2fa4179cf2 - Missed this from my last commit
svn path=/trunk/; revision=46984
2010-04-21 22:42:21 +00:00
Cameron Gutman a31725e572 [NTOSKRNL]
- Replace the broken CM_RESOURCE_LIST_SIZE with a better function that actually works with resource lists that have device-specific data in them (fixes missing device specific data when resources are retrieved with IoGetDeviceProperty)
- Separate the resource code out of pnpmgr.c and into pnpres.c
- Simplify resource assigning to simply calling one function, IopAssignDeviceResources, which takes care of the registry configuration, translation, etc.
- Set the DNF_NEED_ENUMERATION_ONLY flag only AFTER the device is actually started not before
- Set DNF_START_FAILED if IRP_MN_START_DEVICE fails
- Fix a bug in IoReportDetectedDevice that wrote the AllocConfig value to wrong place

svn path=/trunk/; revision=46983
2010-04-21 22:33:11 +00:00