- Fix reset event handling in cases where reset does not end up in a new device created
- My MacBook Pro completes USB initialization free of hangs now (usbstor disabled)
svn path=/trunk/; revision=55852
- Handle errors returned from the HCD correctly
[USBEHCI]
- Discard any changes on ports that were given to the companion controller
svn path=/trunk/; revision=55851
- Fix reset port sequence #2
- Clear unwanted bits
- Fix wait time as in spec
- Wait max 500ms for the reset bit to clear, otherwise restart the reset sequence
- Check if work item is currently queued
svn path=/trunk/; revision=55849
- Fix the Live CD regression (RBuild only - The irony is not lost on me) caused by r55555
- There is another regression that still prevents booting though
svn path=/trunk/; revision=55846
- Properly create the WindowStations directory in NtUserInitialize. Now we take into account the fact that if we are not in session 0, it should be created in \Sessions direcory
- Clean up IntParseDesktopPath and make it use the correct WindowStations
- Add some comments and cleanup
- Remove the unused IntGetFullWindowStationName, IntGetWindowStationObject and IntGetWinStaObj
svn path=/trunk/; revision=55841
- Remove nasty hack to make Windows PCI driver load. This may not be required after the fixes that were committed after this hack. If it is still necessary then please fix whatever issue makes the PCI driver crash instead of relying on a return from bugcheck call to work...
[DDK]
- Mark KeBugCheckEx as noreturn again. Should fix Prefast issues where it thought execution could return from the call and would warn about false issues.
svn path=/trunk/; revision=55840
- Specify C4700 (uninitialized variable usage) to cause an error on compile as this is very likely to result in broken code.
[NTDLL]
- Disable ASSERT in LdrpSearchPath that could be reading an uninitialized variable. The routine is not fully implemented so this should likely be re-enabled once it is.
[BROWSEUI]
- Add missing call to BuildRebarBandInfo, or we would end up with an unitialized variable sent to SendMessage.
[PCIX]
- Fix broken ASSERT
- Fix usage of wrong (and uninitialized) variable in the Unicode case for PciGetDescriptionMessage.
[DDK]
- Prepend "_" to local variable of NdisChainBufferAtBack. Fixes code in ndisuio that called this using the same name as the macro's variable (which resulted in NdisChainBufferAtBack assigning the variable to itself).
[WIN32K]
- Fix WinPosShowIconTitle that checked if a variable was NULL before assigning it to anything.
svn path=/trunk/; revision=55834
A reintegration checkpoint for the NewCC branch, brought to you by Team NewCC.
Differences with current ReactOS trunk:
* A new memory area type, MEMORY_AREA_CACHE, is added, which represents a mapped region of a file. In NEWCC mode, user sections are MEMORY_AREA_CACHE type as well, and obey new semantics. In non-NEWCC mode, they aren't used.
* A way of claiming a page entry for a specific thread's work is added. Placing the special SWAPENTRY value MM_WAIT_ENTRY in a page table, or in a section page table should indicate that memory management code is intended to wait for another thread to make some status change before checking the state of the page entry again. In code that uses this convention, a return value of STATUS_SUCCESS + 1 is used to indicate that the caller should use the MiWaitForPageEvent macro to wait until somebody has change the state of a wait entry before checking again. This is a lighter weight mechanism than PAGEOPs.
* A way of asking the caller to perform some blocking operation without locks held is provided. This replaces some spaghettified code in which locks are repeatedly taken and broken by code that performs various blocking operations. Using this mechanism, it is possible to do a small amount of non-blocking work, fill in a request, then return STATUS_MORE_PROCESSING_REQUIRED to request that locks be dropped and the blocking operation be carried out. A MM_REQUIRED_RESOURCES structure is provided to consumers of this contract to use to accumulate state across many blocking operations. Several functions wrapping blocking operations are provided in ntoskrnl/cache/reqtools.c.
* Image section pages are no longer direct mapped. This is done to simplify consolidation of ownership of pages under the data section system. At a later time, it may be possible to make data pages directly available to image sections for the same file. This is likely the only direct performance impact this code makes on non-NEWCC mode.
RMAPs:
* A new type of RMAP entry is introduced, distinguished by RMAP_IS_SEGMENT(Address) of the rmap entry. This kind of entry contains a pointer to a section page table node in the Process pointer, which in turn links back to the MM_SECTION_SEGMENT it belongs to. Therefore, a page belonging only to a segment (that is, a segment page that isn't mapped) can exist and be evicted using the normal page eviction mechanism in balance.c. Each of the rmap function has been modified to deal with segment rmaps.
* The low 8 bits of the Address field in a segment rmap denote the entry number in the generic table node pointed to by Process that points to the page the rmap belongs to. By combining them, you can determine the file offset the page belongs to.
* In NEWCC mode, MmSharePageEntry/UnsharePageEntry are not used, and instead the page reference count is used to keep track of the number of mappings of a page, allowing the last reference expiring to allow the page to be recycled without much intervention. These are still used in non-NEWCC mode. One change has been made, the count fields have been narrowed by 1 bit to make room for a dirty bit in SSE entries, needed when a page is present but unmapped.
Section page tables:
* The section page tables are now implemented using RtlGenericTables. This enables a fairly compact representation of section page tables without having the existence of a section object imply 4k of fake PDEs. In addition, each node in the generic table has a wide file offset that is a multiple of 256 pages, or 1 megabyte total. Besides needing wide file offsets, the only other visible change caused by the switch to generic tables for section page tables is the need to lock the section segment before interacting with the section page table.
Eviction:
* Page eviction in cache sections is accomplished by MmpPageOutPhysicalAddress. In the case of a shared page, it tries to remove all mappings of the indicated page. If this process fails at any point, the page will simply be drawn back into the target address spaces. After succeeding at this, if TRUE has been accumulated into the page's dirty bit in the section page table, it is written back, and then permanently removed.
NewCC mode:
* NEWCC mode is introduced, which rewrites the file cache to a set of cache stripes actively mapped, along with unmapped section data.
* NewCC is more authentic in its interpretation of the external interface to the windows cache than the current cache manager, implementing each of the cache manager functions according to the documented interface with no preconceived ideas about how anything should be implemented internally. Cache stripes are implemented on top of section objects, using the same memory manager paths, and therefore economizing code and complexity. This replaces a rather complicated system in which pages can be owned by the cache manager and the memory manager simultaneously and they must cooperate in a fairly sophisticated way to manage them. Since they're quite interdependent in the current code, modifying either is very difficult. In NEWCC, they have a clear division of labor and thus can be worked on independently.
* Several third party filesystems that use the kernel Cc interface work properly using NEWCC, including matt wu's ext3 driver.
* In contrast with code that tries to make CcInitializeCacheMap and CcUninitializeCacheMap into a pair that supports reference counting, NEWCC lazily initializes the shared and private cache maps as needed and uses the presence of a PrivateCacheMap on at least one file pointing to the SharedCacheMap as an indication that the FILE_OBJECT reference in the SharedCacheMap should still be held. When the last PrivateCacheMap is discarded, that's the appropriate time to tear down caching for a specific file, as the SharedCacheMap data is allowed to be saved and reused. We honor this by making the SharedCacheMap into a depot for keeping track of the PrivateCacheMap objects associated with views of a file.
svn path=/trunk/; revision=55833
- Delay for the correct amount of time when performing a global reset and a port reset
- Loosen the loop timings a bit to allow for more time for real hardware to complete start/stop/reset
- Clear only the change bits that were set and handle both bits in the either case
- Perform a synchronous callback when the reset completes
svn path=/trunk/; revision=55832
- OHCI -> UHCI
- Implement timer routine which checks for new detected devices. In case a port change is detected, the sce callback routine is invoked
svn path=/trunk/; revision=55828
- Reenable and fix the correct reset code
[HIDCLASS]
- Disable removal of PDOs due to IRP cancellation issues
[USBEHCI][USBOHCI][USBUHCI]
- Disable removal of FDOs due to reinitialization issues
svn path=/trunk/; revision=55827
- Print interface details when dumping the function descriptor
- Fix bug USBCCG_AppendInterfaceNumber, which is not yet used
svn path=/trunk/; revision=55825
Some misc fixes to make kernel compile warning-free with /W3. Also fix a bug that completely broke the ProcessWx86Information case for NtQueryInformationProcess by missing to reference/dereference and acquiring the specified process' EPROCESS.
svn path=/trunk/; revision=55815
- Do not depend on argument evaluation order and thus uninitialized values. Sent and applied upstream. Dedicated to Stefan
svn path=/trunk/; revision=55814
[DDK]
- ndis.h Don't use local variables with the same name as function parameters.
[PSDK]
- access.idl Remove incorrect annotation
- usbioctl.h Not really a Prefast issue, but switch to use ANYSIZE_ARRAY like we do everywhere else.
- winddi.h EngQueryDeviceAttribute's 6th parameter is IN, not OUT
- winefs.h Fix FileEncryptionStatus to use annotations. Its definition in winbase.h already has them and this caused a conflict.
[WINE]
- debug.h Remove unnecessary check (in ReactOS) that made Prefast sad.
- test.h Disable a false-positive C28182.
svn path=/trunk/; revision=55813
- Detect the size of the configuration descriptor before obtaining the full configuration descriptor
- Fix integer overflow in BuildTransferDescriptorChain
svn path=/trunk/; revision=55810
- Queue dpc when the interrupt indicates completion of a transfer or an error interrupt
- Implement checking if a queue head is complete
- Free queue heads and associated endpoint descriptors
svn path=/trunk/; revision=55809
- Write the configure bit
- Clear connection change and port suspend bit when set after controller initialization
- Queue work item after the reset port is complete
- Disable port before reseting it
- Wait time for reset is 50ms, not 25ms
- Clear reset change bit when clearing reset feature
- Implement enabling port feature
svn path=/trunk/; revision=55806
- Fix use of uninitialized variables in failure case of RtlSetCurrentDirectory_U. CID 15339, 15340
- Handles should be NULL, not 0
svn path=/trunk/; revision=55805
- When deleting an old page file, take the newly freed space into account
- Keep at least 64 MB of disk free instead of 32 so that 2nd stage can succeed with a small disk
- Miscellaneous fixes and simplifications in the page file code
svn path=/trunk/; revision=55803
[KERNEL32]: Enable support for asynchronous I/O callbacks with SxS/Fusion activation context support. Right now only added to the file Change notification APIs, but ReadFileEx and WriteFileEx should use them too.
svn path=/trunk/; revision=55801