Commit graph

129 commits

Author SHA1 Message Date
Sylvain Petreolle 82cd2aad07 Merge RtlIpv4StringToAddressW fix from network branch.
svn path=/trunk/; revision=47699
2010-06-08 20:24:15 +00:00
Eric Kohl 00fbba2fb4 [NTOSKRNL / RTL]
- Implement BreakOnTermination case for NtQueryInformationProcess and NtSetInformationProcess.
- Implement RtlSetProcessIsCritical.

svn path=/trunk/; revision=47423
2010-05-29 18:22:47 +00:00
Timo Kreuzer 1a929a8b21 Reintegrate header branch part 5/x
- Formatting and properties
- delete xmldsodid.h

svn path=/trunk/; revision=46551
2010-03-29 03:16:25 +00:00
Timo Kreuzer 719200874a Revert r46466 this time for real
svn path=/trunk/; revision=46493
2010-03-27 18:57:56 +00:00
Timo Kreuzer d0701d72b7 Reintegrate header branch
- DDKAPI -> NTAPI
- delete duplicate definitions
- move files to right locations
- Fix Mm64BitPhysicalAddress definition
- Add a number of missing definitions
- add XDK

svn path=/trunk/; revision=46466
2010-03-26 13:50:02 +00:00
Timo Kreuzer fb69e522da Merge from amd64-branch:
44501 (tkreuzer)
[NDK]
- Add CLIENT_ID32/64
- Create explicit 32/64 bit versions of PEB, GDI_TEB_BATCH and TEB, using macros.
- Fix some member names.


44503 (tkreuzer)
[CMD]
Fix a teb member name

44504 (tkreuzer)
[NTSOKRNL]
Fix a teb member name

44506 (tkreuzer)
[NDK]
fix a typo in the TEB definition

44511 (tkreuzer)
[NDK]
- Add Wx86ThreadState
- Add WinXP version of ACTIVATION_CONTEXT_STACK
- rtltypes doesn't depend on pstypes, but the opposite way around now

44512 (tkreuzer)
[NDK]
Fix some dependencies

44521 (tkreuzer)
[NTDKK]
- Don't use PEB::FastPeb(Un)LockRoutine, these members are deprecated since Windows 2003, use RtlEnter/LeaveCriticalSection instead.

44523 (tkreuzer)
[NTDLL]
Fix usage of PEB::KernelCallbacktable. It's a PVOID.

44524 (tkreuzer)
NDK]
- Add missing TEB member for Vista

44525 (tkreuzer)
[NDK]
Fix a TEB array size.

44526 (tkreuzer)
[USER32]
More fix of TEB::KernelCallbackTable usage

svn path=/trunk/; revision=46434
2010-03-25 12:22:59 +00:00
Timo Kreuzer cbdf28bb6a [HEADERS]
Reintegrate header-work branch. Thanks to hours of boring work on the ddk headers (Most of it done by Amine Khaldi), we have now a decent set, which is still incomplete but already relatively close to latest WDK. A clean rebuild is recommended.

svn path=/trunk/; revision=46155
2010-03-12 23:16:29 +00:00
Timo Kreuzer 9ea495ba33 Create a branch for header work.
svn path=/branches/header-work/; revision=45691
2010-02-26 22:57:55 +00:00
Michael Martin e2e8b52413 SXS Support Part 1 of 2. All import work done by Samuel Serapión with some small changes my me.
[lib/rtl]
- Import Rtlxx and related functions for Activation Context Support from WINE.
- Implement RtlAllocateActivationContextStack.
- Modify get_manifest_in_manifest_file function to use FileStandardInformation vice FileEndOfFileInformation (currently unsupported) in call to NtQueryInformationFile.
- Add structs RTL_ACTIVATION_CONTEXT_STACK_FRAME and ACTIVATION_CONTEXT_STACK from WINE.
- Add ActivationContextStackPointer to TEB.
- Define QUERY_ACTCTX_FLAG_NO_ADDREF.Will become active with changes to ntdll loader in Part 2.

svn path=/trunk/; revision=44359
2009-12-02 09:43:35 +00:00
Stefan Ginsberg f84d5a02f4 - Fix support for /CRASHDEBUG and /NODEBUG; we didn't respect those settings properly and would initialize KD at boot even if they were set.
- Re-enable the breakpoint in vDbgPrintExWithPrefixInternal() as this works properly now. Without this breakpoint some break-in requests got lost if the break-in occurred when handling a debug print (happened a lot at boot).
- Implement Command String support for DbgCommandString() -- we now handle every debug service call.
- Implement NtSetDebugFilterState() and NtQueryDebugFilterState() for KD, meaning we now support debug filters properly.
- Implement KdRefreshDebuggerNotPresent(), KdChangeOption() and KdPowerTransition(). Stub KdSystemDebugControl() to return error status instead of hanging the system.
- Stub the rest of the KD API to print a warning and return a failure packet instead of hanging.
- Set and respect KdpContextSent when getting and setting the thread context -- WinDbg doesn't seem to rely on this, but better safe than sorry.
- Support MP when getting and setting the thread context too -- if the context is operation is for another processor than the current, just get it through the KiProcessorBlock array.
- Initialize the MajorVersion in the KD version block more properly -- the high byte is the major identifier (0 for NT). Add the required DBGKD_MAJOR_TYPES enumeration to wdbgexts.h.
- Simplify setting and clearing the InDbgPrint flag in the TEB to minimize the impact on kernel execution; use 2 dedicated routines instead of a generic one.
- KdpSymbol doesn't return anything, so don't return an ignore status from KdpReportLoadSymbolsStateChange.
- Expose the KdpDefaultRetries and Kd_WIN2000_Mask variables to the registry and add them to KDBG too (unused there).
- No reason to implement KdpSysGetVersion per architecture; move it back to the generic code.
- Add some ARM offsets to the debugger data block that (N/A on other architectures).
- Fix the default size of the DbgPrint log buffer for free builds to save some space. It should be 4 KB for a free build and 32 KB for a checked build.
- Move KeDisableInterrupts to cpu.c as it fits here more than in the IRQ support code in irqobj.c.
- Use KeDisableInterrupts in KeFreezeExecution instead of checking the x86 EFLAG directly.

svn path=/trunk/; revision=43912
2009-11-02 17:45:51 +00:00
Stefan Ginsberg eae6521fb2 - DBGKD_WAIT_STATE_CHANGE64 is used in KD protocol 5, not number 6 that we use. Protocol 6 uses the DBGKD_ANY_WAIT_STATE_CHANGE structure which is sized according to the largest control-report structure (AMD64_DBGKD_CONTROL_REPORT currently), and is larger than DBGKD_WAIT_STATE_CHANGE64 on x86. This worked because our DBGKD_WAIT_STATE_CHANGE32/64 structures contained incorrect DBGKD_CONTROL_REPORT (used) and CONTEXT (unused) members that sized up the wait-state structure to pass WinDbg's length verification! It actually becomes larger than DBGKD_ANY_WAIT_STATE_CHANGE, but WinDbg only seems bail out only if the structure is too small. Remove the incorrect members from the protocol 5 structures and change to DBGKD_ANY_WAIT_STATE_CHANGE everywhere.
- Correct the value of SIZE_OF_FX_REGISTERS -- it was 4 times too low which resulted in KeContextToTrapFrame not properly clearing out the XMM register area. Correct the define and move it out from ke.h to x86's ketypes.h and use it in the FXSAVE format structure. Also remove the IOPM definitions from ke.h as they have been in the NDK for a while.
- KD uses STRINGs, not ANSI_STRINGs -- they are the same thing, but let's be consistent.
- ExceptionRecord32To64 should be available for both 32 and 64 bit builds (and it shouldn't be a forceinline). Get rid of CopyExceptionRecord and determine if we need to convert or can just copy it directly instead.
- Use _WIN64 instead of _M_AMD64 when determining if we need to set the DBGKD_VERS_FLAG_PTR64 flag.
- Don't check Nt/DbgQueryDebugFilterState for zero or nonzero -- it actually returns TRUE, FALSE or STATUS_INVALID_PARAMETER_1! Check for != TRUE in preparation for proper implementation of NtSet/QueryDebugFilterState.
- Fix Format parameter of DbgPrintReturnControlC -- it is const like the other DbgPrint* routines.
- Be consistent with the types used in debug.c and don't set local variables to zero if we are going to return to caller -- this doesn't seem to be required anymore. 
- Fix DebugService and DebugService2: DebugService should take a ULONG followed by 4 pointers and DebugService2 doesn't return anything.
- Use ZwCurrentProcess() instead of -1 or 0xFFFFFFFF (which is incorrect for 64-bit) for the ProcessId parameter of DbgLoad/UnloadImageSymbols to clarify what is being passed. Don't use ZwCurrentProcess() in KeBugCheckWithTf for the pointer parameter of DbgUnLoadImageSymbols either. Use MAXULONG_PTR casted to PVOID instead.
- Use better named and sized variables in KdpTrap for setting the "return register" in the caller's CONTEXT.
- Correct and clarify the comment documenting under what conditions we pass user mode exceptions to the kernel debugger.

svn path=/trunk/; revision=43741
2009-10-25 15:56:38 +00:00
Stefan Ginsberg de4df47aec - Fix DbgLoadImageSymbols -- it doesn't return anything.
- Fix DbgQueryDebugFilterState -- it returns NTSTATUS, not BOOLEAN! Also fix the callers that depended on this.

svn path=/trunk/; revision=43341
2009-10-09 11:51:07 +00:00
James Tabor 7cdc0d481a - Quick implementation of RtlIsThreadWithinLoaderCallout.
svn path=/trunk/; revision=43029
2009-09-11 07:12:30 +00:00
Timo Kreuzer 900326bee8 merge from amd64 branch:
37966: Make IMAGE_ORDINAL_FLAG64 an ULONGLONG (Timo Kreuzer)
38111: Make sure UNALIGNED is not redefined (Samuel Serapión)
38423: Fix RtlAllocateHeap, RtlExtendHeap,RtlSizeHeap definitions.(Samuel Serapión)

svn path=/trunk/; revision=39445
2009-02-06 23:45:18 +00:00
Timo Kreuzer e88b1c8624 merge from amd64 branch:
37868: Add CONTEXT flags for x64 (Timo Kreuzer)
39346: Use intrinsics for rtl byteswap functions for GNUC, too. Only include them if NTOS_MODE_USER. (Timo Kreuzer)
39347: Move rtl byteswap functions to wdm.h and add intrinsic definitions (Timo Kreuzer)

svn path=/trunk/; revision=39439
2009-02-06 13:04:18 +00:00
Colin Finck f134ca1ab1 Use DECLSPEC_NORETURN and place it at the top of the prototype to fix MSVC compilation.
Hint by Stefan ;-)

svn path=/trunk/; revision=38852
2009-01-17 21:11:38 +00:00
Dmitry Gorbachev 5148a03069 Silence compiler warnings (1/11).
svn path=/trunk/; revision=37823
2008-12-03 17:28:24 +00:00
Stefan Ginsberg 6d811e8712 - Get rid of DDK's dependency on windef.h and winnt.h
- Clean up, fix, and add missing types to ntdef.h/ntifs.h/winddk.h/wdm.h/ntpoapi.h
- Add ntimage.h and use it in rossym and NDK
- Fix a gcc compatibility issue -- some internal NT structures have their pointer types defined in the DDK headers, but we define them along with the "struct" type when defining the full structure. MSVC is okay with this double definition, but gcc treats it as an error (hidden by system_header). Only define the "struct" type when declaring the full structure, making it compatible with both compilers.
- Also fix/add some types and header guards in NDK
- Clean up ks/portcls/drmk headers
- Fix incorrect types for some KS APIs (msdn is wrong for these) and add missing header guards
- Also, remove system_header (more of this coming up)

svn path=/trunk/; revision=37792
2008-12-01 15:12:23 +00:00
KJK::Hyperion b4e5e64c26 ASSERT really needs to be void, despite what DDK headers might say. Fixes following warning:
lib\rtl\srw.c: In function 'RtlAcquireSRWLockShared':
lib\rtl\srw.c:498: error: statement with no effect
lib\rtl\srw.c: In function 'RtlAcquireSRWLockExclusive':
lib\rtl\srw.c:637: error: statement with no effect
lib\rtl\srw.c:668: error: statement with no effect
lib\rtl\srw.c:696: error: statement with no effect
See issue #3922 for more details.

svn path=/trunk/; revision=37704
2008-11-28 14:33:21 +00:00
Aleksey Bragin 24da6d32fe - Fix some coverity errors.
- Use KeBugCheck(MEMORY_MANAGEMENT) instead of ASSERT(FALSE), so it dies on release builds too.
- Enable support for Hyper-V.
- Fix incorrect gate wait code -- fixes sporadic crashes in the network stack.
- Mark KeBugCheck*, ExRaise* and RtlRaiseStatus as declspec(noreturn), for better optimization of functions which call them, less potential warnings in the compiler, and, assuming coverity understands it, less false CIDs.
- Fix KiUpdateDr7, which resulted in broken support for hardware breakpoints.
- Fix failure cases in EnumerateRootDevices which might've freed non-allocated memory.
- Fix NtAddAtom/NtFindAtom logic when dealing with NULL or kernel Atom names.

Patch by Alex Ionescu.

svn path=/trunk/; revision=37668
2008-11-26 18:56:41 +00:00
Dmitry Chapyshev 6bcb4d4872 - Add stubs for RtlActivateActivationContext and RtlCreateActivationContext
svn path=/trunk/; revision=37578
2008-11-23 10:02:20 +00:00
Dmitry Chapyshev 3d4737cb72 - Fix RtlFindActivationContextSectionString prototype
svn path=/trunk/; revision=37575
2008-11-23 08:57:19 +00:00
Aleksey Bragin 354d1e506d - Cleanup 37394, 37396 and 37397:
* PRTL_OVERLAPPED_COMPLETION_ROUTINE is a Wine invention. We already have a type for that, since it's an APC routine, the type will be PIO_APC_ROUTINE.
 * Fix headers, actual stub, and usage in kernel32 respectively.
 * We don't use hungarian notation in RTL ("hFileHandle") .

svn path=/trunk/; revision=37399
2008-11-17 13:16:07 +00:00
Dmitry Chapyshev e415ae53c8 - Add stubs for RtlSetIoCompletionCallback
svn path=/trunk/; revision=37394
2008-11-17 11:44:31 +00:00
Stefan Ginsberg 420195308d - Uncomment NTDLL exports which we implement, and add stubs for numerous routines
- Add missing prototypes to NDK
- Implement RtlInterlockedCompareExchange64 and RtlGetCurrentProcessorNumber
- Rename RtlpCurrentPeb to RtlGetCurrentPeb and export it from NTDLL

svn path=/trunk/; revision=36166
2008-09-12 15:09:17 +00:00
ReactOS Portable Systems Group 840143e28a - Fix the way NlsOemLeadByteInfo is exported.
- Fix definition of PFAST_IO_UNLOCK_ALL_BY_KEY.
- Add IO_REPARSE and IO_REMOUNT definitions.
- Add IOCTL_CDROM_DISK_TYPE definition.
- Add FlagOn, BooleanFlagOn, SetFlag and ClearFlag definitions.
- Add FILE_READ_ONLY_VOLUME, FILE_SEQUENTIAL_WRITE_ONCE, FILE_SUPPORTS_TRANSACTIONS definitions.
- Add FSRTL_FLAG_ADVANCED_HEADER definition.
- Add FSRTL_FLAG2_PURGE_WHEN_MAPPED and FSRTL_FLAG2_IS_PAGING_FILE definitions.
- Add FILE_ID_FULL_DIR_INFORMATION and FILE_ID_BOTH_DIR_INFORMATION structures.
- Add FSRTL_FCB_HEADER_V0 and FSRTL_FCB_HEADER_V1 definitions.
- Add FSRTL_COMPARISION_RESULT enumeration.
- Add backwards compatibility support for non-AVL tree routines.
- Add RtlInsertElementGenericTableAvl, RtlDeleteElementGenericTableAvl, RtlLookupElementGenericTableAvl, RtlEnumerateGenericTableWithoutSplayingAvl prototypes.
- Add FsRtlSetupAdvancedHeader macro.
- Add FsRtlIsFatDbcsLegal prototype.
- Add FsRtlTeardownPerStreamContexts prototype.
- Add RtlFreeOemString, RtlOemStringToCountedUnicodeString, RtlUnicodeStringToCountedOemString, RtlOemToUnicodeN prototypes.
- Fix GenericTable prototypes in rtlfuncs.h
- It seems the ntoskrnl_i386.def exports file is totally incorrect with respect to mingw -- most FsRtl functions are not properly exported. We fixed the ones we need, someone needs to go fix this entire file.
- Add memcmp to the NTOS exports -- we're not entirely sure how you were even expecting 3rd party drivers to load in React?
- Fix FastFat's "VfatFastIoUnlockAllByKey" prototype to match the fixed up PFAST_IO_UNLOCK_ALL_BY_KEY definition.
- Clean-build-tested on i386.


svn path=/trunk/; revision=34611
2008-07-20 19:19:02 +00:00
Aleksey Bragin e00d31206e Yuriy Sidorov <jura@cp-lab.com>
- Implement RtlSetUserValueHeap, RtlSetUserFlagsHeap, RtlGetUserInfoHeap functions. It is quick implementation and it works.
- It fixes "Out of memory" error in all InnoSetup based installations. A lot of software can be at least installed in ReactOS now.
- Also it fixes Delphi applications which use TMemoryStream class.
See issue #3464 for more details.

svn path=/trunk/; revision=34404
2008-07-10 09:46:25 +00:00
Aleksey Bragin d409591250 - Update RtlIsTextUnicode (fixes some ntdll rtlstr winetests).
svn path=/trunk/; revision=33868
2008-06-06 21:33:43 +00:00
Aleksey Bragin 204acf76b0 Stefan Ginsberg <stefan__100__@hotmail.com>
- Remove ExTryToAcquireResourceExclusiveLite from NDK since it's not exported by NT kernel.
- Add ObSetSecurityObjectByPointer, RtlInitAnsiStringEx (and implement it, rather straightforward) to NDK.
- Uncomment exports in ntoskrnl_i386.def which are already implemented.
- Add KeInvalidateAllCaches to ARM's stubs.

svn path=/trunk/; revision=33825
2008-06-02 10:21:49 +00:00
Aleksey Bragin 7347f5ab15 Stefan Ginsberg <stefan__100__@hotmail.com>
- Fix the commented out export in win32k.def and fix the definition for EngGetCurrentCodePage.
- Add RtlGetDefaultCodePage to NDK headers.

svn path=/trunk/; revision=33609
2008-05-20 13:21:21 +00:00
James Tabor dddfb3a0cb Move thread pool functions prototypes to ndk.
svn path=/trunk/; revision=32801
2008-04-01 01:07:09 +00:00
Hervé Poussineau 2681f2febc Fix return type
svn path=/trunk/; revision=32288
2008-02-11 13:19:06 +00:00
Hervé Poussineau a3445ec1e4 Add RtlTimeToSecondsSince1970() prototype
svn path=/trunk/; revision=32284
2008-02-11 12:49:21 +00:00
Aleksey Bragin 7b3487eb9a - Sync NDK changes.
svn path=/trunk/; revision=31835
2008-01-16 23:19:01 +00:00
Gregor Brunmar f1546e5b22 Added RtlCopySecurityDescriptor
svn path=/trunk/; revision=29837
2007-10-23 21:42:03 +00:00
Aleksey Bragin fe7669dea4 - KeRosCaptureUserStackBackTrace is now created, which calls RtlWalkFrameChain with the user-mode flag, meaning that bugchecks finally show the user-mode stack again!
- KeRosDumpStackFrames is fixed so that if the EIP can't be found in a module list, it's still displayed (just without the module name). Previously the EIP would not be shown, resulting in code running on the heap/stack/somewhere else not being shown as part of the trace.

svn path=/trunk/; revision=29332
2007-10-01 17:58:49 +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
Thomas Bluemel ff56fe5fb3 Some more function prototype fixes and pointer type warning fixes
svn path=/trunk/; revision=27977
2007-07-28 21:30:16 +00:00
Thomas Bluemel 025c8a964b Fix some prototypes
svn path=/trunk/; revision=27967
2007-07-28 19:20:30 +00:00
Alex Ionescu 2d88738681 - NDK updates and compatibility fixes for Vista/WDK/User-Mode/Individual per-file NDK Usage.
- Update targets to pentium to take advantage of cmpxhg8b when possible. (ROS won't run on 386/486 anyway).
- Fix some compiler problems when building with -O3.

svn path=/trunk/; revision=26274
2007-04-07 05:33:30 +00:00
Alex Ionescu e126eb3077 - Add KdDebuggerInitialize1 and enable call to it.
- Fix KD_SYMBOLS_INFO definition and DbgLoadImageSymbols prototype.
- Implement DbgUnLoadImageSymbols.
- Fix some small bugs in KeBugCheckWithTf and add various debugger calls/checks where needed.
- Fix bugcheck recursion code which was incorrect.

svn path=/branches/alex-kd-branch/; revision=25837
2007-02-18 20:47:04 +00:00
Alex Ionescu c307d73c12 - Fix ExInitPoolLookasidePointers and ExpInitailizeLookasideLists.
- Implement DbgLoadImageSymbols, Implement DebugService, and ExpLoadBootSymbols during phase 0 executive init to make KD load the symbols for all the boot drivers, and optionally breakpoint. Not yet useful since we don't have KD.
- Detect /BURNMEM and /PERFMEM and go all the way to determining the pages required, but warn the user that we don't support these flags yet.
- Detect FLG_KERNEL_STACK_TRACE_DB and FLG_ENABLE_EXCEPTION_LOGGING and warn that we don't support these yet.
- Add call to Cm to setup system variables, but disable until cm rewrite.
- Add PnP Manager initialization call and implement PnP Manager Phase 0 initialization (PiInitPhase0, PpInitializeDeviceReferenceTable), but this isn't used for now.
- Move MmInit2 to Phase 1 initialization, and initailize bootvid there as well.
- Add/Fix missing definitions, prototypes to NDK/NTIFS.

svn path=/trunk/; revision=25621
2007-01-24 19:48:34 +00:00
Alex Ionescu c0a3750d26 - Fix critical bugs in exception handling: Unwinding was completely broken, using the wrong SEH protector to detect collided unwinding. The correct protector itself also had a broken check.
- Fix architectural bug in the entire TrapFrame<->Context conversion system and Ring Privilege Transitions (Inter-ring and intra-ring) which was lacking proper sanitation and validation of segments, flags and debug registers. Among other things, IOPL is now respected, CS is not KGDT_R0_CODE | RPL_MASK anymore, and the GPF code is now properly being called. This completely fixes exception handling being totally broken and crashing firefox installer, mirc, and other applications.
- Rewrite the page fault handler base code in assembly instead of relying on a broken C routine. Detect VDM, V8086, detecting expected/normal fault in ExpInterlockedPopEntrySList and faults in the system handler code. Rewrite MmAccessFault to be the main function that calls out to other sub-fault functions, and use the same prototype as NT.
- Fix the KGDT boot table to have proper granularity and big flags, and extend it to 256 entries.
- Create proper thread context in RtlInitializeContext and cleanup Rtl Thread routines.
- Remove all int3 and breakpoints from trap handlers, and replace them with a much better "UNHANDLED_PATH" macro which freezes the system, beeps, and displays a message with the line of code that's unhandled. This is to clearly tell the user that something is unhandled, instead of nesting infinite exceptions due to the int3.
- Fix a bug in INT_PROLOG.
- Sanitize EFLAGS and Code Segments in KeContextToTrapFrame and KeTrapFrameToContext.
- Implement KiUpdateDr7 and KiRecordDr7 as well as DR_MASK and other DR-validation macros and functions to protect against DR-vulnerabilites as well as to properly account for each active hardware breakpoint in a per-thread fashion by using the dispatcher header.
- Allow CR0_EM when running in a VDM.
- Fix FPU/NPX Register handling in KeContextToTrapFrame and KeTrapFrameToContext, and also speed it up by manual copying instead of a memory move.
- Properly give IOPL 3 to user-mode threads if they requested it.
- Detect GPF during GPF.
- Detect pagefault with a trap-frame spread over two or more pages and nested.
- Properly sanitize and set correct trap frame in KiInitailizeUserApc.
- Return STATUS_ACCESS_VIOLATION during page faults instead of STATUS_UNSUCESSFUL. 
- Fix assert in VdmSwapContext, as well as Code Selector check which was broken.
- Fix delayed object deletion (ObDeferDeleteObject) and the Ob Repear Routine and list.
- Update Kernel Fun.
- BUGBUG: Temporaily hack VMWare to detection to always detect VMWare.

svn path=/trunk/; revision=25238
2006-12-29 18:49:00 +00:00
Thomas Bluemel eb04d1528e - Correct definition of DbgPrompt
- Add definitions for the CSTRING structure

svn path=/trunk/; revision=24791
2006-11-19 21:14:49 +00:00
Alex Ionescu 312f07d0e5 - Major changes to HAL/kernel loading and freeldr hacks:
- Add PE routines for traversing the import table and fixing up the imports.
  - Add routine for getting the LOADER_MODULE for a freeldr module by name.
  - Add the ability to load a not-yet-loaded-driver that's in an import entry (ie: dependencies). Only used for HAL now.
  - Map HAL in the same was as the kernel, instead of relocating it as a hack from within the kernel.
  - Refactor some routines to better share code. Don't read freed memory anymore.
  - Use LdrRelocateImageWithBias instead of quintuplicating relocation code.
  - Parse kernel and HAL imports while PE-loading from within freeldr.
  - Remove dozens of freeldr.c hacks from the kernel. Remove slow code which was making two copies of the parameter block and wasting over 30KB in static strings that were immediately copied to other strings...
  - Don't use HalModuleObject and NtoskrnlModuleObject anymore. Remove LdrSafePEProcessModule and other similar boot-time hacks. Reimplement MmGetSystemRoutineAddress.
- NDK/DDK fixes.
- Add KDCOM to bootcd/installation.

svn path=/trunk/; revision=24778
2006-11-19 17:53:31 +00:00
Alex Ionescu 7c42b991f3 - One school day and two midterms later, I'm still the only one with enough time to fix a header. Can't wait to see who will be up for trying to fix booting...
svn path=/trunk/; revision=24550
2006-10-17 04:20:48 +00:00
Alex Ionescu cef2ebcee2 - Implement RtlIsGenericTableEmpty, RtlNumberGenericTableElements.
- Implement RtlLookupElementGenericTable.
- Implement RtlDeleteElementGenericTable

svn path=/trunk/; revision=24542
2006-10-16 03:39:49 +00:00
Alex Ionescu dbb8a15d7c - Added some generic table routines to rtlfuncs.h so that they can be used in user-mode.
- Implemented RtlInsertElementGenericTable and RtlInsertElementGenericTableFull (Splay-Tree versions). Also implemented a helper function RtlpFindGenericTableNodeOrParent when we're not given one and need to locate it manually.
- Defined structure for generic table entries so that we can properly return user data and do the right allocations.

svn path=/trunk/; revision=24541
2006-10-16 03:19:14 +00:00
Thomas Bluemel ef9ac412e7 Implemented AddMandatoryAce
svn path=/trunk/; revision=24526
2006-10-15 16:52:25 +00:00
Thomas Bluemel ac14f5a033 Fix LdrRelocateImageWithBias prototype: Strings in C are neither signed nor unsigned, and they are constants. Fixes warnings with GCC4
svn path=/trunk/; revision=24036
2006-09-10 17:16:59 +00:00