[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
[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
- Diagnostic commit used for troubleshooting leaking region handles.
- Updates to headers and experimental code added for regions.
svn path=/trunk/; revision=45242
[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
[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
[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
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
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
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
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
[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
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