Commit graph

21928 commits

Author SHA1 Message Date
Alex Ionescu c8c71fcd5c - Implement Chained and Normal generic interrupt handlers.
- Make generated handlers have a proper .func symbol for symbol data.
- Make IDT writable, the page shouldn't be read-only.
- Change some symbol names.

svn path=/trunk/; revision=23676
2006-08-24 01:53:54 +00:00
Aleksey Bragin b899ba11ba - Add a new level of debug verbosity
- Fix a bunch of warnings by Thomas and me

svn path=/trunk/; revision=23675
2006-08-23 22:17:09 +00:00
Alex Ionescu 5870fa3d6c - Enable the code in KeInitializeInterrupt that copies the Interrupt Template to the KINTERRUPT object and modifies the template pointer to point to the KINTERRUPT.
- Add the template code in trap.s.

svn path=/trunk/; revision=23674
2006-08-23 19:02:00 +00:00
Alex Ionescu abe9e92dcf - Get rid of some large debugging functions that were called at all times, and don't manually deliver user APCs anymore, since the HAL handles it now.
svn path=/trunk/; revision=23673
2006-08-23 18:09:44 +00:00
Alex Ionescu da725d9d30 - Fix some bugs in INT_PROLOG so that it can be used in cases like Unexepcted interrupts, where we don't want to push a fake error code, and want to use our own parameter.
svn path=/trunk/; revision=23672
2006-08-23 18:02:52 +00:00
Hervé Poussineau daedfda3d4 Allow to change more easily the prefix of remote interface functions in services.exe
This is a step to share this file with Samba-TNG
Thanks to Elrond from Samba-TNG for help

svn path=/trunk/; revision=23671
2006-08-23 17:57:34 +00:00
Alex Ionescu c0ad9f32d3 - [AUDIT] After spending some time looking at the current HAL, I believe it to be clean and written by authors which had knowledge of system internals and have always used clean-rooming. As well, the difference in implementation, complete and utter incompatibility with NT as well as the presence of some Linux-based code confirms this.
- Fix function definitions of HalQueryRealTimeClock, HalGetEnvironmentVariable. They were defined in the NDK in one way, but implemented another way, and since the HAL didn't include its own NDK file, the compiler didn't realize this. Calls of these functions might've experienced serious problems.
- Also fix HalHandleNmi and HalInitSystem definitions.
- Add stub code to actually setup the Clock Interrupt.

svn path=/trunk/; revision=23670
2006-08-23 17:28:39 +00:00
Alex Ionescu 8401f43ab0 - Switch PRIMARY_VECTOR_BASE to 0x30 instead of 0x40, as it should be.
svn path=/trunk/; revision=23669
2006-08-23 16:58:43 +00:00
Aleksey Bragin 7ad1947410 - Unmess header files a little - create one header file (usbdriver.h) which includes all other needed headers, also splitting a bit.
Also split out the roothub driver and device manager from hub.c (which was over 4500 SLOC)
- Enable PCH usage
- Reduced a few warnings

svn path=/trunk/; revision=23668
2006-08-23 12:36:08 +00:00
Aleksey Bragin edaf50a0e7 Add accidentally deleted line (a call to WideCharToMultiByte() )
svn path=/trunk/; revision=23667
2006-08-23 08:24:37 +00:00
Alex Ionescu 4ade91ae66 - Kill two more hacks. IDR isn't hacked at 0xFFFFFFA on startup anymore, and the PIC is correctly set to 0xFA at startup.
svn path=/trunk/; revision=23666
2006-08-23 06:59:11 +00:00
Alex Ionescu 7fa6c080b5 - Enable 2nd entry for HalEndSystemInterrupt but not actually using the optimized 2nd entry since ROS IRQs are currently built with a completely different trap frame.
svn path=/trunk/; revision=23665
2006-08-23 06:51:54 +00:00
Alex Ionescu 9ac4b05366 - Fix some IDR->IRR bugs.
- Enable 2ndEntry for HalpEndSoftwareInterrupt (pending interrupt inside an interrupt).

svn path=/trunk/; revision=23664
2006-08-23 06:42:25 +00:00
Alex Ionescu 280da54a61 - Switch HalEndSystemInterrupt to ASM version and get completely rid of the irql.C file.
svn path=/trunk/; revision=23663
2006-08-23 06:38:46 +00:00
Alex Ionescu a82987f860 - Switch to ASM version of KfLowerIrql
svn path=/trunk/; revision=23662
2006-08-23 06:35:33 +00:00
Alex Ionescu de56d52a1b - Fix bugs in ASM version of KfLowerIrql (not yet used)
- Fix bugs in INT_PROLOG.
- Fix an important bug in TRAP_EPILOG which was causing register restoration to happen at all times (such as in Kei386EoiHelper/KiServiceExit2 when it shouldn't happen).
- Add DRx restoration from trap frame, if DR7 is set.
- Added and fixed some debugging assertions in TRAP_EPILOG.

svn path=/trunk/; revision=23661
2006-08-23 06:33:52 +00:00
Alex Ionescu c30a8d1cd4 - Duplicate code between the remaining functions (KfLowerIRql and HalEndSystemInterrupt) so testing the switch to their ASM versions will be easier.
- Use same table as in ASM code.

svn path=/trunk/; revision=23660
2006-08-23 01:23:11 +00:00
Alex Ionescu 955d04b6ff - Disable interrupts while in HalpLowerIrql
- Properly handle IRR.
- Call IRR Handlers through the SWINT table.

svn path=/trunk/; revision=23659
2006-08-23 01:07:14 +00:00
Alex Ionescu 9f38dc5900 - Deliver APCs through a proper interrupt gate as well.
svn path=/trunk/; revision=23658
2006-08-23 00:51:08 +00:00
Alex Ionescu 44804d565e - Call KiDispatchInterrupt through an interrupt gate instead of directly.
svn path=/trunk/; revision=23657
2006-08-23 00:49:35 +00:00
Alex Ionescu bbd5e3237f - Remove HalpEndSystemInterrupt since we were already doing that code in HalpLowerIrql.
svn path=/trunk/; revision=23656
2006-08-23 00:39:52 +00:00
Alex Ionescu a2c9ae57c3 - Use the IRR to determine APC delivery.
svn path=/trunk/; revision=23655
2006-08-22 23:41:39 +00:00
Alex Ionescu 132b7c834f - Add the code necessary in the C version of KeLowerIRql to properly mask the PIC, and enable #ifed code in ASM KeRaiseIrql to mask the PIC, since it now works.
svn path=/trunk/; revision=23654
2006-08-22 22:45:45 +00:00
Alex Ionescu fcdd76f501 - Get rid of the peculiar idea that the HAL should manually hack into ntoskrnl through a hack export and hackishly call the registered device interrupt handlers. This is why computers have a PIC in the first place...
svn path=/trunk/; revision=23653
2006-08-22 22:20:02 +00:00
Alex Ionescu fcda0db1c6 - Switch to ASM version of HalEnableSystemInterrupt
svn path=/trunk/; revision=23652
2006-08-22 22:13:01 +00:00
Alex Ionescu f5f0688575 - Use the IDR in the PCR intead of a local picmask.
- Use ASM version of HalBeginSystemInterrupt.

svn path=/trunk/; revision=23651
2006-08-22 22:10:52 +00:00
Aleksey Bragin 23b6ae75fb Dmitry Philippov:
- Add a test case for a multisz value which has zero-sized strings
- Add a test case for query registry delete

All tests are known to be passed on Windows XP SP2

svn path=/trunk/; revision=23650
2006-08-22 21:45:57 +00:00
Alex Ionescu 4e5173d7d0 - Commit current work on IRQ rewrite. Currently in a very ugly/dirty state of flux between the new ASM code (with tiny hacks) and the old C code (with giant hacks). I feel that this is a good/stable middle ground before continuing further with the changes.
svn path=/trunk/; revision=23649
2006-08-22 20:50:52 +00:00
Christoph von Wittich 746195690d * some msvc /W4 fixes
svn path=/trunk/; revision=23648
2006-08-22 20:06:30 +00:00
Hervé Poussineau b7578b2c4b Fix GCC 4 build. Patch by Thomas Weidenmüller
svn path=/trunk/; revision=23647
2006-08-22 18:53:50 +00:00
Art Yerkes acad050569 Fix elrond bug. DNS timeouts now work properly even in the absence of ICMP
destination unreachable or a proper response.

svn path=/trunk/; revision=23646
2006-08-22 06:23:00 +00:00
Alex Ionescu 67096f53f5 - Implement GENERATE_IDT_STUBS/GENERATE_INT_HANDLERS
- Generate actual Unexpected Interrupt entries in the IDT for INTs > 0x30 (basically IRQs).
- Generated all 208 Unexpected Interrupt Handlers for all INTs (using a single macro line) and implement a "Tail" function to handle them instead of bugchecking like before (they're now sent to HAL properly).
- Implement INT_PROLOG macro to create KTRAP_FRAME for interrupts (similar to traps).
- Part 1 of major changes to come....

svn path=/trunk/; revision=23645
2006-08-21 22:40:23 +00:00
Ged Murphy 9281b0c841 - Cleanup / rewrite much of the ip config code
- Move hardcoded strings into a resource file ready for translation
- Query registry data for friendly names, etc. We can remove some of this when the XP/vista API, GetAdaptersAddresses is implemented.
- tested in Windows, untested in ROS...

svn path=/trunk/; revision=23644
2006-08-21 19:28:18 +00:00
Hervé Poussineau b8d9b16369 Fix compilation of ntoskrnl
svn path=/trunk/; revision=23643
2006-08-21 17:16:36 +00:00
Magnus Olsen 1288ce8d7c Update version number to 0.3.x
svn path=/trunk/; revision=23642
2006-08-21 15:04:20 +00:00
Johannes Anderwald 043df7bed9 * colors.c: add error checking
* console.c: add defaults
* layout: halfplement layout dialog

svn path=/trunk/; revision=23641
2006-08-21 10:57:14 +00:00
Magnus Olsen 038473fdfd revers 23614 it cause unexped regress in some api, the code need be goto thung pretty hard even try remove hardcode font in win32k, and it cause regress there and there. and cause regreess on boot time to time. sorry it took me most night figout out why. But I do not yet how to solv it.
svn path=/trunk/; revision=23640
2006-08-21 05:14:22 +00:00
Art Yerkes 58cdf1c29b Added gdi32, because we depend on CreateSolidBrush and kin.
svn path=/trunk/; revision=23639
2006-08-21 04:41:11 +00:00
Art Yerkes ae19f2956d - Fixed timeout calculation.
- Fixed a couple of leaks.

svn path=/trunk/; revision=23638
2006-08-21 03:59:02 +00:00
Alex Ionescu 0ba60c4b62 - Delete bios.c and usertrap.c
- Add Ke entries to KernelFun!

svn path=/trunk/; revision=23637
2006-08-21 03:49:02 +00:00
Alex Ionescu f038f4a895 - Gutted out KiTrapHandler. Now it is only a gateway for GPF/UD for V86 mode.
- Removed all the code in userptrap.c and removed KiKernelTrapHandler.
- Set Traps 11, 12, 16 and 17 as unhandled for now(Segment fault, stack fault, fpu fault and alignment fault). We weren't really "handling" them in the past either.
- I probably need to implement GPF handler for non-V86 mode to support Lazy segment loading and fix the vmware syscall bug that has been haunting me for two years.

svn path=/trunk/; revision=23636
2006-08-21 03:31:53 +00:00
Alex Ionescu 775b443831 - Call KiSystemFatalException directly instead of duplicating the code 5 times.
svn path=/trunk/; revision=23635
2006-08-21 03:03:52 +00:00
Alex Ionescu 03f23a9e0a - Convert 8, 9, 10, 15/F
svn path=/trunk/; revision=23634
2006-08-21 03:01:47 +00:00
Alex Ionescu 162d423eff - Switch 4, 5, 6 to common ASM dispatcher as well.
svn path=/trunk/; revision=23633
2006-08-21 02:32:08 +00:00
Alex Ionescu 4bb966cd9a - Implement generic exception dispatcher for traps (kind-of analogous to KiKernelTrapHandler/KiUserTrapHandler but in assembly and more generic/compact).
- Switch Traps 0, 1  to it.
- Trap 2 is NMI, bugcheck immediately since we can't handle them yet.

svn path=/trunk/; revision=23632
2006-08-21 02:01:07 +00:00
Alex Ionescu c43ef4fb30 - Fixes to CONTEXT<->KTRAP_FRAME conversion.
svn path=/trunk/; revision=23631
2006-08-21 01:07:01 +00:00
Brandon Turner 4c9f6c31bb Label NtReadFileScatter as unimplemented.
svn path=/trunk/; revision=23630
2006-08-21 00:02:33 +00:00
Johannes Anderwald 44f2cc5731 * colors.c: implement color dialog (reading from registry is not yet supported)
* font.c/layout.c/console.c/options.c: add UNREFERENCED_PARAMETER macros, fix sharing of global struct
* console.def: fix building with MSVC

svn path=/trunk/; revision=23629
2006-08-20 23:55:08 +00:00
Alex Ionescu 74f108bb28 - Detect NPX/FPU in simple assembly and XMMI/SSE2 by using CPU Feature flags, replacing the old asm+c mess.
- Handle FPU/SSE saving in the CONTEXT<->KTRAP_FRAME routines directly, and using KiFlushNPXState assembly function.
- Implement a naive Trap 7 (FPU Fault) handler in assembly that properly does most of the work required to handle an FPU fault. Not yet complete however since it almost ignores user-mode faults (just like trunk). FPU isn't done in ctx switching yet.
- Remove all the other .c code that dealt with FPU stuff and had become incompatible since more then a year ago.

svn path=/trunk/; revision=23628
2006-08-20 23:53:07 +00:00
Michele Cicciotti aabf06072b modified porting-tools/rdesktop-core-tester/activex.cpp
modified   porting-tools/rdesktop-core-tester/rdesktop-core-tester.cpp
    And from the chrysalis out came... the caterpillar. MissTosca stops just short of being demonstrable. I'll keep working on it, but the Google Summer of Code is, for all intent and purposes, over. The matter is in the hands of my judges now. Wish me luck

modified   rdesktop/iso.c
modified   rdesktop/proto.h
modified   rdesktop/rdesktop.h
modified   rdesktop/rdp.c
    Very minor fixes

modified   rdesktop/tcp.c
    Use asynchronous I/O and alertable waits to allow aborting the protocol thread ASAP

svn path=/trunk/; revision=23627
2006-08-20 21:02:10 +00:00