Sylvain Petreolle [Fri, 29 Jan 2010 22:08:09 +0000 (22:08 +0000)]
[HAL]
fix HalEndSystemInterrupt prototype.
svn path=/trunk/; revision=45324
Sylvain Petreolle [Fri, 29 Jan 2010 22:03:56 +0000 (22:03 +0000)]
add missing delimiters
svn path=/trunk/; revision=45323
Sir Richard [Fri, 29 Jan 2010 21:10:33 +0000 (21:10 +0000)]
[HAL]: Rewrite IRQL handling. Alex's original code (lately translated to C) was a copy of the MicroChannel (MCA), Checked-Build HAL, an unexplained choice considering MCA is not supported or even available anymore. Windows, on machines with a PIC, uses a mechanism called Lazy IRQL, in which the PIC is only programmed "lazily", meaning that lowering and raising the IRQL does not actually change the interrupt mask. Therefore, lower priority interrupts will still come in at high IRQL. At this point, the HAL will detect this, only now mask the PICs, and lie that the lower interrupt was "spurious", while setting a pending bit. When the IRQL is lowered, the bit is detected, and a software/delayed "INT" is done with the correct IRQ vector number. More details are available in the typical resources.
[HAL]: Implement support for Level interrupts, which are used by certain EISA cards, and more particularly, all PCI hardware. Level interrupts were not previously handled correctly, being treated as edge/latched interrupts instead.
[NTOS/HAL]: Remove VDM Alert KPCR hack (which was buggy). Now the PKTRAP_FRAME is passed as a parameter to HalpEndSoftwareInterrupt/HalEndSystemInterrupt. This also removes the HalpNestedTrap ASM hack, since the call can now be done in C.
[PERF]: On real machines, writing the PIC mask is a relatively expensive I/O operation, and IRQL lower/raise can happen hundreds of times a second. Lazy IRQL provides an important optimization.
[PERF]: Correctly handling level interrupts as level interrupts allows for faster, and more efficient, IRQ handling.
svn path=/trunk/; revision=45320
Aleksey Bragin [Fri, 29 Jan 2010 21:02:00 +0000 (21:02 +0000)]
[CSR]
- DejaVu Sans Mono seems to have a bug which makes Windows and Arwinss report double max char width as compared to a real char width. Since only a monospace font could be used, measure exact char width using GetTextExtentPoint32W and use that value.
svn path=/trunk/; revision=45319
Sir Richard [Fri, 29 Jan 2010 08:14:51 +0000 (08:14 +0000)]
[HAL]: Mark ECX as clobbered in HalpNestedTrap, otherwise if the compiler decides to store IRQL in ECX, it will then be overriden with our ECX parameter. With this clobber, the compiler will use another register, such as EAX, to hold the IRQL.
svn path=/trunk/; revision=45316
Sir Richard [Fri, 29 Jan 2010 07:27:55 +0000 (07:27 +0000)]
[NTOS]: Return correct IRQ 0 vector instead of IRQL, when the timer interrupt ends.
svn path=/trunk/; revision=45315
Sir Richard [Fri, 29 Jan 2010 02:25:30 +0000 (02:25 +0000)]
[NTOS]: Another try at the chained interrupt dispatch problem...
svn path=/trunk/; revision=45312
James Tabor [Fri, 29 Jan 2010 02:07:31 +0000 (02:07 +0000)]
- Fix recursion when sweeping the DCE list.
svn path=/trunk/; revision=45311
Sir Richard [Fri, 29 Jan 2010 01:37:25 +0000 (01:37 +0000)]
[NTOS]: Implement chained interrupt dispatch. For level interrupts, the first interrupt handler should process the interrupt and no other handlers are called. Edge interrupts are another matter, but since they aren't yet supported, I haven't implemented that code path (it wasn't implemented previously). I seriously hope we don't have edge/chained interrupts because the HAL/NTOS could never handle this!
svn path=/trunk/; revision=45310
Sir Richard [Fri, 29 Jan 2010 01:12:08 +0000 (01:12 +0000)]
[NTOS]: Implement the KiInterruptTemplate in C since we now have a C entrry macro. Add a new KI_HARDWARE_INT flag for the C entry macro to generate the appropriate labels for runtime patching of the KINTERRUPT pointer to work, and issue an absolute instead of relative jmp.
[NTOS]: Remove thousands of lines of assembly that are not needed anymore.
[NTOS]: Put all interrupt code in irqobj.c (platform-specific).
[NTOS]: DPC Interrupt is really the thread scheduler interrupt (DPC work happens in C), which mostly does contexts switching and scheduling decisions, so move it to ctxswitch.S
svn path=/trunk/; revision=45309
James Tabor [Fri, 29 Jan 2010 00:59:20 +0000 (00:59 +0000)]
- Remove WINDOWOBJECT_NEED_INTERNALPAINT from service.
svn path=/trunk/; revision=45308
James Tabor [Fri, 29 Jan 2010 00:58:19 +0000 (00:58 +0000)]
[User32]
- Make ValidateRect a direct call, update related. Update UpdateWindow and some code sorting. Getting ready for WND switch.
svn path=/trunk/; revision=45307
James Tabor [Thu, 28 Jan 2010 23:45:22 +0000 (23:45 +0000)]
- Wrong commit msg, removed debug prints and fixed RedrawWindow. This fix one part of the leak.
svn path=/trunk/; revision=45306
James Tabor [Thu, 28 Jan 2010 23:34:57 +0000 (23:34 +0000)]
[Win32k]
- Add back removed window dce support routine. Fixed list handling and implemented thread cleanup for dces.
svn path=/trunk/; revision=45305
Sir Richard [Thu, 28 Jan 2010 23:18:53 +0000 (23:18 +0000)]
[NTOS]: The last big step. Now that the HAL is in C, we can handle interrupts in C. Do so using the proposed model that was #if'ed out, but with some improvements.
[NTOS]: Implement KiUnexpectedInterruptTail and KiUnexpectedInterrupt in C as well.
This is [PERF] too since the C interrupt handling code is a lot more efficient than the ASM one. Numbers look good here.
svn path=/trunk/; revision=45304
Sir Richard [Thu, 28 Jan 2010 23:08:04 +0000 (23:08 +0000)]
[HAL]: Fix HalpFlushTlb. Thanks to Stefan Ginsberg <stefan100@reactos.org>
svn path=/trunk/; revision=45303
Matthias Kupfer [Thu, 28 Jan 2010 22:18:31 +0000 (22:18 +0000)]
this log message left intentionally non-descriptive
svn path=/trunk/; revision=45302
Sir Richard [Thu, 28 Jan 2010 20:45:45 +0000 (20:45 +0000)]
[PERF]: Optimize nested interrupt cases (where a pending interrupt exists at the end of a software or system interrupt) just like the old HAL did, by jumping into a second-level handler and completing the outer trap frame instead of the nested trap frame. This saves a lot of cycles in those cases, and they do happen quite often (pending DPC at the end of an interrupt, for example).
[NTOS/HAL]: Rework respective code to handle this by using the VDM Alert field in the KPCR.
svn path=/trunk/; revision=45301
Sir Richard [Thu, 28 Jan 2010 20:43:25 +0000 (20:43 +0000)]
[NTOS]: Fix L1/L2 cache detection and write out the size and associativity. Now that KeGetCurrentProcessorNumber doesn't think your L2 cache is the number of CPUs, this can be safely done.
svn path=/trunk/; revision=45300
Sir Richard [Thu, 28 Jan 2010 16:05:54 +0000 (16:05 +0000)]
[NDK]: Fix KPCR definition.
[DDK]: KeGetCurrentProcessorNumber should not return a 32-bit DWORD combined of "ProcessorNumer", "VdmAlert" and "SecondLevelCacheAssociativity" because those 3 fields are probably not equal to a processor number. Having an L2 Cache will no longer result in ReactOS believing you have a 32000 core CPU.
svn path=/trunk/; revision=45299
Sir Richard [Thu, 28 Jan 2010 16:01:43 +0000 (16:01 +0000)]
[NTOS]: Remove checks for VDM alert during GPF. This is a Windows-specific hack for VDM, which isn't implemented.
svn path=/trunk/; revision=45298
Sir Richard [Thu, 28 Jan 2010 15:51:18 +0000 (15:51 +0000)]
[PERF]: Not in any way a scientific number you should bet the farm on, but we do now count the number of cycles at the very first instruction of kernel initialization, at the moment SMSS initializes the registry (when we call kernel initialization complete), and at the moment there have been 12 processes created (10 without counting idle/system), which is a bit less than a normal GUI boot. We also display the number if interrupts, system calls, and context switches it took to get us there. A purely comparative number, perhaps worthy for inclusion in testman/regression tests?
svn path=/trunk/; revision=45297
James Tabor [Thu, 28 Jan 2010 01:00:09 +0000 (01:00 +0000)]
[Win32k]
- Add back removed window dce support routine. Fixed list handling and implemented thread cleanup for dces.
svn path=/trunk/; revision=45293
Cameron Gutman [Thu, 28 Jan 2010 00:24:00 +0000 (00:24 +0000)]
- Merge aicom-network-branch (still without the NDIS stuff)
- Fixes some nasty bugs and hacks in our TCP implementation
svn path=/trunk/; revision=45291
Daniel Reimer [Wed, 27 Jan 2010 22:13:26 +0000 (22:13 +0000)]
Update piperead to Version 0.3 (Jan Roeloffzen)
svn path=/trunk/; revision=45288
Daniel Reimer [Wed, 27 Jan 2010 19:03:52 +0000 (19:03 +0000)]
Update log2lines to Version 1.11 (Jan Roeloffzen) Bug 4342
- Added -P Pipeline option for Powershell support, see below
- Renaming some structs to avoid potential naming conflicts with windows.h
- stdin/out -> stdIn/Out for redirecting
- Fixed potential mem leak
- A little more tracing and cleanup
Updated piperead (Jan Roeloffzen) Bug 5146
- Added Pipe client function, based on msdn example
- Improved option handling (try piperead -h)
- logging, error handling
- Integrated in build (pipetools.mak)
svn path=/trunk/; revision=45287
Sir Richard [Wed, 27 Jan 2010 05:34:38 +0000 (05:34 +0000)]
[NTOS/PERF]: Enable VME support. VME stands for Virtual 8086 Mode Extensions, and it's an Intel optimization that makes changes to the IF bit in EFLAGS (CLI, STI, INT, IRETD, PUSHF, POPF) completely transprent: instead of changing the real (protected) bit, which requires the OS to trap and emulate the behavior, the CPU sets a "Fake" IF bit instead. When you're dong in V8086 mode, you simply update your real flag with whatever the fake flag says.
[NTOS]: Enable V8086 Fast-V86 Trap mode for Trap 6 (Invalid Opcode). Because we are now taking zero traps during V8086 mode, we can't do the "BOP lookahead", so the only trap we do get is when we hit the BOP/invalid opcode itself.
[NTOS]: Multiple fixes to V8086 opcode emulation code that I noticed while looking through the source. Also multiple fixes to VDM code.
This change will only impact real hardware and VMWare, since QEMU does not support VME. On VMWare, performance increased up to 400% during bootup (80 million cycles instead of 300 million, in one test).
svn path=/trunk/; revision=45282
Sir Richard [Wed, 27 Jan 2010 03:36:18 +0000 (03:36 +0000)]
[NTOS]: Trunk boots now (interesting that buildbot's QEMU does not support SYSENTER, as newer versions do), so remove the test DPRINTs.
svn path=/trunk/; revision=45281
Sir Richard [Wed, 27 Jan 2010 03:05:10 +0000 (03:05 +0000)]
[NTOS]: Rework the trap macros again. This time we needed some added complexity because of the need for runtime patching at boot. We got away with it nicely and basically implement a simple "if" in ASM, which gives us a deterministic set of instructions (vs the compiler). We then patch if if needed (see next bullet).
[NTOS]: Support systems without SYSENTER. Nothing was actually disabling the SYSEXIT mechanism recently enabled. Now IRET is always used unless a SYSENTER machine is discovered, in which case the jmp to the IRET code is patched with a jmp to SYSEXIT code.
[PERF]: Set WP0 bit in CR0 later, thus allowing the existing runtime patches (and this new one) to function without requiring MmSetPageProtect. Saves TLB flushes and page table walking/mapping on boot.
Left in some debug prints to see what buildbot reports...will remove if it survives.
svn path=/trunk/; revision=45280
Dmitry Gorbachev [Wed, 27 Jan 2010 02:29:36 +0000 (02:29 +0000)]
Output PCH, not dependencies.
svn path=/trunk/; revision=45279
James Tabor [Wed, 27 Jan 2010 00:06:48 +0000 (00:06 +0000)]
- Turn off debug print outs.
svn path=/trunk/; revision=45278
Sir Richard [Tue, 26 Jan 2010 21:41:05 +0000 (21:41 +0000)]
[HAL]: Implement the profile and clock interrupt trap/handlers in C instead of ASM. This allows the kernel to remove the ugly hacks based on internal knowledge of how the assembly/stack of the HAL is supposed to look like. Everything is now done through a clean C interface.
[NTOS]: Remove said hacks and have a normal C implementation of KeUpdateSystemTime. It exits the interrupt through a soft interrupt exit.
[NTOS]: Implement 4 lines of support code needed to handle interrupts during V8086 mode, which were lacking since we weren't hitting this case yet.
Note that now the KeUpdateSystemTime interface is not "compatible" with Windows anymore. This does not matter, since the only possible caller of KeUpdateSystemTime is a very specific HAL routine that needs a very specific stack layout to actually work, so the chance of anyone calling this API is absolutely zero (no, not even some experimental driver. It's absolutely impossible).
svn path=/trunk/; revision=45276
Sir Richard [Tue, 26 Jan 2010 19:41:31 +0000 (19:41 +0000)]
[HAL]: Rewrite all V8086-related code in C instead of ASM. Delete v86.s. Makes uses of new macros and developments in NTOS, but should now only end up getting called at shutdown and for bugchecks.
svn path=/trunk/; revision=45272
Sir Richard [Tue, 26 Jan 2010 19:39:21 +0000 (19:39 +0000)]
[PERF]: What to do when your SYSEXIT code has a bug? Set KiFastSystemCallDisable to TRUE so it never gets used. Now, for the first time in 3 years and 3 months (not giving a specific revision # to protect the 'innocent'), ReactOS actually fully uses the SYSENTER/SYSEXIT instructions isntead of IRETD, since my code doesn't exhibit the bug and SYSEXIT is safe to use. This should save a good hundred cycles or more per system call.
svn path=/trunk/; revision=45271
Sir Richard [Tue, 26 Jan 2010 19:29:37 +0000 (19:29 +0000)]
[PERF]: After spending the better part of the last two days rewriting the HAL V8086 code (used for BIOS Display Reset) in C, it dawned upon me that it shouldn't even be used during bootup in the first place! The boot loader, running in real-mode, already sets video mode 12 when starting ReactOS. We then repeat the operation, but since we're in protected mode, we have to emulate the whole sheebang with V8086 mode. We now initialize bootvid without requesting a mode switch (which was broken up until a commit ago). This gives us a dirty palette and VGA state. We then call VidResetDisplay to clean up the palette and setup the VGA registers correctly, but we only reset the screen if a custom /BOOTLOGO command is used (which isn't supported yet). We therefore don't need to enter V8086 mode at all up until the switch to graphics mode from the video card driver. Note that Windows doesn't do this (Win7 might due to the new Boot Graphics Library), so we're actually booting faster!
svn path=/trunk/; revision=45270
Sir Richard [Tue, 26 Jan 2010 19:21:41 +0000 (19:21 +0000)]
[BOOTVID]: Fix completely broken VidInitialize routine. I have no idea what the original code was trying to accomplish.
svn path=/trunk/; revision=45269
Sir Richard [Tue, 26 Jan 2010 17:54:50 +0000 (17:54 +0000)]
[NTOS]: Refactor some stub code and add a couple of more possible trap exit mechanisms (needed for HAL). Later we should really combine all the exit macros into one, as we've done for the entry macro.
svn path=/trunk/; revision=45268
Sir Richard [Tue, 26 Jan 2010 16:31:32 +0000 (16:31 +0000)]
[HAL]: Move the HalpApcInterrupt and HalpDispatchInterrupt to pic.c now that there is a C-macro to generate such stubs. Remove irq.S from build/sources.
svn path=/trunk/; revision=45267
Sir Richard [Tue, 26 Jan 2010 15:43:13 +0000 (15:43 +0000)]
[NTOS]: Implement a C/Extended ASM macro for generating trap stubs, removing the need to do this in ASM. The macro covers all possible entries, from SYSENTER to a fake sotware interrupt (needed for HAL changes later). By being somewhat in C, it makes the code cleaner to read and uses C expressions to make its decisions, making the code more maintanable as well. It also removes the need for separate assembly files.
[NTOS]: Modify the semantics of how a fast system call (SYSENTER) is processed in the stub, by moving more work in the C handler, such as setting up FS and getting the correct argument stack. Saves us some cycles too (and allows the trap stub macro to be more generic).
svn path=/trunk/; revision=45266
Dmitry Chapyshev [Tue, 26 Jan 2010 10:23:30 +0000 (10:23 +0000)]
- Update Ukrainian translation by Igor Paliychuk (igor-hkr[at]mail[dot]ru)
svn path=/trunk/; revision=45260
Sir Richard [Mon, 25 Jan 2010 03:00:01 +0000 (03:00 +0000)]
[NTOS]: Split the GENERATE_TRAP_HANDLER in two separate macros. The original builds the name of the function (and makes it global), while the TRAP_HANDLER_PROLOG is actually the code.
[NTOS]: Make TRAP_HANDLER_PROLOG handle software traps, in which the interrupt stack must be faked.
[NTOS]: Optimize TRAP_HANDLER_PROLOG by not pushing an error code and then making space on the stack without the error code -- just make space with the error code in the first place (nobody reads the value, so having it zero or garbage isn't important).
[HAL]: Implement the APC and DPC software interrupt traps in C instead of ASM. Delete all contents of irq.S except the two GENERATE_TRAP_HANDLER stubs.
svn path=/trunk/; revision=45244
Sir Richard [Mon, 25 Jan 2010 01:51:47 +0000 (01:51 +0000)]
[HAL]: Implement HalEndSystemInterrupt and HalpEndSoftwareInterrupt. Remove more ASM code/tables that aren't unused anymore.
svn path=/trunk/; revision=45243
James Tabor [Mon, 25 Jan 2010 01:33:01 +0000 (01:33 +0000)]
[Win32k|Ggi32]
- Diagnostic commit used for troubleshooting leaking region handles.
- Updates to headers and experimental code added for regions.
svn path=/trunk/; revision=45242
Sir Richard [Mon, 25 Jan 2010 01:26:53 +0000 (01:26 +0000)]
[HAL]: Implement HalRequestSoftwareInterrupt in C instead of ASM. Remove deprecated ASM code that was unused.
svn path=/trunk/; revision=45241
Sir Richard [Mon, 25 Jan 2010 01:20:43 +0000 (01:20 +0000)]
[HAL]: KfLowerIrql in C instead of ASM. Add the SWInterruptLookUpTable and SWInterruptHandlerTable to the code and keep the same mechanism as the ASM code used.
svn path=/trunk/; revision=45240
Sir Richard [Sun, 24 Jan 2010 23:57:09 +0000 (23:57 +0000)]
[HAL]: Okay, this one was my fault, forgot to built the nasty-ass HALMPS. Move the CMOS lock routines to the shared CMOS file.
svn path=/trunk/; revision=45239
Sir Richard [Sun, 24 Jan 2010 23:35:07 +0000 (23:35 +0000)]
You really need to get your compiler version shit together. I was told GCC 4.4 is what's used in ReactOS, yet the build server insists on using an old and broken version of GCC that doesn't support half the things we're trying to do here! Hackfix the Mask Table by providing ugly and incomprehensible hex magic numbers for the mappings, if a GCC older than 4.4 is used.
svn path=/trunk/; revision=45238
Sir Richard [Sun, 24 Jan 2010 23:30:43 +0000 (23:30 +0000)]
[HAL]: Implement and document the HalpSpecialDismissTable. Explain how each IRQ should be handled and what the special cases are. Implement said special cases (based on ISA System Architecture, 3rd Edition).
[HAL]: Implement HalBeginSystemInterrupt in C instead of ASM, it jumps into one of the IRQ handlers registered in the HalpSpecialDismissTable.
svn path=/trunk/; revision=45237
Sir Richard [Sun, 24 Jan 2010 23:21:36 +0000 (23:21 +0000)]
[HAL]: Implement HalEnableSystemInterrupt and HalDisableSystemInterrupt in C instead of ASM.
svn path=/trunk/; revision=45236
Sir Richard [Sun, 24 Jan 2010 23:19:40 +0000 (23:19 +0000)]
[HAL]: Document and implement KiI8259MaskTable in C using actual bit positions. Each mapping is best to the best of my ability.
[HAL]: Implement KfRaiseIrql in C, remove ASM version.
svn path=/trunk/; revision=45235
Sir Richard [Sun, 24 Jan 2010 23:14:08 +0000 (23:14 +0000)]
[HAL]: Implement KeGetCurrentIrql, KeRaiseIrqlToDpcLevel, KeRaiseIrqlToSynchLevel, HalClearSoftwareInterrupt in C instead of ASM.
svn path=/trunk/; revision=45234
Sir Richard [Sun, 24 Jan 2010 23:12:30 +0000 (23:12 +0000)]
[HAL] Merge HalpAcquireSystemHardwareSpinLock and HalpReleaseCmosSpinLock from Timo's AMD64 branch, and delete ASM implementations.
svn path=/trunk/; revision=45233
Dmitry Gorbachev [Sun, 24 Jan 2010 15:18:50 +0000 (15:18 +0000)]
- Use __builtin_trap for old GCC, too.
- KiEoiHelper, KiDispatchExceptionFromTrapFrame: mark noreturn.
- Return DECLSPEC_NORETURNs.
svn path=/trunk/; revision=45232
Sir Richard [Sun, 24 Jan 2010 05:40:04 +0000 (05:40 +0000)]
[PERF]: Make the trap entry/exit macros inlined, just as they used to be before in their pure-assembly forms. This should boost performance quite a bit by avoiding 2-3 extra calls during traps and system calls.
[NTOS]: Cleanup the traphdlr.c vs. trap_x.h mess into something much more structured. trap_x.h is now all inlined C functions which pretty much replace the asmmacros.S file. It is meant to be used outside the kernel as well (such as by the HAL, which requires trap entry/exit too).
[PERF]: Give UNREACHABLE another try, this time with GCC 4.5+, 4.4+, 4.4- and MSVC support.
[PERF]: Remove ABIOS checks since ReactOS does not support this, and since it doesn't look like the target kernel actually does either, we can remove this vestigal/unsupported code, saving some extra branches and checks.
svn path=/trunk/; revision=45231
Dmitry Gorbachev [Sun, 24 Jan 2010 02:25:20 +0000 (02:25 +0000)]
Comment out DECLSPEC_NORETURN for now.
svn path=/trunk/; revision=45230
Dmitry Gorbachev [Sun, 24 Jan 2010 02:07:40 +0000 (02:07 +0000)]
Use for GCC before 4.5, too...
svn path=/trunk/; revision=45229
Dmitry Gorbachev [Sun, 24 Jan 2010 01:58:20 +0000 (01:58 +0000)]
Trying r45222 hack again...
svn path=/trunk/; revision=45228
Dmitry Gorbachev [Sun, 24 Jan 2010 01:47:27 +0000 (01:47 +0000)]
Put #endif where it should be.
svn path=/trunk/; revision=45227
Dmitry Gorbachev [Sun, 24 Jan 2010 01:37:13 +0000 (01:37 +0000)]
Forgot ntdef.h
svn path=/trunk/; revision=45226
Dmitry Gorbachev [Sun, 24 Jan 2010 01:35:25 +0000 (01:35 +0000)]
Trying to fix build...
svn path=/trunk/; revision=45225
Dmitry Gorbachev [Sun, 24 Jan 2010 00:50:54 +0000 (00:50 +0000)]
Fix vmwinst.exe crash (bug #5134).
svn path=/trunk/; revision=45224
Sir Richard [Sat, 23 Jan 2010 23:59:59 +0000 (23:59 +0000)]
[PERF]: Make all trap handlers, trap exit code, fatal exit code, and exception dispatch code "no return" since it always leads to an iret or other kind of non-directly-returning mechanism. This allows the compiler to optimize better and also remove useless code at the bottom of the functions. Since __builtin_unreachable is only for GCC 4.5, we use exit(0) for now (it will never be reached) to trick GCC.
svn path=/trunk/; revision=45223
Sir Richard [Sat, 23 Jan 2010 23:58:29 +0000 (23:58 +0000)]
[PSDK]: Define DECLSPEC_NORETURN for MSVC and GCC.
svn path=/trunk/; revision=45222
James Tabor [Sat, 23 Jan 2010 23:55:32 +0000 (23:55 +0000)]
[Win32k]
- Fixed DCE masks, clipping and added support for mirror and process owned dce.
- Reference: http://www.reactos.org/archives/public/ros-dev/2008-July/010498.html http://www.reactos.org/archives/public/ros-dev/2008-July/010499.html
svn path=/trunk/; revision=45221
Dmitry Gorbachev [Sat, 23 Jan 2010 23:39:43 +0000 (23:39 +0000)]
Fix initialization of PICs.
svn path=/trunk/; revision=45220
Dmitry Gorbachev [Sat, 23 Jan 2010 21:57:15 +0000 (21:57 +0000)]
Fix build.
svn path=/trunk/; revision=45218
Sir Richard [Sat, 23 Jan 2010 21:27:26 +0000 (21:27 +0000)]
[PERF]: Replace early ZwClose system calls with ObCloseHandle(KernelMode). This avoids taking a system call for those cases and gives a slight perf boost to booting up the system. It also pushes the first system call somewhat later in the boot process, allowing for easier debugging should the interface have issues/need tracing.
[NTOS]: Do not attempt querying the Registry Primary Handle for the Backing Hive File Size in the case where there is no actual Primary! There was no error checking so nobody noticed this happens -- it also probably resets Cluster to 0 (instead of 1), which can cause corruption in some cases.
[NTOS]: Make KiUserTrap use the MODE_MASK instead of hard-coding a check for Ring 0 CS (which is slower and not as correct).
svn path=/trunk/; revision=45217
Dmitry Gorbachev [Sat, 23 Jan 2010 21:24:36 +0000 (21:24 +0000)]
Remove duplicate definitions (now in time.c).
svn path=/trunk/; revision=45216
Matthias Kupfer [Sat, 23 Jan 2010 20:18:23 +0000 (20:18 +0000)]
- fix and add German translations
svn path=/trunk/; revision=45215
Sir Richard [Sat, 23 Jan 2010 19:31:54 +0000 (19:31 +0000)]
[NTOS]: Export the C KiEoiHelper alongside the ASM Ke386EoiHelper. Yes, this is a "ReactOS-only" export, but really this interface is reserved for the HAL, and as long as we keep Ke386EoiHelper, the NT HAL should still work.
Need to revisit/finalize this decision and whether or not we can emulate the C-interface with Ke386EoiHelper somehow (reliably).
svn path=/trunk/; revision=45214
Sir Richard [Sat, 23 Jan 2010 19:29:33 +0000 (19:29 +0000)]
[NDK]: Some prototype fixes.
svn path=/trunk/; revision=45213
Sir Richard [Sat, 23 Jan 2010 19:28:26 +0000 (19:28 +0000)]
[NTOS]: KiDispatchInterrupt crushes EBX, so maybe it should preserve it first? This only worked because KiDispatchInterrupt was only called by ASM code that already was magically aware of this fact, and preserved (or didn't use) EBX before making the call. Yuck!
svn path=/trunk/; revision=45212
Aleksey Bragin [Sat, 23 Jan 2010 19:26:06 +0000 (19:26 +0000)]
Jose Catena <jc1@diwaves.com>
- Fix a typo in aulldvrm (one of the dividends was always wrong).
See issue #5139 for more details.
svn path=/trunk/; revision=45211
Sir Richard [Sat, 23 Jan 2010 18:28:14 +0000 (18:28 +0000)]
[PERF]: Do not declare the PCR in KeGetPcr as volatile. It is only volatile as in "if there is a context switch, the PCR is different". You are in a LOT of trouble if the thread switches while your code is running in the first place, and your code is somehow running as a different thread!
This change makes C code a lot neater, especially during PCR access, because it doesn't force reloading the PCR each time. For example, Read-Modify-Operations on the PCR, such as AND are 1 line of assembly instead of 3.
This helps and will help further with the C HAL, as well as the C trap handlers.
svn path=/trunk/; revision=45210
Dmitry Gorbachev [Sat, 23 Jan 2010 17:26:30 +0000 (17:26 +0000)]
Fix English translation of RApps. Andrew Faulds (ajfweb =at= googlemail =dot= com), bug #5138.
svn path=/trunk/; revision=45209
Dmitry Chapyshev [Fri, 22 Jan 2010 17:03:08 +0000 (17:03 +0000)]
- Add/update Ukrainian translation by Sakara Yevhen (eresid[at]gmail[dot]com) and Igor Paliychuk (igor-hkr[at]mail[dot]ru)
- Update Russian translation for sysdm
svn path=/trunk/; revision=45205
Dmitry Chapyshev [Fri, 22 Jan 2010 16:53:12 +0000 (16:53 +0000)]
- Add/update Ukrainian translation by Sakara Yevhen (eresid[at]gmail[dot]com) and Igor Paliychuk (igor-hkr[at]mail[dot]ru)
- Update Russian translation for spider
svn path=/trunk/; revision=45204
James Tabor [Fri, 22 Jan 2010 01:29:21 +0000 (01:29 +0000)]
[Win32k]
- Remove CriticalRegion calls.
svn path=/trunk/; revision=45198
James Tabor [Fri, 22 Jan 2010 01:12:06 +0000 (01:12 +0000)]
[Win32k]
- Remove CriticalRegion calls.
svn path=/trunk/; revision=45197
Timo Kreuzer [Thu, 21 Jan 2010 22:34:01 +0000 (22:34 +0000)]
Merge from amd64-branch:
44886 KxAcquireSpinLock: check for already owned lock only on debug builds, fix check in inner loop, don't call Kii386SpinOnSpinLock inside the inner loop, but instead of it, simplify the code. Stubplement Kii386SpinOnSpinLock in C
44893 Move spinlock inline functions into their own header, so they can be shared with hal.
svn path=/trunk/; revision=45196
Timo Kreuzer [Thu, 21 Jan 2010 21:05:45 +0000 (21:05 +0000)]
[HAL]
Cleanup part 1/x
- Rename each architectures default hal to "hal" and delete the stubbed "hal" module.
- Delete halamd64 (will later reuse the x86 hal)
- Rename "halmp" to "halmps" as it's called on windows
- Set HalInitSystem as entry point
- Move pcibus.c into hal_generic.rbuild
- Use a common .pspec file
- Use a directory.rbuild for halx86 as it was done for the other architectures already
- Move some code from hal_generic to hal_generic_up
- No code change
svn path=/trunk/; revision=45195
Christoph von Wittich [Thu, 21 Jan 2010 13:43:49 +0000 (13:43 +0000)]
[HAL]
-header cleanup
-spaces -> tabs in rbuild file
svn path=/trunk/; revision=45183
Sir Richard [Thu, 21 Jan 2010 13:36:30 +0000 (13:36 +0000)]
[HAL]: The HAL is a mess. Fix build.
svn path=/trunk/; revision=45182
James Tabor [Thu, 21 Jan 2010 13:18:33 +0000 (13:18 +0000)]
[Win32k]
- Fixes to region support code. See bug 5124.
svn path=/trunk/; revision=45181
Sir Richard [Thu, 21 Jan 2010 12:51:13 +0000 (12:51 +0000)]
[HAL]: Initialize the i8259A PIC controllers in C, and add register structures and enumerations to document the bits. These were taken from ISA System Architecture 3rd Edition and EISA System Architecture 2nd Edition by Mindshare.
[HAL]: Add code to detect EISA systems with ELCR (Edge/Level Control Register). Since the current HAL does not support these, warn users about any level/shared interrupts, since they are likely to cause trouble.
svn path=/trunk/; revision=45180
Cameron Gutman [Thu, 21 Jan 2010 03:48:10 +0000 (03:48 +0000)]
Merge aicom-network-branch (without NDIS changes for now)
New noteworthy improvements include (in addition to the other improvements made in the commits that were reverted in trunk):
- Support for sending/receiving packets > 16KB in size
- Samba-tng works
- Tracert works
- Major speed and stability improvements (especially for TCP connections)
- Use ExAllocatePoolWithTag/ExFreePoolWithTag instead of memtrack
svn path=/trunk/; revision=45172
James Tabor [Thu, 21 Jan 2010 02:58:52 +0000 (02:58 +0000)]
[Win32k]
- Add system region support functions.
svn path=/trunk/; revision=45171
James Tabor [Thu, 21 Jan 2010 01:39:19 +0000 (01:39 +0000)]
[Win32k]
- Implement IntGdiSetBrushOwner for bug 5124.
svn path=/trunk/; revision=45170
James Tabor [Thu, 21 Jan 2010 00:49:25 +0000 (00:49 +0000)]
[User32]
- Revert 44988, fix crash in win user32 wine test.
svn path=/trunk/; revision=45169
James Tabor [Thu, 21 Jan 2010 00:14:06 +0000 (00:14 +0000)]
[Win32k]
- System regions do not possess user attribute sections. See bug 5124.
- Read the patch for more information.
svn path=/trunk/; revision=45168
Timo Kreuzer [Wed, 20 Jan 2010 23:34:21 +0000 (23:34 +0000)]
[RTL]
Fix a bug in RtlFindNextForwardRunSet, that was returning the wrong bit position. Found by Amine Khaldi.
svn path=/trunk/; revision=45167
Daniel Reimer [Wed, 20 Jan 2010 23:19:22 +0000 (23:19 +0000)]
Try to fix FF2 Download.
svn path=/trunk/; revision=45166
Timo Kreuzer [Wed, 20 Jan 2010 22:56:01 +0000 (22:56 +0000)]
[CRT]
Remove unused variables. Patch by Amine Khaldi.
svn path=/trunk/; revision=45165
Sir Richard [Wed, 20 Jan 2010 14:09:50 +0000 (14:09 +0000)]
[RBUILD]: Use correct kernel entrypoint symbol name. Forgot to commit this earlier.
Please, next time before you harass us with e-mails, try to read your logs. LD choses a random entrypoint if the symbol cannot be found.
svn path=/trunk/; revision=45162
Dmitry Gorbachev [Wed, 20 Jan 2010 10:59:39 +0000 (10:59 +0000)]
Fix build-2.
svn path=/trunk/; revision=45161
Dmitry Gorbachev [Wed, 20 Jan 2010 10:38:40 +0000 (10:38 +0000)]
Fix build.
svn path=/trunk/; revision=45160
Sir Richard [Wed, 20 Jan 2010 04:05:08 +0000 (04:05 +0000)]
[NTOS]: Implement KiSwapProcess in C.
[NTOS]: Implement KiIsNpxPresent and KiIsNpxErrataPresent in C. It's much clearer what these are doing now.
[NTOS]: Implement KiFlushNPXState and fix some bugs that were present in the ASM version, such as a wrong NPX state check.
[NTOS]: Implement working intrinsics for fxrstor, fxsave, fnsave and enable them for flushing. We'll update the FPU trap code to use these later.
svn path=/trunk/; revision=45156
James Tabor [Wed, 20 Jan 2010 01:40:27 +0000 (01:40 +0000)]
- Add dclevel flags.
svn path=/trunk/; revision=45155
Sir Richard [Tue, 19 Jan 2010 22:21:12 +0000 (22:21 +0000)]
[NTOS]: Workaround for GCC 4.4.x bug reported by Dmitry.
svn path=/trunk/; revision=45154
Kamil Hornicek [Tue, 19 Jan 2010 21:19:56 +0000 (21:19 +0000)]
- fix build, thanks Black_Fox
svn path=/trunk/; revision=45153