Commit graph

41944 commits

Author SHA1 Message Date
Cameron Gutman 141ca81c82 [NTOSKRNL]
- Fix the type passed to ZwSetValueKey

svn path=/trunk/; revision=46712
2010-04-04 05:17:29 +00:00
Cameron Gutman 38bae887c2 [NTOSKRNL]
- 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
2010-04-04 04:39:56 +00:00
Cameron Gutman 93c0c968c0 [NTOSKRNL]
- 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
2010-04-04 02:59:31 +00:00
Cameron Gutman e0b95b05b0 - Remove a leftover debug print
svn path=/trunk/; revision=46709
2010-04-04 01:34:33 +00:00
Cameron Gutman e90ce939a6 [NTOSKRNL]
- 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
2010-04-04 01:18:41 +00:00
Cameron Gutman 28971e63f3 [NTOSKRNL]
- 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
2010-04-04 00:33:19 +00:00
Cameron Gutman d6d462f203 [PCI]
- Handle IRP_MN_QUERY_DEVICE_RELATIONS for TargetDeviceRelation for PCI's child PDOs

svn path=/trunk/; revision=46706
2010-04-04 00:00:21 +00:00
James Tabor 05799d4a57 [Gdi32]
- Adding batch support for ExtSelectClipRgn and update to the batch object structure.

svn path=/trunk/; revision=46705
2010-04-03 22:05:03 +00:00
Eric Kohl 2b4f3854dd [NTOSKRNL]
- 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
2010-04-03 21:21:52 +00:00
Aleksey Bragin 71d61c9c59 [NTOSKRNL/CONFIG]
- 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
2010-04-03 20:22:32 +00:00
Gregor Schneider eb82a3b915 [cmd] Emit line breaks DOS/Windows style (CRLF), instead of Linux style (LF only)
See issue #4509 for more details.

svn path=/trunk/; revision=46700
2010-04-03 17:24:10 +00:00
Gregor Schneider e9a0761db9 [taskmgr] Hide CPU graph options on single CPU systems
See issue #2144 for more details.

svn path=/trunk/; revision=46699
2010-04-03 17:23:27 +00:00
Eric Kohl d384dbd46a [NTOSKRNL]
- Implement the calculation of access rights for the MAXIMUM_ALLOWED case.

svn path=/trunk/; revision=46695
2010-04-03 10:52:17 +00:00
Sir Richard 959116f521 [NTOS]: Implement Configuration Manager routines for building a driver list, sorting it, detecting circular dependencies and ordering, combining groups, tags, group orders and tag orders, etc. Replaces the "drvrlist" I/O interface currently in ReactOS.
[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
2010-04-03 07:44:38 +00:00
James Tabor d7c28ad92a - Simplifying MakeInfoDC.
svn path=/trunk/; revision=46692
2010-04-02 23:52:38 +00:00
Sylvain Petreolle 066b696c33 Fix MP install.
svn path=/trunk/; revision=46691
2010-04-02 19:52:03 +00:00
Sir Richard 6075ae9a8f [NTOS]: Rewrite boot driver loading code (not the driver code itself) to use the boot loader's BootDriverListHead, instead of parsing InOrderListHead and cherry-picking ".sys" files. This is the last incompatibility with Windows.
[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
2010-04-02 17:57:33 +00:00
Eric Kohl 74e30b9093 [NTOSKRNL]
- 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
2010-04-02 17:46:24 +00:00
Johannes Anderwald 809944b668 [PSDK]
- Fix build

svn path=/trunk/; revision=46688
2010-04-02 17:19:57 +00:00
Cameron Gutman 3d1eaacc72 [PCI]
- 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
2010-04-02 17:07:38 +00:00
Cameron Gutman d214e12390 [FREELOADER]
- Fix the ShareDisposition value of COM port interrupts 
- Fix the Vector value of the interrupt resources

svn path=/trunk/; revision=46686
2010-04-02 17:05:39 +00:00
Johannes Anderwald 215e199219 [KS]
- 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
2010-04-02 16:38:48 +00:00
Johannes Anderwald b4a44e7a78 [KSPROXY, MSDVBNP]
- Remove remaining DebugBreak
- Add debug traces

svn path=/trunk/; revision=46684
2010-04-02 16:25:18 +00:00
Eric Kohl 249d39c17a [NTOSKRNL]
- 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
2010-04-02 15:13:24 +00:00
Johannes Anderwald 8051b8115a [NTOS]
- Make sure SymbolicLink is null terminated

svn path=/trunk/; revision=46682
2010-04-02 14:21:15 +00:00
Johannes Anderwald 95650313d9 [NTOS]
- Add support for reference strings in IoOpenDeviceInterfaceRegistryKey

svn path=/trunk/; revision=46681
2010-04-02 14:01:55 +00:00
Johannes Anderwald 90a11f48e9 [MMIXER]
- Copy device name when initializing WAVEINCAPS / WAVEOUTCAPS
- Fixes display wave device name in cpl / waveInGetDevCaps / waveOutGetDevCaps

svn path=/trunk/; revision=46680
2010-04-02 13:49:10 +00:00
James Tabor 9e92286f5c [Win32k]
- Implement MakeInfoDC and support functions. Dedicated to Timo.

svn path=/trunk/; revision=46679
2010-04-02 11:53:14 +00:00
Timo Kreuzer b81a016b9e Remove svn:mergeinfo property from several files
svn path=/trunk/; revision=46677
2010-04-02 11:35:58 +00:00
Cameron Gutman 66c160f1d6 [NTOSKRNL]
- Implement IoOpenDeviceInterfaceRegistryKey
- Dedicated to Janderwald

svn path=/trunk/; revision=46665
2010-04-02 07:29:54 +00:00
Sir Richard 2f60720f98 [HALACPI]: Implement HalpQueryResources: We take the resource requirements, find the SCI requirement, and convert it into a resource. The ACPI HAL should now report its resoures once the PnP HAL driver model is enabled.
svn path=/trunk/; revision=46664
2010-04-02 06:46:33 +00:00
Sir Richard cbc12bf14d [HALACPI]: Implement querying HALACPI resource requirements. If it exists, the SCI Vector is added to the list as a requirement.
svn path=/trunk/; revision=46663
2010-04-02 06:28:43 +00:00
Cameron Gutman c61b788c62 - Forgot this file
svn path=/trunk/; revision=46661
2010-04-02 04:58:41 +00:00
Michael Martin 44cbfd23f2 [usb/usbehci]
- 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
2010-04-02 04:49:01 +00:00
Cameron Gutman b121447744 [NTOSKRNL]
- 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
2010-04-02 03:47:14 +00:00
Cameron Gutman 623bc96350 - Fix the cmbatt.sys path
- Add compbatt.sys

svn path=/trunk/; revision=46656
2010-04-01 22:28:35 +00:00
Cameron Gutman 77d4bd5cd3 [CMBATT]
- Remove my cmbatt driver and use lassy's cmbatt driver instead

svn path=/trunk/; revision=46655
2010-04-01 22:24:34 +00:00
Cameron Gutman 633c67bdbf [NTOSKRNL]
- 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
2010-04-01 22:10:38 +00:00
Sir Richard a22393f57a [HAL]: Whoever came up with this MINIHAL idea...
svn path=/trunk/; revision=46653
2010-04-01 20:54:12 +00:00
Sir Richard 881284946b [HAL]: Move all HAL-specific names to halacpi.c and halpcat.c. This includes the PnP Device Name (e_isa_up vs acpipic_up", the HAL Name, and whether or not the firmware mapper should be disabled (tells I/O Manager to skip legacy detection).
[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
2010-04-01 20:46:55 +00:00
Sir Richard 87c7a8930b [HAL]: HalpActiveProcessors is KAFFINITY, not LONG. Also, MP HAL lacked it.
svn path=/trunk/; revision=46651
2010-04-01 20:42:43 +00:00
Sir Richard a7d94d59ba [HAL]: Fucken' A, I knew I'd forget one.
svn path=/trunk/; revision=46650
2010-04-01 20:41:46 +00:00
Sir Richard dae14f1215 [HAL]: Smarter .rbuild separation so that ACPI and PC/AT hal don't rebuild the generic library twice. Now generic stays generic, and generic_pcat/acpi are add-on libaries just like generic_up and generic_mp.
svn path=/trunk/; revision=46649
2010-04-01 20:41:04 +00:00
Johannes Anderwald d80fb80a07 [DEVENUM]
- Extend device enumerator to support class enumerators of device interfaces

svn path=/trunk/; revision=46648
2010-04-01 19:48:49 +00:00
Sir Richard 111a56f09b [HAL]: Split HalReportResouceUsage into per-platform function, since PC/AT HAL and ACPI HAL have different requirements. As a bonus, the ACPI HAL now identifies itself as ACPI Compatible, instead of using the "PC Compatible" moniker.
[HAL]: Implement HalpGetNMICrashFlag so you can do NMI crashes now.
[HAL]: Implement basic HalpRegistryPciDebuggingDeviceInfo for the day someone implements the Kd routines.
[HAL]: HalpInitializePciBus needs to be different between "Bus Handler HALs" (non-ACPI/embedded) and "Non-Bus Handler HALs" (ACPI/x64). On ACPI, all we do is setup the raw PCI Stubs and NMI crashing. PC/AT will need more involved code.

svn path=/trunk/; revision=46647
2010-04-01 19:42:07 +00:00
Johannes Anderwald b021015c8f [MSDVBNP]
- Remove DebugBreak
- Implement IPin::Connect, IPin::ReceiveConnection, IPin::Disconnect, IPin::ConnectedTo
- Remove spaces
- DVBT Network Provider can now connect tv tuner in ReactOS

svn path=/trunk/; revision=46646
2010-04-01 19:20:12 +00:00
Sir Richard 3ab04b5faa [PCI]: New PCI driver, for the future. Needed for embedded support (ARM/etc) and anything other than your 3 emulators and neighboor's custom-made-to-barely-boot-your-OS machine.
svn path=/trunk/; revision=46645
2010-04-01 19:07:40 +00:00
Cameron Gutman ccc358b878 [NTOSKRNL]
- Store the device's assigned resources (raw and translated) in the RESOURCEMAP key
- Implement IopUpdateResourceMap which is responsible for updating the key with new resource information and setting the DNF_RESOURCE_ASSIGNED flag
- Fix IoGetDeviceProperty which was returning incorrect information for DevicePropertyPhysicalDeviceObjectName
- Take a look at HKLM\Hardware\ResourceMap\PnP Manager\PnpManager and see the beautiful resource lists ;)
- NOTE: Regedit has a bug so the "\Device\" prefix is hidden but you will see that it is there if you look with explorer's NT object viewer

svn path=/trunk/; revision=46644
2010-04-01 18:17:25 +00:00
Johannes Anderwald d66a0171a1 [KS]
- Partly implement pin property handling by using supplied pin descriptor properties
- Dynamically allocate connection format and put in pin's object bag
- Remove bogus assert as pins don't have to provide a PinDispatchCreate function
- Tuner device filter and capture device filter now successfully connect and instantiate corresponding input / output pins

svn path=/trunk/; revision=46643
2010-04-01 17:22:21 +00:00
Johannes Anderwald c44cdc2405 [BDASUP]
- Register an empty filter descriptor as pins, nodes, connections will be added later dynamically
- Fixes the duplicate input / output pins visible with graphedt
- Add the filter automation table to the object bag so it gets deleted when filter factory is destroyed

svn path=/trunk/; revision=46642
2010-04-01 17:18:13 +00:00