Commit graph

26 commits

Author SHA1 Message Date
Stefan Ginsberg bec72fa6a7 - Implement the ThreadDescriptorTableEntry case for NtQueryInformationThread. This is required for the GetThreadSelectorEntry routine used by user mode debuggers.
- #if out some x86-only LDT code from PS and move it to psldt.c.

svn path=/trunk/; revision=43827
2009-10-29 10:04:15 +00:00
Stefan Ginsberg 165bfe865b - STDCALL -> NTAPI
svn path=/trunk/; revision=37745
2008-11-29 20:47:48 +00:00
Stefan Ginsberg 12f349df1d - Remove the (now deprecated) ntoskrnl/internal/debug.h header and fix all its includers to use the global debug.h
svn path=/trunk/; revision=35806
2008-08-30 16:31:06 +00:00
Daniel Reimer ae7da04787 Delete all Trailing spaces in code.
svn path=/trunk/; revision=29690
2007-10-19 23:21:45 +00:00
Aleksey Bragin 8f33e033e4 - Add missing KERNEL_LARGE_STACK_COMMIT definition to DDK.
- Fix typo in MMWSL.
- Add RtlRandom to NDK.
- Add MEMORY_PRIORITY values to NDK.
- Add KeAcquireSpinLockRaiseToSynch to NDK.
- Make MmInitializeProcessAddressSpace take two more parameters: one to specify flags, such as large page support, and another one to define the process being cloned, when fork() support will be added.
- Add KeInvalidAccessAllowed to deal with page faults in the special S-List code. The assembly code currently handles simple faults, but our MmAccessFault handler needs to start verifying the fault too.
- Mark LoaderReserve pages as LoaderFree, it seems they end up this way in Windows.
- Use MmNumberOfPhysicalPages instead of MmStats.NrTotalPages.

All NDK changes are discussed with Alex.

svn path=/trunk/; revision=29254
2007-09-27 18:07:44 +00:00
Alex Ionescu 6497d295c3 - Add some missing/internal definitions to proper headers.
- Get rid of FLUSH_TLB macros and use KeFlushCurrentTb and the MSVC_compatible instrinsic __invlpg;
- Fix some prototypes.
- Fixed unsigned/signed mismatches.
- Fix SEH usage in ExAllocatePoolWithQuotaTag.

svn path=/trunk/; revision=24652
2006-10-25 18:23:45 +00:00
Alex Ionescu b5e25167e2 - Move all ASM internal intrinsics to intrin_i.h. Request for KJK::Hyperion/hackbunny to look at the GCC ones and optimize/fix them up.
- Add MSVC versions for some of them (not yet complete).
- Fix the fact that KeGetLocalDescriptorTable was setting the LDT instead of retrieving it.
- Fix bug in LIST_FOR_EACH and LIST_FOR_EACH_SAFE which was setting the flink to NULL instead of checking if the flink is NULL. One more reason these damned macros should've never been used.
- Use MSVC-intrinsics when applicable (_disable/_enable, etc).
- Fix JOB_SET_ARRAY problems.
- Fix buffer overflow in SystemProcessInformation QSI_DEF.
- Fix some broken compares/arithmetic to due to lack of parens.
- Add some ASSERTS to some unknown functions that make pointer assumptions.

svn path=/trunk/; revision=24650
2006-10-25 16:37:46 +00:00
Alex Ionescu faa5f58b84 - Remove KeGetCurrentProcess. This API doesn't exist.
- Add assertions to relevant functions in process.c and re-format some code.
- Check for invalid APC state in KeDetachProcess.
- Decrease process stack count while holding the Dispatcher Lock at DPC level.
- Implement KiSwapProcess in ctxswitch.S and add SMP-support and LDT swap support for the future, as well as updating the IOPM base in the TSS.

svn path=/trunk/; revision=24044
2006-09-10 20:23:02 +00:00
Alex Ionescu dd25974e25 - More MSVC fixes:
Additions or changes to headers: FSRTL_PER_FILEOBJECT_CONTEXT, FsRtlAreNamesEqual uses CONST buffers, KiIpiGenericCall + PKPIP_BROADCAST_WORKER, MmPageEntireDriver returns PVOID, Obf(De)referenceObject return LONG_PTR, KeGetPreviousMode is ExGetPreviousMode. KeGetCurrentPrcb is reimplemented in inline, MAX_PATH exposed to drivers.
- Changes: STATIC->static. static __inline ->FORCEINLINE. STDCALL -> NTAPI (Some). WORD/DWORD/BYTE -> NT Types.
- Kernel bugs fixed: Some string concatenations were broken, some functions had wrong return values.

svn path=/trunk/; revision=23941
2006-09-07 05:07:34 +00:00
Alex Ionescu d8155f97a7 - Remove LDT initialization, LDT shouldn't be initialized at bootup.
- Move LDT-only GDT routines to ldt.c
- Cleanup formatting of GDT-related exported function stubs in gdt.c and rename file to abios.c. Those routines deal specifically with the ABIOS GDT selectors and are for ABIOS support.
- Move the lone 2 routines in fpu.c to cpu.c.

svn path=/trunk/; revision=23895
2006-09-03 07:13:02 +00:00
Aleksey Bragin f792bc36a0 Relax restriction on the segment in NtSetLdtEntries(). Look into diff for details. Thanks to Myria for providing information.
There were no reasons found which can proof that this change could lead to security issues.

svn path=/trunk/; revision=23509
2006-08-06 22:02:02 +00:00
Alex Ionescu a06e494e71 - Update selector names to official names and define/use the MODE and RPL masks for more portable/clean code.
svn path=/trunk/; revision=19668
2005-11-27 03:08:35 +00:00
Filip Navara 0f030a82b0 - Move non-DDK Ke* function prototypes from ROS DDK to NTOS headers.
- Fix calling convention for KeI386* functions.

svn path=/trunk/; revision=16043
2005-06-18 15:15:25 +00:00
Steven Edwards e4be245882 strip whitespace from end of lines
svn path=/trunk/; revision=15164
2005-05-09 01:38:29 +00:00
Alex Ionescu 5267e6247e Update KPROCESS structure to latest version and document all its fields on the Wiki page. Move Kernel Structures to ke.h from ps.h, remove stuff from ntifs.h that shouldnt be there
svn path=/trunk/; revision=15027
2005-05-05 22:40:05 +00:00
Alex Ionescu 4b4d215e36 Thread Creation and Context Switching re-write, plus Idle/First Thread minimization attempt. Full changelog on ML, too large to post here
svn path=/trunk/; revision=14742
2005-04-22 12:52:25 +00:00
Alex Ionescu fe6116543e Standardize comment headers. Patch by Trevor McCort
svn path=/trunk/; revision=13311
2005-01-26 13:58:37 +00:00
Casper Hornstrup 1bf0775833 2004-08-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* ntoskrnl/include/.cvsignore: New file.
	* ntoskrnl/include/ntoskrnl.h: Ditto.
	* ntoskrnl/*/*.c: Use pre-compiled header.
	* ntoskrnl/Makefile: Support pre-compiled header.
	* tools/helper.mk: .pch files are now .gch files.

svn path=/trunk/; revision=10550
2004-08-15 16:39:12 +00:00
Aleksey Bragin 49f967d0ed Continue of MSVC-compiling changes....
I double checked, but in case someone's recent commit is somehow overwritten -- please, don't be very frustrated :) -- I will fix it, just drop me a note.

svn path=/trunk/; revision=7338
2003-12-30 18:52:06 +00:00
Royce Mitchell III cbbd90f4f1 C89 compatibility
svn path=/trunk/; revision=5718
2003-08-21 04:17:15 +00:00
David Welch f2d9fe4842 - Patch from PM implementing ldt and tss iobitmap support.
svn path=/trunk/; revision=5685
2003-08-19 23:59:08 +00:00
Casper Hornstrup 17c0b5798e Reverted latest changes.
svn path=/trunk/; revision=3473
2002-09-08 10:23:54 +00:00
Casper Hornstrup 387d432884 Use free Windows DDK and compile with latest MinGW releases.
svn path=/trunk/; revision=3466
2002-09-07 15:13:13 +00:00
David Welch f29036d97b Further SMP work (associate an idle thread with each processor)
svn path=/trunk/; revision=1808
2001-04-17 04:11:01 +00:00
David Welch 2cfadf3b41 per processor TSS
svn path=/trunk/; revision=1807
2001-04-16 23:29:55 +00:00
David Welch fc5f4ae9a5 Some work on portabilitity
svn path=/trunk/; revision=1687
2001-03-14 00:21:22 +00:00
Renamed from reactos/ntoskrnl/ke/ldt.c (Browse further)