Commit graph

44143 commits

Author SHA1 Message Date
Kamil Hornicek 6237a1d524 [WIN32K]
Follow-up to r48681. Fixes text on disabled controls.

svn path=/branches/reactos-yarotows/; revision=49264
2010-10-24 22:51:51 +00:00
Aleksey Bragin 9bfee86717 [N[NTOS/MM]
- Initialize Found to FALSE in NtQueryVirtualMemory. I wonder how GCC missed uninitialized var usage?
- Implement case when NtQueryVirtualMemory is called with non-existing virtual address.
See issue #3755 for more details.

svn path=/trunk/; revision=49261
2010-10-24 20:02:04 +00:00
Eric Kohl 4cb29716d1 [SERVICES]
RControlService: Check the current state before sending a control request.

svn path=/trunk/; revision=49259
2010-10-24 13:48:11 +00:00
Timo Kreuzer 2eb1b02bc0 [WIN32K]
Fix possible NULL pointer free. Fixes solitaire.

svn path=/branches/reactos-yarotows/; revision=49257
2010-10-24 11:57:02 +00:00
Cameron Gutman 3a7694182b [HAL]
- Fix a broken loop that resulted in us registering the resources of multiple COM ports as our KD port
- Fixes bug #5530

svn path=/trunk/; revision=49256
2010-10-24 10:48:10 +00:00
Cameron Gutman f7f4cae9ba [HAL]
- HalpEnableInterruptHandler: Set the IDT_LATCHED flag if the caller requested a latched interrupt

svn path=/trunk/; revision=49255
2010-10-24 10:28:15 +00:00
Eric Kohl 7d6c0f7918 [SERVICES]
- Use new handle check functions in RCloseServiceHandle().
- RControlService: Check if a control request is acceptable for a user mode service before sending it to the service.

svn path=/trunk/; revision=49253
2010-10-24 09:21:37 +00:00
Cameron Gutman 7d9a1e9f3b [NTOSKRNL]
- Fix a critical bug in the conflict detection code
- Don't unconditionally skip conflict detection for shared resources, instead it should be done on a descriptor-by-descriptor basis (if both descriptors are shared)
- This check wasn't removed when I initially wrote this code and added the proper check below

svn path=/trunk/; revision=49252
2010-10-24 09:05:17 +00:00
Cameron Gutman 58a93c730c [PNPMGR]
- Check that we got a valid vector back from HAL when translating an interrupt resource
- Add some debugging messages for failure paths in device resource handling code

svn path=/trunk/; revision=49251
2010-10-24 06:16:35 +00:00
James Tabor 24acd670a4 [Win32k]
- Fix an exception when set condition * first always is used then moving the mouse. There seems to be an initialization issue (The Init Bug) and not setting a desktop.

svn path=/trunk/; revision=49250
2010-10-24 04:36:45 +00:00
Cameron Gutman 5958a4e877 [NTOSKRNL]
- Partially implement IoAssignResources so that it creates a non-conflicting resource list from the requirements but it doesn't claim the resources for the device in the registry
- Partially implement IoReportResourceUsage so that it checks the resource list for conflicts but doesn't claim the resources in the registry
- Please test this revision with a variety of hardware and drivers because it activates several code paths in the PnP manager
- If this causes problems, look for "Denying an attempt to claim resources currently in use by another device!" in the debug log and report the bug to me

svn path=/trunk/; revision=49249
2010-10-24 02:51:48 +00:00
Cameron Gutman e7431a821b [NTOSKRNL]
- Rewrite the resource map code to fix a regression, several failures cases, and a few memory leaks
- Remove an incorrect definition of IopDetectResourceConflict in pnpreport.c (no idea how this didn't trigger an onslaught of warnings)

svn path=/trunk/; revision=49248
2010-10-24 02:38:14 +00:00
Timo Kreuzer d90c19e431 Fix a comment
svn path=/trunk/; revision=49247
2010-10-23 22:34:47 +00:00
Timo Kreuzer 548559a3d5 [WIN32K]
- Remove a wrong ASSERT
- Improve EngLoadImageEx to correctly handle the path and optional dll extension.
- Get rid of EngLoadDriver

svn path=/branches/reactos-yarotows/; revision=49245
2010-10-23 21:59:21 +00:00
Johannes Anderwald 69b6f20b77 [PORTCLS]
- Fix multiple bugs in round buffer implementation
- Should result in less audio glitches, especially when playing audio files with low sample rates. Please report any regressions!

svn path=/trunk/; revision=49244
2010-10-23 20:20:18 +00:00
Johannes Anderwald 37d654bb93 [PORTCLS]
- Rewrite the topology filter / pin / node property handling
- Store property sets of filter / pins / nodes in a common property set array
- Write a common dispatch function, which serves as a trampoline for filter / pin / node property requests
- Private property handlers of the drivers are now accessible

svn path=/trunk/; revision=49243
2010-10-23 18:51:17 +00:00
Johannes Anderwald 0d136362a0 [PORTCLS]
- Remove silence buffer hack
- Stub DRM Property Handler
- Before stopping the audio pin, fill the dma buffer with silence samples
- create a subdevice descriptor for instantiated pins too

svn path=/trunk/; revision=49242
2010-10-23 18:42:59 +00:00
Timo Kreuzer b0dd54e446 [FORMATTING]
Fix indentation, no code change.

svn path=/branches/reactos-yarotows/; revision=49241
2010-10-23 17:05:34 +00:00
Timo Kreuzer 8af88571ea sync with trunk (r49238)
svn path=/branches/reactos-yarotows/; revision=49240
2010-10-23 16:42:45 +00:00
Johannes Anderwald 17fe2b3988 - Fix definition of KSPROPSETID_DrmAudioStream, KSPROPERTY_DRMAUDIOSTREAM
svn path=/trunk/; revision=49239
2010-10-23 14:42:22 +00:00
Johannes Anderwald 4b5747df27 [PORTCLS]
- Fix check if the pin can be instantiated another time
- Remove hack to close old
- Add function FreePin to remove its old reference
- Fix memory leaks / reference leaks in WavePci pin implementation
- Fix memory / reference leaks in WavePci Close implementation

svn path=/trunk/; revision=49238
2010-10-23 12:10:56 +00:00
Johannes Anderwald cd63ffe6c2 [KS]
- Fix property set support handler for topology nodes
- Check if the driver supports a basic support handler. In that case return the basic support handler

svn path=/trunk/; revision=49237
2010-10-23 12:00:11 +00:00
James Tabor e7c4137319 [Win32k|User32]
- Rewrite the Event and Hook procedures. See bug 5670 for more details.

svn path=/trunk/; revision=49231
2010-10-23 05:36:12 +00:00
Aleksey Bragin 26164e7b2e [MSI]
- Fix freed memory access and fix freeing of invalid pointer. (from http://www.winehq.org/pipermail/wine-patches/2010-October/094849.html )
See issue #3755 for more details.

svn path=/trunk/; revision=49229
2010-10-22 16:22:21 +00:00
Aleksey Bragin 955c4d7d77 [MSI]
- Sync to Wine-1.3.5.

svn path=/trunk/; revision=49219
2010-10-22 13:18:11 +00:00
Aleksey Bragin 12cded29f1 [ADVAPI32]
- Roel Messiant: Fix short-circuit evaluation.
See issue #5677 for more details.

svn path=/trunk/; revision=49216
2010-10-21 20:30:37 +00:00
Eric Kohl 824ec6597d [SERVICES]
- Remove the reference counter from the common handle type as a handle is never shared or duplicated.
- Remove the access right from the service handle as it is not used.
- Dereference service manager handles and service handles in two separate functions that SEH-protect the initial access to the handle and signature check. This will protect SCM from bogus handles.

svn path=/trunk/; revision=49214
2010-10-20 17:28:10 +00:00
Pierre Schweitzer 538b9e4fbf [NTOSKRNL]
Implemented FstubAdjustPartitionCount(), FstubConvertExtendedToLayout(), FstubCopyEntryEFI(), FstubCreateDiskMBR(), FstubCreateDiskEFI(), FstubCreateDiskRaw(), FstubDbgPrintSetPartitionEx(), FstubReadHeaderEFI(), FstubReadPartitionTableEFI(), FstubSetPartitionInformationEFI(), FstubVerifyPartitionTableEFI(), FstubWriteBootSectorEFI(), FstubWriteEntryEFI(), FstubWriteHeaderEFI(), FstubWritePartitionTableEFI(), FstubWritePartitionTableMBR(), FstubWriteSector()

Implemented IoCreateDisk(), IoGetBootDiskInformation(), IoReadDiskSignature(), IoSetPartitionInformationEx(), IoVerifyPartitionTable(), IoWritePartitionTableEx()

To sum up, this commit finishes FSTUB API implementation in the ReactOS kernel. This means one important thing: now ReactOS kernel knows about a bit about EFI and about GPT. No need to say that it's the first step into EFI support. But a lot more work is needed. Especially since the kernel is the only real entity in ReactOS to handle GPT. All the rest of the OS doesn't know anything about GPT.

A small note about FstubVerifyPartitionTableEFI(). This function is supposed to check whether a disk formated with GPT is valid, and if it's not, to fix it. First step is implemented. Second step isn't yet supported.

A general note about all that stuff: on GPT, backup table isn't properly handled for the moment, as ReactOS is experiencing disk geometry issues. That means it's not having the proper disk sectors count and then, can't find the backup table (which is located on last disk sector).

References:
http://www.intel.com/technology/efi/
http://developer.apple.com/library/mac/#technotes/tn2006/tn2166.html
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.35.y.git;a=blob;f=fs/partitions/efi.h;hb=HEAD
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.35.y.git;a=blob;f=fs/partitions/efi.c;hb=HEAD

svn path=/trunk/; revision=49212
2010-10-19 20:34:48 +00:00
Sir Richard b238bc9126 [NTOS]: Go back to using RosMm for the NLS section since supposedly this causes issues on some systems. This is the only actual change in r206/208/209, so if Caemyr's data is correct, this fill fix it.
svn path=/trunk/; revision=49211
2010-10-19 20:23:37 +00:00
Pierre Schweitzer 60501a925e [DISK]
Hackplemented support for IOCTL_DISK_GET_PARTITION_INFO_EX. It will work fine for MBR partitions but will fake returns for GPT partitions.

svn path=/trunk/; revision=49210
2010-10-19 19:27:28 +00:00
Sir Richard 6f48b81057 [NTOS]: Fix multiple math/logic bugs in the PrototypePTE paths. Caught while trying to switch the Win32k GDI Handle Table to ARM3 sections.
svn path=/trunk/; revision=49209
2010-10-19 18:57:30 +00:00
Sir Richard ef6bc56d6f [NTOS]: C Pointer Math will bite even the most experienced programmer in the ass. Fix wrong calculation which led to ASSERTs and memory corruption (since the last revision).
svn path=/trunk/; revision=49208
2010-10-19 17:39:22 +00:00
Sir Richard 3e8034d4a5 [NTOS]: Add support for unmapping ARM3 sections, destroying segments and control areas, and clearing out subsection PTEs.
[NTOS]: Add support to MiDeletePte/MiDeleteVirtualAddresses to handle Section VADs.
[NTOS]: Add support to MiDeletePte to handle valid, prototype PTEs.
[NTOS]: Add MEM_TOP_DOWN support to ARM3 section code.
[NTOS]: Add support for unmapping currently mapped ARM3 section views at process termination.
[NTOS]: Use the new ARM3 section code for mapping the NLS section in the system (tests the system-view mapping code) and in each new process (tests the data-mapping code). Section is correctly unmapped at process termination time!

svn path=/trunk/; revision=49206
2010-10-19 17:07:11 +00:00
Sir Richard 20d602d71f [NTOS]: Use allocation attribute 0x1 instead of 0xC0000000 to let RosMm know this is an ARM3 section. 0xC0000000 is actually a valid combination of SEC_ flags, 0x1 is illegal and thus recognized.
svn path=/trunk/; revision=49205
2010-10-19 17:01:28 +00:00
Sir Richard 785baaf68e [NTOS]: Implement the MAREA<->VAD hack for section VADs as well.
svn path=/trunk/; revision=49204
2010-10-19 17:00:12 +00:00
Sir Richard a0cd959fc1 [NTOS]: Get rid of MC_NPPOOL and MC_PPOOL memory consumers since those are not managed by RosMm anymore. Use MC_SYSTEM for the page table stuff that RosMm still handles, and keep MC_USER and MC_CACHE for the current Section/VirtualMemory/Cache RosMm code.
svn path=/trunk/; revision=49203
2010-10-19 16:58:27 +00:00
Sir Richard 24811e9233 [NDK]: Add MMVAD_SHORT.
svn path=/trunk/; revision=49202
2010-10-19 16:57:20 +00:00
Sir Richard 52d26f0643 [NTOS]: Implement MiDecrementReferenceCount and rewrite large parts of the ProbeAndLock/Unlock MDL API to fully use ARM3 APIs, dropping MmReference/DereferencePage behind.
[NTOS]: Fix many MDL API bugs: correctly check for I/O pages, use LIST_HEAD instead of -1, track system-wide locked pages, use the process working set lock instead of the address space lock, add check for cross-ring MDL mappings, and make some small optimizations.
[NTOS]: Make some more fixes in MmAllocatePagesForMdl, MmFreeMdlPages to make the PFN entries more "correct".
[NTOS]: Had a little breakthrough: instead of complicating our lives and hiding certain ReactOS-Mm fields inside legitimate ARM3/MMPFN fields, differentiate between "legacy" (RosMm) and ARM3 pages. The legacy allocator (MmAllocPage/MmRequestPageMemoryConsumer) will use the non-paged pool to allocate a MMROSPFN add-on (8 bytes), in which the RMAP list head and SWAPENTRY are stored. When a legacy "free" is done, this data is deleted. Additionally, we can now tell apart between ARM3 and RosMm pages, so appropriate ASSERTs have been added to make sure the two never cross paths (which should safely let us use all the PFN fields now and implement working sets, etc...). I don't know why I didn't think of this sooner.

svn path=/trunk/; revision=49201
2010-10-19 04:30:48 +00:00
Sir Richard 609dce9faf [NTOS]: Clean up Mm initialization, there is now no-more RosMM stuff done in Phase 0 of MmInit, only ARM3 runs. The kernel address space and memory areas are only initialized in Phase 1, because that's where sections are started up, and they're the only thing other than VM which still use memory-areas.
svn path=/trunk/; revision=49200
2010-10-18 23:07:09 +00:00
Johannes Anderwald 619ab27e1d [KS]
- Fix KSPROPERTY_PIN_CATEGORY handler when no category is provided
- Fix KSPROPERTY_PIN_NAME handler when there is no name provided. Use fallback pin category. If there is no category provided, fail with correct error code
- Fix KSPROPERTY_TOPOLOGY_NAME handler by checking if there is a node name provided. If not use node type as fallback.
- Return correct error code when property request id is out of bounds

svn path=/trunk/; revision=49199
2010-10-18 22:21:00 +00:00
Johannes Anderwald 54374ca72e [PORTCLS]
- Store Miniport object in the device descriptor
- Fixes assert in NVidia NForce Audio Driver

svn path=/trunk/; revision=49198
2010-10-18 18:59:17 +00:00
Sir Richard 32ccfc25bf [NTOS]: Remove the "35314 sginsberg /* REACTOS Mm Hack of Doom */". Apocalypse averted?
svn path=/trunk/; revision=49196
2010-10-18 14:34:35 +00:00
Sir Richard ba0bd37078 [NTOS]: Remove the Bavarian hack, I no longer think it is needed.
svn path=/trunk/; revision=49195
2010-10-18 14:29:05 +00:00
Sir Richard a81f92c1cb [NTOS]: Store the protection mask in the Fake VADs as well, we can read/convert this from the MAREA protection value.
[NTOS]: Reimplement NtQueryVirtualMemory to use VAD information instead. Even though Alloc/Free are still MAREA-based, the fake VADs we build ought to be enough to make the query API work for certain limited scenarios. Only some paths are implemented and it's lacking SEH, but it's good enough for the install/boot requirements. If there are any regressions, please file bugs.

svn path=/trunk/; revision=49194
2010-10-18 14:25:33 +00:00
Sir Richard 26c20f3857 [NTOS]: Complete the VAD-to-MAREA Synchronization hack by removing fake MAREAs that were added when inserting real VADs. To do this, we have to track the fake MAREA associated with a VAD, so we overload the FirstProtoTypePte field in the VAD, if this is NOT a section VAD (which we don't use yet). We'll figure something out for section VADs later.
[NTOS]: Now that VAD and MAREA views are synchronized, remove the VAD limit and let VADs be created at any address. Also do not create an arbitrary 16MB VAD memory area anymore. This basically now allows for as many PEB/TEBs as can fit in the address space, fixing the recent known regression that limited the number of threads a process could have.

svn path=/trunk/; revision=49193
2010-10-18 13:10:54 +00:00
Johannes Anderwald 7c151f3f05 [WDMAUD.DRV]
- Kernel streaming pins need to transit states from Run -> Pause -> Acquire -> Stop.
- Fixes SB Live playback hang on last tone when stopping playback

svn path=/trunk/; revision=49191
2010-10-17 22:38:34 +00:00
Johannes Anderwald 5542d91941 [MMIXER]
- Apply a hack to filter out pins, which are not part of filter node processing path
- The hack filters out all pins which have a physical connection. Ideally the code should check if the pin is part of a different rendering path and in that case remove the pin. 
- Revert 49167

svn path=/trunk/; revision=49189
2010-10-17 21:15:21 +00:00
Sir Richard 068812254c [NTOS]: Fix brainfart (an interesting bug we would've never hit, but a bug nevertheless).
svn path=/trunk/; revision=49188
2010-10-17 20:11:04 +00:00
Sir Richard 84328d78db [NTOS]: Use MI_SET_PFN_DELETED where we missed it.
[NTOS]: Implement support for deleting user-mode pageable VM addresses. Now when cleaning up the process address space, MiDeleteVirtualAddresses is called for the VADs, so this will now actually free the PEB/TEB pages that were previously getting leaked for each thread/process (a known regression I introduced when moving to VADs for PEB/TEB).

svn path=/trunk/; revision=49187
2010-10-17 20:02:17 +00:00
Sir Richard 3910f94f4a [NTOS]: Handle faults on non-demand-zero PTEs (and/or demand-zero PTEs that are not READWRITE (such as EXECUTE_READWRITE)).
svn path=/trunk/; revision=49186
2010-10-17 19:56:04 +00:00