Commit graph

50465 commits

Author SHA1 Message Date
Amine Khaldi 04e46d06af [CMAKE]
* Get GCC version and add some compiler flags conditionally based on it. Dedicated to Dmitry.

svn path=/trunk/; revision=55870
2012-02-25 22:01:20 +00:00
Amine Khaldi 183b2632a2 * Delete unused startup code.
svn path=/trunk/; revision=55869
2012-02-25 21:48:43 +00:00
Dmitry Gorbachev 1550726927 [FREELDR][NTOSKRNL][TOOLS]
- Delete unused files.
- Use extension LDS instead of LNK (Windows shortcut file) for LD linker scripts.

svn path=/trunk/; revision=55868
2012-02-25 21:45:56 +00:00
Cameron Gutman aeac841aa8 [USBSTOR]
- Fix corruption of SCSI read format capacity by writing the LUN to the wrong location

svn path=/trunk/; revision=55867
2012-02-25 21:18:17 +00:00
Kamil Hornicek 3db7e1b78c Fix build?
svn path=/trunk/; revision=55866
2012-02-25 21:09:28 +00:00
Sir Richard ca1f0374ab [NTOS]: Implementation of the "Generic DPC" functionality from Windows NT 5.2, which is a forced-synchronization all-CPU DPC callback mechanism. Implemented, and exported all APIs requireted, and added to NDK. NOTE: This implementation only works for Single Processor systems (NT_UP) since this is all that ReactOS currently works on.
This is needed for poolmon/querying pool tags.

svn path=/trunk/; revision=55865
2012-02-25 20:40:06 +00:00
Alex Ionescu 2a87bcea2b [NDK]: Add missing type to NDK.
svn path=/trunk/; revision=55864
2012-02-25 20:38:20 +00:00
Alex Ionescu b90bb9d570 [CSRSRV]: Quiet, you!
svn path=/trunk/; revision=55863
2012-02-25 20:31:28 +00:00
Giannis Adamopoulos 23c1c259f0 [win32k]
- move wallpaper info from WINSTATION_OBJECT to SPIVALUES. Also remove some unused fields from WINSTATION_OBJECT

svn path=/trunk/; revision=55862
2012-02-25 20:06:15 +00:00
Pierre Schweitzer f1838c9108 [USER32]
Correct user32 japanese translation (and fix build as well)

svn path=/trunk/; revision=55861
2012-02-25 19:28:00 +00:00
Amine Khaldi f17583a648 [SHELL32]
* Misses these.

svn path=/trunk/; revision=55860
2012-02-25 19:02:49 +00:00
Amine Khaldi acf789af2a [SHELL32]
* Prefix the local version.h and version.rc with shell32_.
* Include the rgs resource files in a portable way.

svn path=/trunk/; revision=55859
2012-02-25 18:52:16 +00:00
Sir Richard a62fbc4a47 [NTOS]: Compute the size of, and allocate, the Pool Tracker Table and the Big Page Tracker Table, which are the core data structures that make pool tagging functionality work.
svn path=/trunk/; revision=55858
2012-02-25 18:51:21 +00:00
Giannis Adamopoulos bde6f12e52 [win32k]
- null terminate DesktopObject->pDeskInfo->szDesktopName and WindowStationObject->Name
- null terminate the buffer when NtUserGetObjectInformation is called with UOI_NAME parameter
- should fix a random failure in user32:desktop tests

svn path=/trunk/; revision=55857
2012-02-25 18:26:05 +00:00
Amine Khaldi 7d3f5052d0 * Addendum to r55855.
svn path=/trunk/; revision=55856
2012-02-25 17:23:58 +00:00
Amine Khaldi 818418643e * Rbuild, our build system, has served us well so far, but its usefulness has since been vastly overshadowed by its awfulness. It's time to fix it.
svn path=/trunk/; revision=55855
2012-02-25 17:23:37 +00:00
Eric Kohl 0fa8a3b725 [RTL]
Formatting, no code changes.

svn path=/trunk/; revision=55854
2012-02-25 15:20:32 +00:00
Cameron Gutman 11c95e90a7 [USBEHCI]
- Create a macro for properly checking for low speed devices
- Check again for a low speed device after the EHCI reset completes
- Don't ignore status changes on ports that we have released (revert part of r55851)

svn path=/trunk/; revision=55853
2012-02-25 06:23:12 +00:00
Cameron Gutman 266e31d825 [USBHUB]
- 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
2012-02-25 05:46:19 +00:00
Cameron Gutman c14c8d7ef4 [USBHUB]
- 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
2012-02-25 04:45:30 +00:00
Cameron Gutman 7991e67594 [USBEHCI]
- More EHCI reset fixes and general code cleanup

svn path=/trunk/; revision=55850
2012-02-25 04:27:39 +00:00
Johannes Anderwald 7d6c0c114c [USBEHCI]
- 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
2012-02-25 03:28:17 +00:00
Cameron Gutman b4d2570c4b [USBOHCI]
- Implement per-port power control

svn path=/trunk/; revision=55848
2012-02-25 02:20:15 +00:00
Johannes Anderwald 494fa29ffa [USBCCGP]
- Formatting, no code changes

svn path=/trunk/; revision=55847
2012-02-25 00:35:40 +00:00
Cameron Gutman e188a743cb [INF]
- 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
2012-02-25 00:34:48 +00:00
Cameron Gutman 0e05873866 [USBOHCI]
- Fix a broken assertion and print out the alignment mask and HCCA pointer

svn path=/trunk/; revision=55845
2012-02-24 23:14:19 +00:00
Cameron Gutman 17b865ebc2 [USBOHCI]
- Fix various initialization bugs

svn path=/trunk/; revision=55844
2012-02-24 23:05:22 +00:00
Johannes Anderwald d9f4f1b411 [USBUHCI]
- Invert data toggle

svn path=/trunk/; revision=55843
2012-02-24 17:58:55 +00:00
Giannis Adamopoulos 419f51fd4c [win32k]
-remove unrelated and unused information from the WINSTATION_OBJECT

svn path=/trunk/; revision=55842
2012-02-24 15:32:13 +00:00
Giannis Adamopoulos 5bd20ac181 [win32k]
- 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
2012-02-24 15:22:11 +00:00
Stefan Ginsberg f1d41e1808 [NTOSKRNL]
- 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
2012-02-24 13:51:52 +00:00
Art Yerkes b10383d1ff [NEWCC]
Integrate september's speed improvements, which now work.
Remove the flush hack when unpinning cache segments.

svn path=/trunk/; revision=55839
2012-02-24 11:33:23 +00:00
Daniel Reimer e81ed04aa0 Update for rapps
svn path=/trunk/; revision=55838
2012-02-24 10:33:06 +00:00
Art Yerkes 3e19b0bab3 [NEWCC]
Update used page table entry counts when mapping pages in cache sections.

svn path=/trunk/; revision=55837
2012-02-24 10:05:06 +00:00
Cameron Gutman 34136e69cf [USBOHCI]
- Try to fix some real hardware OHCI initialization hangs

svn path=/trunk/; revision=55836
2012-02-24 07:26:43 +00:00
Dmitry Gorbachev 6ebf8c2537 [FREELDR][NTOSKRNL]
Update linker scripts.

svn path=/trunk/; revision=55835
2012-02-23 18:59:24 +00:00
Stefan Ginsberg cd616fb1b2 [CMAKE]
- 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
2012-02-23 13:06:11 +00:00
Amine Khaldi e14f67f95d [NEWCC]
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
2012-02-23 12:03:06 +00:00
Cameron Gutman 8cf1d52f96 [USBUHCI]
- 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
2012-02-23 05:27:24 +00:00
Johannes Anderwald 62517e4042 [USBUHCI]
- Remove left-over assert
- Remove dead code
- Enable port after reset

svn path=/trunk/; revision=55831
2012-02-23 05:07:07 +00:00
Johannes Anderwald 36bbd6f1a1 [USBUHCI]
- Fix initialization bugs in real hardware

svn path=/trunk/; revision=55830
2012-02-23 03:22:57 +00:00
Johannes Anderwald 03ac0279e8 [HIDCLASS] [USBUHCI]
- Silence traces

svn path=/trunk/; revision=55829
2012-02-23 01:51:55 +00:00
Johannes Anderwald 3d22956ff8 [USBUHCI]
- 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
2012-02-23 01:27:19 +00:00
Cameron Gutman a982c0c4c9 [NTOSKRNL]
- 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
2012-02-23 01:23:30 +00:00
Cameron Gutman 8afc22a95d [NTOSKRNL]
- Fix device node flag corruption

svn path=/trunk/; revision=55826
2012-02-23 00:41:50 +00:00
Johannes Anderwald fc053ddc31 [USBCCGP]
- Print interface details when dumping the function descriptor
- Fix bug USBCCG_AppendInterfaceNumber, which is not yet used

svn path=/trunk/; revision=55825
2012-02-23 00:37:41 +00:00
Johannes Anderwald 5f9384fd6f [HIDPARSE]
- Fix several wrong translated scan codes

svn path=/trunk/; revision=55824
2012-02-23 00:35:46 +00:00
Johannes Anderwald 488d2d353b [HIDCLASS]
- Silence traces
- Signal event when last pending transfer is done
- Reject new transfers when stop is in progress

svn path=/trunk/; revision=55823
2012-02-23 00:34:36 +00:00
Cameron Gutman e8ad1a668c [USBUHCI]
- Add rbuild file and enable build

svn path=/trunk/; revision=55821
2012-02-22 23:35:11 +00:00
Johannes Anderwald 4b02150831 [USBUHCI]
- Silence traces
- Implement abort pipe
- Implement support for interrupt transfers

svn path=/trunk/; revision=55820
2012-02-22 23:24:53 +00:00