- Added numerous structures required for Asynchronous Lists used to communicate with controller. Needs much more work.
- Implement initial retrieving Device and String Descriptors from USB devices.
- Fixed improper handling of Queued IRPs that was causing crashes.
- For now, always queue the Irp if the request is a Urb of type Get Descriptor.
- Reorganized code to trim down source files.
svn path=/trunk/; revision=45017
[NTOS]: Implement Trap 7 and 16 in C. These are the last two FPU/NPX traps. Not really good with x86 FPU stuff, so there might be some mistakes to look over later.
[NTOS]: Fixed a bug in Trap 19 handler (forgot to write CR0 back).
svn path=/trunk/; revision=45014
- Add corrected behavior for SetWindowRgn, delete region object after setting windows region. See bug 4980.
- After a successful call to SetWindowRgn, the system owns the region specified by the region handle hRgn. The system does not make a copy of the region. Thus, you should not make any further function calls with this region handle. In particular, do not delete this region handle. The system deletes the region handle when it no longer needed.
- References : http://msdn.microsoft.com/en-us/library/dd145102(VS.85).aspx
svn path=/trunk/; revision=45013
[NTOS]: Fix a bug in the assertion handler.
[NTOS]: Implement page fault trap (14) in C instead of ASM.
[NTOS]: Implement V8086 trap entry/exit, we were hitting these during page faults in Ke386CallBios for video reset during GUI boot.
svn path=/trunk/; revision=45005
[NTOS]: Convert Trap 0, 1, 3, 4, 5, 8, 10, 11, 12, 15, 17, 2C (Assertion) and 2D (Debug) to C. Tested INT3 and still works as expected, and obviously DbgPrint is still functionning (0x2D). The other traps are mainly programming errors such as bound overflow or integer overflow, so we need some test cases, but they should work. Note the 3-4 lines of C for what used to be dozens of ASM lines.
[NTOS]: Fix infinite loop in KiCheckForApcDelivery.
Stefan Ginsberg: Could you please implement the relevant Extended GCC ASM into MSVC?
svn path=/trunk/; revision=45002
[NTOS]: The kernel normally does not save FPU state during Ring 0 transitions since the FPU should not be used. The one exception is when a kernel debugger is attached. Unfortunately, the latter check in ReactOS results in even "print on the serial line" to count as "debugger attached", and thus FPU state was almost always saved, slowing down traps significantly.
[NTOS]: The kernel also does not typically save DRx (debug) registers unless they were in use. During an exception dispatch, they are zeroed out, and later during trap exit, if any debug register is set, DR7 is updated to enable that hardware breakpoint. Unfortunately, the code to clear the debug registers had a bug: DR2 was never cleared. Because DR2 ended up being a random stack value during trap frame generation, this caused a bogus address to be added to DR2, and DR7 would then enable the 2nd hardware breakpoint. This caused the kernel to always save DRx state, which is slow, and worse, could cause random hardware breakpoints to fire.
[NTOS]: Start implementing trap handling in C. ASM trap handlers will now only be 5 lines of assembly including a function call to a C handler. All C handling code uses maximum two arguments and is all FASTCALL for efficiency.
[NTOS]: Implement C versions of TRAP_PROLOG and TRAP_EPILOG. Implement C version of Ki386EoiHelper. Implement C version of CommonDispatchException (and helper) and KiFatalSystemException. Implement C version of CHECK_FOR_APC_DELIVER. Implement trap debugging checks as a separate entity instead of always doing them.
[NTOS]: Add missing intrinsics for DS/ES/GS segment query.
The kernel is now ready for some trap handling to be done in C. Due to the FPU/Debug fixes and relaxation of paranoid debug checks, the C code will likely be faster than the original assembly.
svn path=/trunk/; revision=45000
- Initial implementation of usbehci, aka USB 2.0.
- Implement AddDevice, StartDevice, InterruptService and DPC Routines.
- Implement basic IRP queuing and handling.
- Implement starting, stopping of EHCI controller and querying port capabilities.
- Implement PNP for Query Relations, Query ID, Query BusInfo.
- Implement finding the active ports when USB devices are attached and releasing control to companion controller if devices is not a high speed devices.
- Implement reporting devices connects to upper Pdo (hub) driver.
- Hub driver attaches successfully and sends URBs to query descriptors from USB devices on Windows.
- Currently not build enabled as it will cause problems with current UsbDriver in trunk.
- Code heavily based on current PCI drivers and UsbDriver from trunk.
svn path=/trunk/; revision=44993
- Document PIT access modes, channels and operating modes.
- Rewrite HalHandleNMI to use the System Control Port definitions instead of magic values that were never explained.
- Rewrite HalMakeBeep not to program the PIT with magic hexadecimal values that were not explained anywhere and seem dubious.
- Fix the PIT frequency to match its correct value of ~1.19318MHz which is what every x86 book states and what Linux and all other operating systems use. This is equivalent to one third of the NTSC color burst (subcarrier frequency) used on CGA computers for video output. Previously, the HAL used 1.193167MHz, which is only used by NT and isn't documented anywhere, and in fact appears to be a typo in the NT sources (a less accurate way of dividing the NTSC color burst gives 1.19318167MHz). Somehow, the ReactOS developer of this function must have made the same "typo", by complete coincidence, of course.
- Rewrite part of HalpInitializeClock to use the new definitions. This function was at least somewhat documenting the magic values.
svn path=/trunk/; revision=44991
- Patch by James Hawkins : Don't try to free a handle with a value of 1, which is the dde handle value for asynchronous operations.
- Will sync to wine after a review of new WOW implementation.
svn path=/trunk/; revision=44989
- Patch by Marcus Meissner : Remove useless NULL check (Coverity).
- Will sync to wine after a review of new WOW implementation.
svn path=/trunk/; revision=44988
- Patch by Marcus Meissner : EM_REPLACESEL Handle OOM error.
- Will sync to wine after a review of new WOW implementation.
svn path=/trunk/; revision=44987
- Rewrite SetCursorPos and ShowCursror
- Store coursor show count in SYSTEM_CURSORINFO and not in GDIPOINTER
- Fix broken behaviour in ClipCursor
svn path=/trunk/; revision=44975
- Fully implement stopping all dependent services
- When stopping a service, only list other running services which require stopping
- Use the same progress dialog for stopping multiple services and make it smoother
svn path=/trunk/; revision=44961
- Switch to wine debug macros. Add new debug channel spoolsv.
- Update service status when the service receives a control message.
svn path=/trunk/; revision=44960
Merge from amd64 branch:
34780 some DWORD -> DWORD_PTR (Timo Kreuzer)
34781 fix usage of InterlockedCompareExchangePointer (Timo Kreuzer)
34782 fix usage of InterlockedCompareExchangePointer (Timo Kreuzer)
34908 some 64 bit fixes in win32k (Timo Kreuzer)
34909 some more win32k 64 bit fixes (Timo Kreuzer)
34965 Fix typos. (Samuel Serapión)
41479 Remove usage of RETURN() macro (Timo Kreuzer)
41540 Make parameters for NtUserCallOneParam and NtUserCallTwoParam DWORD_PTR instead of DWORD (Timo Kreuzer)
41546 Add _FLOATOBJ_GetFix for non-x86 (Timo Kreuzer)
41547 Only export FLOATOBJ_* api on x86 (Timo Kreuzer)
44238 Fix some 64 bit isues. (Timo Kreuzer)
43969 undefine i386 in the pspec file (Timo Kreuzer)
svn path=/trunk/; revision=44956