- Don't manually write a device description for detected devices
- Instead, let PnpRoot report it in response to IRP_MN_QUERY_DEVICE_TEXT
svn path=/trunk/; revision=46711
- Remove an unused member from PNPROOT_DEVICE
- Don't build a bogus resource list if no resources are required
- Fixes a crash during resource arbitration because the created resource requirements list was malformed
svn path=/trunk/; revision=46710
- Revert part of r46707
- Remove a hack in PnpRoot that assembled a CM_RESOURCE_LIST from a CM_PARTIAL_RESOURCE_DESCRIPTOR but also corrupted proper resource lists (such as from detected devices in IoReportDetectedDevice)
- Add a simple resource arbiter that finds an unused resource in the range provided in the resource requirements list. It's not perfect but it's a start.
- Start enforcing resource conflicts
- Fix incorrect code that was writing a CM_PARTIAL_RESOURCE_DESCRIPTOR instead of a CM_RESOURCE_LIST (the hack above was compensating for this) which result in BootConfig being a REG_PARTIAL_RESOURCE_DESCRIPTOR type on certain devices and a REG_RESOURCE_LIST on others
- Fix a broken check for no partial resource descriptors
svn path=/trunk/; revision=46708
- Pass IRPs down to the root PDO if we don't handle it
- Don't complain if we get an IRP that we don't expect. We are the parent bus driver for the device so we are responsible for completing those IRPs.
svn path=/trunk/; revision=46707
- Check access rights according to the DACL. Granted rights are removed from the remaining rights variable.
- Return success only if there are no more remaining rights. Return failure otherwise.
- Remove outdated code.
svn path=/trunk/; revision=46703
- Flusher lock fixes: wrong kind of lock,total mess (and the wrong kind of lock). Properly fixed throughout cmapi.c, but still missing in many other places.
- Add support for detecting loading of an already loaded hive.
- Start adding calls to CmpReportNotify to support registry callbacks.
- Do work needed to flush notifications for a deleted node (but CmpFlushNotify not yet implemented).
- Add support for adding each newly loaded hive to the HiveList key in the registry (but CmpAddHiveToFileList not yet implemented).
- Add some ViewLock acquire/releases where needed.
- Load the key in a faster way (Ob vs Zw)
- Add checks everywhere for HvMarkCellDirty success. In future (when log/backup file is enabled), it can return FALSE (e.g. when we are out of space).
- Change logic in CmpDoFlushAll to only flush a hive if it won't shrink (in the future, flushing may lead to hive shrinkage for efficiency).
- Add SEH2 protection to all CmApis that may deal with user-mode data.
- Add HvTrackCellRef/HvReleaseCellRef for tracking cell references in scenarios where we might need many GetCell/ReleaseCell calls. For now stubbed to only work with up to 4 static references.
- Properly unlock/free in some failure paths in some of the CM APIs.
- Add some missing HvReleaseCell in paths where it was missing.
- Try to fix hack in enumerate key.
- Fix wrong usage of KeQuerySystemTime. It was called twice to save it in 2 different places. Instead, there should be only one call, and then duplicate the value across.
- Fix logic in CmpSetValueExistingData/Key.
Tested with winetests and .NET framework 1.1 installation which fully completes.
svn path=/trunk/; revision=46702
- use a macro in RegReadDisplaySettings to make things smaller
- Send WM_DISPLAYCHANGE to all toplevel windows when changing mode
- leave UserChangeDisplaySettings when mode switching failed
svn path=/branches/reactos-yarotows/; revision=46701
[NTOS]: Use the new Cm interface in IopInitializeSystemDrivers to parse the ordered list of system drivers to load. Make it use ZwLoadDriver directly instead of having a hacked IopLoadDriver function.
[NTOS]: Drivers should not show up loading n times a reboot now (some drivers seemed to do this in the past when they failed to load).
[NTOS]: The system driver code could be further improved by checknig if the driver has already been loaded, or attempted and failed to load, but it is already much better now than in the past.
[PERF]: Boot-time improvement since the new system driver loading code uses low-level Cm interfaces (portability side-effect: can be shared with FreeLDR) instead of the complex parse-based object-manager-based system-calls.
svn path=/trunk/; revision=46693
[NTOS]: Use group prioritiy, tag numbers, and tag priority to determine the correct loading order for boot drivers, instead of just parsing the linked list. Dependencies work now!
[NTOS]: Load any DLLs that are driver-dependent with MmCallDllInitialize. Previously, these .DLLS were ignored and drivers could lose dependencies.
svn path=/trunk/; revision=46690
- Add the check for ACESSS_SYSTEM_SECURITY.
- Keep the desired access rights that have not been granted yet in the variable RemainingAccess.
- Handle the MAXIMUM_ALLOWED case if the DACL is empty.
svn path=/trunk/; revision=46689
- Fix the Vector value of the interrupt resource
- Actually set the device to use the interrupt that the PnP manager gave us
svn path=/trunk/; revision=46687
- Instantiated pins use as the control mutex the mutex from the filter
- Fix KsAcquireControl & KsReleaseControl
- Fix handling of IRP_MN_QUERY_INTERFACE
- Filter centric ks filters expect an array of KSPROCESSPIN_INDEXENTRY. Allocate array when intializing filter / new pin factory is added
- Store result of pin intersection handler when result is STATUS_BUFFER_OVERFLOW
- Implement setting / retrieving of master clock
- Implement setting / retrieving pin state
- Partly implement setting pin data format
- Implement IKsReferenceClock interface
- Implement KsPinGetReferenceClockInterface
- Add sanity checks to KsGetPinFromIrp
- Partly implement handling IOCTL_KS_READ_STREAM / IOCTL_KS_WRITE_STREAM
- Supply filter property sets when an IOCTL_KS_PROPERTY request arrives
- Release again filter mutex when closing the pin
- Implement allocating a clock
- Tuner pin fails with STATUS_IO_DEVICE_ERROR when set to KSSTATE_RUN, needs more investigation
svn path=/trunk/; revision=46685
- Check the SeTakeOwnership privilege only if WRITE_OWNER access is desired.
- Move the check for token ownership from SepAccessCheck because this check grants access rights rather than checking them.
svn path=/trunk/; revision=46683
- Implement tracking port status and change status.
- When device has connected on port, set the port status. For now assume high speed device.
- Fix returning root hubs Status Change Endpoint for URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER.
- Implement USB_REQUEST_GET_STATUS for functions URB_FUNCTION_GET_STATUS_FROM_DEVICE and URB_FUNCTION_CLASS_OTHER. Implement USB_REQUEST_CLEAR_FEATURE and USB_REQUEST_SET_FEATURE.
- Implement IOCTL_INTERNAL_USB_GET_DEVICE_HANDLE to return the root hubs device handle, fix IOCTL_INTERNAL_USB_GET_HUB_COUNT to return 1 vice 0 as the root hub must be accounted for.
- Code based on XEN PV Drivers by James Harper.
svn path=/trunk/; revision=46660
- Fix certain scenarios in which a device node can have a NULL instance path which causes registry corruption when we try to write registry keys for that device node
- Create the 'Control' subkey and add the ActiveService value inside it
- Fix a memory leak
- TODO: Fill AllocConfig and FilteredConfigVector
svn path=/trunk/; revision=46659
- EngAcquireSemaphoreShared: update dwEngAcquireCount
- DC_LockDc/DC_UnlockDc: Acquire PDEV lock only for direct DCs, in that case also update the pSurface pointer
- When copying DC states, copy the surface only for memory dcs
- after switching the mode, update system metrics and redraw the desktop window.
- Remove testdraw code.
svn path=/branches/reactos-yarotows/; revision=46658
- Add 2 parameters to IopUpdateResourceMap to allows for updating different keys
- Implement IopDetectResourceConflict and IopCheckForResourceConflict but don't report the conflicts until we get a resource arbiter
- Halfplement IoReportResourceForDetection
svn path=/trunk/; revision=46654
[HAL]: Implement HalpReportUsage! On ACPI, all is implemented, on PC/AT, we don't yet parse the ROM blocks in the registry (but does FreeLDR even put them in?), and I don't think we'll ever enable 16-bit port decoding since FreeLDR never detects ISA vs EISA machines (so we always run as ISA).
[HAL]: Fill out the "????" entries in HalpDefaultIoSpace... more typical Alex "I copied something without knowing what it meant"-magic.
svn path=/trunk/; revision=46652