Removed some bad optimization ideas that never worked anyway. If you want optimization, use the uglier _SEHX macros. If you enjoy several huge, non-optimizable nested loops in all of your functions, just keep using the _SEH form
deleted include/reactos/libs/pseh/native.h
deleted include/reactos/libs/pseh/prettybased.h
Deleted some really bad ideas that nobody used or maintained anyway
All and all else
Reformatted. Goodbye one-space indentation, hello tabs
svn path=/trunk/; revision=25908
- Fix warning when using FEATURE_UNIX_FILENAME_COMPLETION.
- Make unix-style completion work correctly.
- Make %time% return milliseconds/10.
svn path=/trunk/; revision=25896
- This means that:
- 1) FreeLDR now keeps memory accounting information for the image files it loads, instead of us randomly writing to memory.
- 2) We now skip sections marked as NO_LOAD. The kernel already re-mapped drivers doing this, but it didn't remap the kernel/hal, plus we still had to map the drivers once in FreeLDR, so we're saving a meg+ of kernel memory.
svn path=/trunk/; revision=25894
- Finally load driver images like human beings, as actual image section objects instead of random memory that we allocate and manually "load" using unsafe and crappy PE memory copies. We now use KJK's integer-safe and properly documented/implemented loader for image sections that is already used for processes and other user-mode images.
- Implement MiLoadImageSection for the task above and remove all the deprecated code that did the previous hackloading.
svn path=/trunk/; revision=25891
- Remove /ldr ntoskrnl directory, since this module is finally gone.
- Make PsInit code search for ntdll lookups using LookupEntryPoint internal function, instead of LdrGetProcedureAddress. Same code but done with recursion instead, and internal to this module (remove ANSI_STRINGs since we don't need them anymore).
svn path=/trunk/; revision=25886
- Rename LdrUnloadModule to MmUnloadSystemImage and:
- Use MmSystemLoadLock.
- Take into consideration the import list.
- Honour load count.
- Unload symbols if really unloading the image.
- Dereference and clear imports.
- Do proper LdrEntry cleanup.
- Stub MiDereferenceImports and MmCallDllInitialize.
- Implement MiLocateExportName and MiClearImports.
- We don't yet fully support reference counting imports...this is still TBD.
svn path=/trunk/; revision=25885
- Implement MiProcessLoaderEntry for adding/removing entries on the PsLoadedModuleList.
- Move MmLoadSystemImage from loader.c to sysldr.c
- Update MmLoadSystemImage:
- Use MmSystemLoadLock.
- Support returning the entry for an already-loaded image, instead of loading it twice.
- Use Section APIs to map the image... we're still doing a dirty ZwReadFile hack, but at least now we can depend on the PE code to validate the image (so removed the hardcoded validation).
- Add more generic cleanup got so we can just jump to it.
- Add more stub code and detection code for upcoming features.
svn path=/trunk/; revision=25883
- Create and initialize Mm Loader lock.
- Re-arrange some code in MmLoadSystemImage, no code changes yet.
- Add new LDRP_ flags for LDR_DATA_TABLE_ENTRY to the NDK.
svn path=/trunk/; revision=25881
- Implement LdrPEFixupForward in FreeLDR and update LdrPEGetExportByName to use it, so that FreeLDR can now parse import tables with forwarders.
- Add call to MmInitSystem for Phase 0 in ExpInitializeExecutive.
- Completely redesign the way boot drivers are handled. They're now re-mapped during Phase 0 MmInit (part of the re-mapping is a hack until FreeLDR 2.5 is ready) and the IoMgr only does I/O stuff, not PE loading anymore (this is only half-true, we still process imports until FreeLDR 2.5 is done).
- Also re-design the way the module list head is initialized and used. LdrInit1 is now gone, Phase 0 MmInit now handles initializing it and copying boot loader data to it.
- Some code is still missing and functions still need to be improved.
- When FreeLDR 2.5 is ready some of the hacks will go away, they're #ifed for now to make it easy to switch.
svn path=/trunk/; revision=25874
- Start implementing some routines of the Mm SysLdr. Implemented MiSnapThunk and most of MiResolveImageReferences. The SysLdr has a lot of restrictions that the typical Ldr in user-mode doesn't, as well as manages imports and reference counts them, so the code can't be shared with ntdll's Ldr (this is also why real NT doesn't have an Ldr component, and this is in Mm).
- Fix some PE Header types that were wrong in our PSDK.
svn path=/trunk/; revision=25872
rewrote NtGdiDdQueryDirectDrawObject so it only copy the cache data only. This will speed up allot. we only need call on NtGdiDdCreateDirectDrawObject yo setup the whole cache and enable the drv with the helper functions. the NtGdiDdQueryDirectDrawObject will be faster like this. using RtlCopyMemory insted for RtlMemMove and allot other change in it. adding _SEH to NtGdiDdQueryDirectDrawObject so user can not crash it any longer.
svn path=/trunk/; revision=25870
- Start work on supporting NT-compatible System Loader that properly fills out LDR_DATA_TABLE_ENTRY and handles imports correctly. Modified LdpPEProcessModule to properly build the data table entry and create the base name and directory name.
- Add stub for MiResolveImageRefernces.
svn path=/trunk/; revision=25868
- Properly implement SystemExtendServiceTableInformation, except that the SE_LOAD_DRIVER_PRIVILEGE check is currently disabled since our smss doesn't acquire it (and we should therefore ban it from loading win32k.sys...).
- Delete LdrpLoadImage, LdrpUnlaodImage, LdrpLoadAndCallImage.
svn path=/trunk/; revision=25862
- Temporarily remove routines to set per-page protection (this doesn't really break anything, just makes the OS less secure).
svn path=/trunk/; revision=25861
- Remove some of the sixtuplicated routines to load a PE file. We're now down to a single function which takes an ImageType parameter for DLL/EXE/SYS, but even this is still temporary as the parameter will soon go away.
- We now load drivers in the same nice way that we load the kernel and DLLs, but we don't yet process their imports and relocate them in FreeLDR, because FreeLDR doesn't handle forwarders yet.
- We don't need a large hack in KiRosPrepareForSystemStartup anymore since the driver base addresses are now proper.
- Don't free boot-drivers anymore, since we'll load them in place soon.
- Don't load bootvid twice.
- Remove PAE stuff in FreeLDR since we don't support PAE anyway in the kernel and when we do, might as well implement it cleanly instead of relying on the broken FreeLDR stuff.
svn path=/trunk/; revision=25860
- Fix bug in KdpLoadSymbolsStateChange, we were never actually copying the pathname.
- Output of lm:
kd> lm
start end module name
80000000 80283000 nt (export symbols) ntoskrnl.exe
80283000 8029d000 hal (export symbols) halup.dll
svn path=/branches/alex-kd-branch/; revision=25858
- Implement KdpReportExceptionStateChange and fully support KdpReport.
- We now properly break inside HAL (with /BREAK) and WinDBG shows a nice stack trace, and disassembly, and I can step through the HAL initialization code!
svn path=/branches/alex-kd-branch/; revision=25857