reactos.git
14 years ago[NTOS]: Fix L1/L2 cache detection and write out the size and associativity. Now that...
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

14 years ago[NDK]: Fix KPCR definition.
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

14 years ago[NTOS]: Remove checks for VDM alert during GPF. This is a Windows-specific hack for...
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

14 years ago[PERF]: Not in any way a scientific number you should bet the farm on, but we do...
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

14 years ago[Win32k]
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

14 years ago - Merge aicom-network-branch (still without the NDIS stuff)
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

14 years agoUpdate piperead to Version 0.3 (Jan Roeloffzen)
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

14 years agoUpdate log2lines to Version 1.11 (Jan Roeloffzen) Bug 4342
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

14 years ago[NTOS/PERF]: Enable VME support. VME stands for Virtual 8086 Mode Extensions, and...
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

14 years ago[NTOS]: Trunk boots now (interesting that buildbot's QEMU does not support SYSENTER...
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

14 years ago[NTOS]: Rework the trap macros again. This time we needed some added complexity becau...
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

14 years agoOutput PCH, not dependencies.
Dmitry Gorbachev [Wed, 27 Jan 2010 02:29:36 +0000 (02:29 +0000)]
Output PCH, not dependencies.

svn path=/trunk/; revision=45279

14 years ago- Turn off debug print outs.
James Tabor [Wed, 27 Jan 2010 00:06:48 +0000 (00:06 +0000)]
- Turn off debug print outs.

svn path=/trunk/; revision=45278

14 years ago[HAL]: Implement the profile and clock interrupt trap/handlers in C instead of ASM...
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

14 years ago[HAL]: Rewrite all V8086-related code in C instead of ASM. Delete v86.s. Makes uses...
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

14 years ago[PERF]: What to do when your SYSEXIT code has a bug? Set KiFastSystemCallDisable...
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

14 years ago[PERF]: After spending the better part of the last two days rewriting the HAL V8086...
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

14 years ago[BOOTVID]: Fix completely broken VidInitialize routine. I have no idea what the origi...
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

14 years ago[NTOS]: Refactor some stub code and add a couple of more possible trap exit mechanism...
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

14 years ago[HAL]: Move the HalpApcInterrupt and HalpDispatchInterrupt to pic.c now that there...
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

14 years ago[NTOS]: Implement a C/Extended ASM macro for generating trap stubs, removing the...
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

14 years ago- Update Ukrainian translation by Igor Paliychuk (igor-hkr[at]mail[dot]ru)
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

14 years ago[NTOS]: Split the GENERATE_TRAP_HANDLER in two separate macros. The original builds...
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

14 years ago[HAL]: Implement HalEndSystemInterrupt and HalpEndSoftwareInterrupt. Remove more...
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

14 years ago[Win32k|Ggi32]
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

14 years ago[HAL]: Implement HalRequestSoftwareInterrupt in C instead of ASM. Remove deprecated...
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

14 years ago[HAL]: KfLowerIrql in C instead of ASM. Add the SWInterruptLookUpTable and SWInterrup...
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

14 years ago[HAL]: Okay, this one was my fault, forgot to built the nasty-ass HALMPS. Move the...
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

14 years agoYou really need to get your compiler version shit together. I was told GCC 4.4 is...
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

14 years ago[HAL]: Implement and document the HalpSpecialDismissTable. Explain how each IRQ shoul...
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

14 years ago[HAL]: Implement HalEnableSystemInterrupt and HalDisableSystemInterrupt in C instead...
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

14 years ago[HAL]: Document and implement KiI8259MaskTable in C using actual bit positions. Each...
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

14 years ago[HAL]: Implement KeGetCurrentIrql, KeRaiseIrqlToDpcLevel, KeRaiseIrqlToSynchLevel...
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

14 years ago[HAL] Merge HalpAcquireSystemHardwareSpinLock and HalpReleaseCmosSpinLock from Timo...
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

14 years ago- Use __builtin_trap for old GCC, too.
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

14 years ago[PERF]: Make the trap entry/exit macros inlined, just as they used to be before in...
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

14 years agoComment out DECLSPEC_NORETURN for now.
Dmitry Gorbachev [Sun, 24 Jan 2010 02:25:20 +0000 (02:25 +0000)]
Comment out DECLSPEC_NORETURN for now.

svn path=/trunk/; revision=45230

14 years agoUse for GCC before 4.5, too...
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

14 years agoTrying r45222 hack again...
Dmitry Gorbachev [Sun, 24 Jan 2010 01:58:20 +0000 (01:58 +0000)]
Trying r45222 hack again...

svn path=/trunk/; revision=45228

14 years agoPut #endif where it should be.
Dmitry Gorbachev [Sun, 24 Jan 2010 01:47:27 +0000 (01:47 +0000)]
Put #endif where it should be.

svn path=/trunk/; revision=45227

14 years agoForgot ntdef.h
Dmitry Gorbachev [Sun, 24 Jan 2010 01:37:13 +0000 (01:37 +0000)]
Forgot ntdef.h

svn path=/trunk/; revision=45226

14 years agoTrying to fix build...
Dmitry Gorbachev [Sun, 24 Jan 2010 01:35:25 +0000 (01:35 +0000)]
Trying to fix build...

svn path=/trunk/; revision=45225

14 years agoFix vmwinst.exe crash (bug #5134).
Dmitry Gorbachev [Sun, 24 Jan 2010 00:50:54 +0000 (00:50 +0000)]
Fix vmwinst.exe crash (bug #5134).

svn path=/trunk/; revision=45224

14 years ago[PERF]: Make all trap handlers, trap exit code, fatal exit code, and exception dispat...
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

14 years ago[PSDK]: Define DECLSPEC_NORETURN for MSVC and GCC.
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

14 years ago[Win32k]
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

14 years agoFix initialization of PICs.
Dmitry Gorbachev [Sat, 23 Jan 2010 23:39:43 +0000 (23:39 +0000)]
Fix initialization of PICs.

svn path=/trunk/; revision=45220

14 years agoFix build.
Dmitry Gorbachev [Sat, 23 Jan 2010 21:57:15 +0000 (21:57 +0000)]
Fix build.

svn path=/trunk/; revision=45218

14 years ago[PERF]: Replace early ZwClose system calls with ObCloseHandle(KernelMode). This avoid...
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

14 years agoRemove duplicate definitions (now in time.c).
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

14 years ago- fix and add German translations
Matthias Kupfer [Sat, 23 Jan 2010 20:18:23 +0000 (20:18 +0000)]
- fix and add German translations

svn path=/trunk/; revision=45215

14 years ago[NTOS]: Export the C KiEoiHelper alongside the ASM Ke386EoiHelper. Yes, this is a...
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

14 years ago[NDK]: Some prototype fixes.
Sir Richard [Sat, 23 Jan 2010 19:29:33 +0000 (19:29 +0000)]
[NDK]: Some prototype fixes.

svn path=/trunk/; revision=45213

14 years ago[NTOS]: KiDispatchInterrupt crushes EBX, so maybe it should preserve it first? This...
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

14 years agoJose Catena <jc1@diwaves.com>
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

14 years ago[PERF]: Do not declare the PCR in KeGetPcr as volatile. It is only volatile as in...
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

14 years agoFix English translation of RApps. Andrew Faulds (ajfweb =at= googlemail =dot= com...
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

14 years ago- Add/update Ukrainian translation by Sakara Yevhen (eresid[at]gmail[dot]com) and...
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

14 years ago- Add/update Ukrainian translation by Sakara Yevhen (eresid[at]gmail[dot]com) and...
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

14 years ago[Win32k]
James Tabor [Fri, 22 Jan 2010 01:29:21 +0000 (01:29 +0000)]
[Win32k]
- Remove CriticalRegion calls.

svn path=/trunk/; revision=45198

14 years ago[Win32k]
James Tabor [Fri, 22 Jan 2010 01:12:06 +0000 (01:12 +0000)]
[Win32k]
- Remove CriticalRegion calls.

svn path=/trunk/; revision=45197

14 years agoMerge from amd64-branch:
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

14 years ago[HAL]
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

14 years ago[HAL]
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

14 years ago[HAL]: The HAL is a mess. Fix build.
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

14 years ago[Win32k]
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

14 years ago[HAL]: Initialize the i8259A PIC controllers in C, and add register structures and...
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

14 years agoMerge aicom-network-branch (without NDIS changes for now)
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

14 years ago[Win32k]
James Tabor [Thu, 21 Jan 2010 02:58:52 +0000 (02:58 +0000)]
[Win32k]
- Add system region support functions.

svn path=/trunk/; revision=45171

14 years ago[Win32k]
James Tabor [Thu, 21 Jan 2010 01:39:19 +0000 (01:39 +0000)]
[Win32k]
- Implement IntGdiSetBrushOwner for bug 5124.

svn path=/trunk/; revision=45170

14 years ago[User32]
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

14 years ago[Win32k]
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

14 years ago[RTL]
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

14 years agoTry to fix FF2 Download.
Daniel Reimer [Wed, 20 Jan 2010 23:19:22 +0000 (23:19 +0000)]
Try to fix FF2 Download.

svn path=/trunk/; revision=45166

14 years ago[CRT]
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

14 years ago[RBUILD]: Use correct kernel entrypoint symbol name. Forgot to commit this earlier.
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

14 years agoFix build-2.
Dmitry Gorbachev [Wed, 20 Jan 2010 10:59:39 +0000 (10:59 +0000)]
Fix build-2.

svn path=/trunk/; revision=45161

14 years agoFix build.
Dmitry Gorbachev [Wed, 20 Jan 2010 10:38:40 +0000 (10:38 +0000)]
Fix build.

svn path=/trunk/; revision=45160

14 years ago[NTOS]: Implement KiSwapProcess in C.
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

14 years ago- Add dclevel flags.
James Tabor [Wed, 20 Jan 2010 01:40:27 +0000 (01:40 +0000)]
- Add dclevel flags.

svn path=/trunk/; revision=45155

14 years ago[NTOS]: Workaround for GCC 4.4.x bug reported by Dmitry.
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

14 years ago- fix build, thanks Black_Fox
Kamil Hornicek [Tue, 19 Jan 2010 21:19:56 +0000 (21:19 +0000)]
- fix build, thanks Black_Fox

svn path=/trunk/; revision=45153

14 years ago[FREELDR]: Jump to a standard 1-parameter STDCALL kernel entrypoint instead of a...
Sir Richard [Tue, 19 Jan 2010 18:27:24 +0000 (18:27 +0000)]
[FREELDR]: Jump to a standard 1-parameter STDCALL kernel entrypoint instead of a FASTCALL double-parameter entrypoint.
[NTOS]: Make KiSystemStartup the real C entrypoint of the kernel, and move the "Am I being booted by FreeLDR" logic inside it -- it will then call KiRosPrepareForSystemStartup as earlier.
[NTOS]: Move the Double Fault and Boot Stack declaration in C code, with the proper alignment attribute.
[NTOS]: Although the concern that KiSystemStartup cannot be 100% C since it modifies ESP is real (Thomas' original fix of Alex's code), we don't need that much of it in assembly. Instead, write a simple trampoline (KiSwitchToBootStack) inline which switches stacks and jumps to a second-stage C function.
[NTOS]: Completely remove boot.S as it isn't needed anymore, ReactOS startup is back to being (nearly) 100% C.

svn path=/trunk/; revision=45152

14 years ago[NTOS]: Try backing out a change to see if thix fixes BuildBot.
Sir Richard [Tue, 19 Jan 2010 15:26:16 +0000 (15:26 +0000)]
[NTOS]: Try backing out a change to see if thix fixes BuildBot.

svn path=/trunk/; revision=45150

14 years agoUpdate the d3dx9_XX.dll files to the recent wine release version. Mostly stubs, but...
Daniel Reimer [Tue, 19 Jan 2010 10:09:33 +0000 (10:09 +0000)]
Update the d3dx9_XX.dll files to the recent wine release version. Mostly stubs, but many games appreciate their existance.

svn path=/trunk/; revision=45149

14 years ago[NTOS]: Implement GUI thread promotion during the first GUI system call in C. This...
Sir Richard [Tue, 19 Jan 2010 09:45:30 +0000 (09:45 +0000)]
[NTOS]: Implement GUI thread promotion during the first GUI system call in C.  This is tricky due to EBP, and actually requires some tiny inline ASM magic to make it work right.
[NTOS]: Implement SYSENTER system calls in C as well.

All system calls are now handled in C. This code will be further optimized/refined soon.

svn path=/trunk/; revision=45148

14 years ago[NTOS]: Convert system call handling to C. Only kernel system calls are done this...
Sir Richard [Tue, 19 Jan 2010 09:20:40 +0000 (09:20 +0000)]
[NTOS]: Convert system call handling to C. Only kernel system calls are done this way for now, not SYSENTER calls from user-mode. A small ASM trampoline is used inline for the call itself.

svn path=/trunk/; revision=45147

14 years ago[NTOS]: Fix build.
Sir Richard [Tue, 19 Jan 2010 08:51:37 +0000 (08:51 +0000)]
[NTOS]: Fix build.

svn path=/trunk/; revision=45146

14 years ago[NTOS]: We don't actually need wrappers for NtContinue/NtRaiseException. These are...
Sir Richard [Tue, 19 Jan 2010 08:41:03 +0000 (08:41 +0000)]
[NTOS]: We don't actually need wrappers for NtContinue/NtRaiseException. These are now fully portable C code, so move them appropriately.

svn path=/trunk/; revision=45145

14 years ago[NTOS]: Kei386EoiHelper now jumps into the C KiEoiHelper. All interrupt exit is now...
Sir Richard [Tue, 19 Jan 2010 08:35:37 +0000 (08:35 +0000)]
[NTOS]: Kei386EoiHelper now jumps into the C KiEoiHelper. All interrupt exit is now done through the C trap exit code.
[NTOS]: The ASM KiServiceExit/KiServiceExit2 are no more. All system call exit is now done through the C trap exit code.

svn path=/trunk/; revision=45144

14 years ago[NTOS]: Implement the special NtRaiseException in C as well, just like we did for...
Sir Richard [Tue, 19 Jan 2010 08:26:25 +0000 (08:26 +0000)]
[NTOS]: Implement the special NtRaiseException in C as well, just like we did for NtContinue.

svn path=/trunk/; revision=45143

14 years ago[NTOS]: Implement "Edited Trap Frame" exit. This funky trick is actually how NT emula...
Sir Richard [Tue, 19 Jan 2010 08:20:12 +0000 (08:20 +0000)]
[NTOS]: Implement "Edited Trap Frame" exit. This funky trick is actually how NT emulates longjmp/setjmp when doing an NtContinue: it allows arbitrary return with a new CS/ESP.
[NTOS]: Implement C version of KiServiceExit, the second system call exit routine. This one sets a new EAX value to be returned to the caller and is used by system calls.
[NTOS]: Implement NtContinue in C instead of ASM. Due to the changes above, this can now be done in C and use the new KiServiceExit.

svn path=/trunk/; revision=45142

14 years ago[NTOS]: Implement KiServiceExit2, C Version. This is used for exiting to user-mode...
Sir Richard [Tue, 19 Jan 2010 06:34:15 +0000 (06:34 +0000)]
[NTOS]: Implement KiServiceExit2, C Version. This is used for exiting to user-mode with full state restore (as in NtContinue, thread startup, NtRaiseException...).
[NTOS]: Implement system service exit (for system calls or KiServiceExit2) in KiExitTrap. Both iret (for user calls), jmp (for kernel calls) and sysexit (for user fast calls) are implemented.
[NTOS]: Implement KiThreadStartup in C instead of ASM. It is the first caller of the new KiServiceExit2. Threads now start up in C!

svn path=/trunk/; revision=45141

14 years ago[NTOS]: Implement KeUpdateSystemTime and KeUpdateRunTime in C instead of ASM. Based...
Sir Richard [Tue, 19 Jan 2010 06:16:47 +0000 (06:16 +0000)]
[NTOS]: Implement KeUpdateSystemTime and KeUpdateRunTime in C instead of ASM. Based off eVb's ARM implementation, with multiple bugs fixed (incorrect update of system counters, incorrect expiration of timers, remove non-used debug features, use locks when needed).
[NTOS]: Implement KiComputeTimerTableIndex in C instead of ASM. Based off eVb's ARM implementation, bugfixed to do correct math instead.

As a side effect, this should fix timers on ARM ;-)

svn path=/trunk/; revision=45140

14 years ago[WINDOWSCODECS]
Christoph von Wittich [Mon, 18 Jan 2010 20:39:30 +0000 (20:39 +0000)]
[WINDOWSCODECS]
update wincodec.idl to wine 1.1.36

svn path=/trunk/; revision=45139

14 years ago[WINDOWSCODECS]
Christoph von Wittich [Mon, 18 Jan 2010 20:36:58 +0000 (20:36 +0000)]
[WINDOWSCODECS]
update windowscodecs to wine 1.1.36

svn path=/trunk/; revision=45138

14 years ago[NTOS]
Timo Kreuzer [Mon, 18 Jan 2010 17:24:28 +0000 (17:24 +0000)]
[NTOS]
Fix possible NULL pointer dereference. Spotted by Amine Khaldi.

svn path=/trunk/; revision=45137

14 years ago[MSHTML_WINETEST]
Christoph von Wittich [Mon, 18 Jan 2010 16:59:11 +0000 (16:59 +0000)]
[MSHTML_WINETEST]
update mshtml winetest to wine 1.1.36

svn path=/trunk/; revision=45136

14 years ago[MSXML3]
Christoph von Wittich [Mon, 18 Jan 2010 16:53:59 +0000 (16:53 +0000)]
[MSXML3]
update msxml3 to wine 1.1.36

svn path=/trunk/; revision=45135

14 years ago[NTOS]
Timo Kreuzer [Mon, 18 Jan 2010 16:43:58 +0000 (16:43 +0000)]
[NTOS]
Fix buffer overrun in ExFreePoolWithTag when dealing with a PoolType other than NonPagedPool and PagedPool. Spotted by Amine Khaldi.

svn path=/trunk/; revision=45134