Commit graph

22037 commits

Author SHA1 Message Date
Aleksey Bragin
342cd42b44 Fix a lot of annoying warnings, leaving basically only ehci.c and gendrv.c as big warnings providers
svn path=/trunk/; revision=23685
2006-08-24 12:58:52 +00:00
Aleksey Bragin
2036235837 Dmitry Philippov: Implement SmProcessFileRenameList()
svn path=/trunk/; revision=23684
2006-08-24 11:06:48 +00:00
Aleksey Bragin
1b82756b34 Temporary fix a call to KeUpdateSystemTime(), passing third CLOCK_INCREMENT's value (100000) as third param.
svn path=/trunk/; revision=23683
2006-08-24 09:32:32 +00:00
Aleksey Bragin
be7b345087 Fix compiling
svn path=/trunk/; revision=23682
2006-08-24 09:01:22 +00:00
Alex Ionescu
721fa0869e - Add more missing offsets to asm.h (as always, taken from ks386.inc)
- Fix incorrect KPCR_PRCB_DPC_ROUTINE_ACTIVE which was totally wrong (And could've caused a crash in the context swicher)
- Also fix the definition of KRCB which was off-by-4 after about offset ~0x500. It wasn't causing problems because assembly code only used < 0x500.
- Write the ASM implementation of KeUpdateRunTime (not used yet).

svn path=/trunk/; revision=23681
2006-08-24 07:48:50 +00:00
Alex Ionescu
065837f112 - Make KeUpdateSystemTime independent, so that it returns and exits from the current ROSterrupt by itself.
- Make KeUpdateRunTime increase the interrupt count, check for V86 as well as for user-mode by using the CS and EFLAGS (isntead of PreviousMode), also only request DPCs if DpcInterruptRequested isn't already set, and only perform Quantum End if this isn't the idle thread.
- Add clock.S which will have the clock interrupt handlers of the kernel (UpdateSystemTime and UpdateRunTime) and ultimately replace the only reason irqhand.S is still around (the clock interrupt). Implement the current version of KeUpdateSystemTime in assembly, with stack optimizations since we'll be called from the HAL later.

svn path=/trunk/; revision=23680
2006-08-24 06:52:33 +00:00
Alex Ionescu
5e7ef1d665 - Update KeUpdateSystemTime to use variable increments.
- Update KeTickCount properly instead of an ugly timecast hack.
- Also update UserSharedData->TickCount.
- Get rid of KiRawTicks.
- Properly update KiTickOffset at the end.

svn path=/trunk/; revision=23679
2006-08-24 06:27:29 +00:00
Alex Ionescu
8b82c0d641 - Write a basic Clock Interrupt handler in the HAL (doesn't deal with changing increments yet, just like current ROS). It will call KeUpdateSystemTime once ready.
- Implement KeDisconnectInterrupt with the new implementation.
- Put Clock Interrupt initialization in the right place (might still be too late: must investigate more).
- Added a debug print when unexpected interrupts are called, just noticed this happens on my checked machine, and it's a useful tracing tool.

svn path=/trunk/; revision=23678
2006-08-24 05:36:50 +00:00
Alex Ionescu
15899302f6 - Completely re-implement IRQ support (KeInitialize/Connect/Disconnect) interrupt using the same model as NT. Implementation was done by analyzing various of my systems at runtime with WinDBG and tracing through some of the code and dumping relevant objects.
- Uses new code added to trap.s for generic dispatching, as well as the NT implementation which copies a "template" into the ->DispatchCode array of every KINTERRUPT object.
- Also adds support for chained interrupts, but this hasn't been tested yet. Floating interrupts are not supported on NT it seems, so I haven't implemented those at all.
- KiDisableInterrupt not yet re-implemented, and timer code is still piggybacked on the old implementation.

svn path=/trunk/; revision=23677
2006-08-24 02:53:40 +00:00
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