Commit graph

22780 commits

Author SHA1 Message Date
Alex Ionescu 4b00ba5d4d - Inline and make some slight correctiions to KiInitailizeSystemClock, since it's based on the Ex subsystem, not Ke. Add code for boot-time timezone bias, but currently disabled because I need to implement a function to read configuration registry data at startup.
- Improve Init bugchecks to give the exact module that failed. Add Kd initilization in the same block as the other subsystems.
- Rename and re-arrange some initlization calls.

svn path=/trunk/; revision=24438
2006-10-08 04:05:27 +00:00
Alex Ionescu 9088db842e - Stub LdrVerifyMappedImageMatchesChecksum.
- Separate locating the system DLL from initializing it.
- Implement split-phase PsInitSystem for Phase 0 and 1, and make system dll initialization as part of phase 1.
- Add MmVerifyImageIsOkForMpUse and MmCheckSystemImage to validate the system DLL.
- Add a separate bugcheck for each failure in PsLocateSystemDll, matching with the NT bugchecks that would occur.

svn path=/trunk/; revision=24437
2006-10-08 02:10:34 +00:00
Alex Ionescu ebd9a573ec - In NTLDR boot, try to get the first kernel physical address from the loader entries.
- Fixup HAL's image base in the loader parameter block, since we load it at a different place then freeldr tells us.
- We've reached a dead end in NTLDR compatibility. Out memory manager initialization code makes some assumptions which are totally incompatible with the page table state that NTLDR gives us.

svn path=/trunk/; revision=24436
2006-10-08 00:04:03 +00:00
Alex Ionescu 378f64d047 - FreeLDR: Create the loader entry for ntoskrnl now that FreeLDR PE-loads it since last year. This lets us remove a large hack in ntoskrnl which was manually creating the entry and filling it in.
- Rename some LastKrnl... addresses into MmFreeLdr to easily identify them, and remove the need to use MmFreeLdrMemLower and MmFreeLdrPageDirectoryStart.
- Remove the static KERNEL_BASE definition based on a GCC-specific external. Everything now uses the actual module entry's saved base address.
- Fix a Ps Initialization hack and properly set the boot PDE.
- Add a hack for NTLDR's lack of MmFreeLdrMemHigher and MmFreeLdrPageDirectoryEnd.

svn path=/trunk/; revision=24435
2006-10-07 22:23:35 +00:00
Ged Murphy f8fa7d16f8 move the string parsing routine into it's own function so it can be used with DeviceProblemWizard_RunDLL when required.
svn path=/trunk/; revision=24434
2006-10-07 15:02:43 +00:00
Ged Murphy 71bc38ca20 testing ros-diffs
svn path=/trunk/; revision=24433
2006-10-07 14:35:22 +00:00
Aleksey Bragin a40bc5ff5f - Add structure for describing boot-loaded drivers
svn path=/trunk/; revision=24432
2006-10-07 13:07:25 +00:00
Alex Ionescu b53f179583 - Fix calls to HvInitializeHive
svn path=/trunk/; revision=24431
2006-10-06 23:11:49 +00:00
Magnus Olsen 2db2156bb3 Fixed control apps windows, Let me known if it create any regress.
svn path=/trunk/; revision=24430
2006-10-06 21:59:42 +00:00
Aleksey Bragin 41c8741041 - Load and initialize in-memory registry
- Query NLS file names from registry instead of hardcoding
- Move loading of NLS data to WinLdrLoadAndScanSystemHive()

svn path=/trunk/; revision=24429
2006-10-06 21:20:36 +00:00
Alex Ionescu e2295b6e85 - Fix calls to HvInitializeHive due to my last patch. Proof that Fireball doesn't properly test his commits... I broke Freeldr building before his commit, yet he commited it anyway even though freeldr couldn't build ;). Just kidding.
svn path=/trunk/; revision=24428
2006-10-06 20:52:50 +00:00
Aleksey Bragin 0b9fa0e21a - Make arc-path passed to the kernel look a bit more correct (still a hack of course)
- Add KdCom.dll loading along with ntoskrnl.exe and hal.dll
- Move registry-related code to a new file wlregistry.c
- WinLdrLoadAndScanSystemHive() is going to combine loading, initializing and parsing registry. NLS / OEM font data loading is marked with FIXMEs now, since it needs going into that routine (because registry tells the file names, not hardcoding them)

svn path=/trunk/; revision=24427
2006-10-06 20:28:55 +00:00
Alex Ionescu 9bfa61479f - Add PROFILE_ACPI_DOCKING_STATE.
- Fix HvInitialize definition to match more closely NT's since I need some of the extra parameters for the cm rewrite.
- Implement ExInitializePushLock and ExConvertPushLockSharedToExclusive macros.

svn path=/trunk/; revision=24426
2006-10-06 19:29:25 +00:00
Ged Murphy 6318f42ad0 fix a TCHAR brain lapse...
svn path=/trunk/; revision=24425
2006-10-06 17:10:57 +00:00
Ged Murphy 2380e7bb33 implemented DeviceProperties_RunDLLW and DeviceProperties_RunDLLA
svn path=/trunk/; revision=24424
2006-10-06 16:08:54 +00:00
Alex Ionescu a4c366b659 - Add internal EX_CALLBACK Object to NDK. (Callback blocks are a new NT 5.2 kernel mechanism much like RunOncs blocks in Vista user-mode). They're managed by rundown protection and fast-referencing through interlocked calls to push/pop/sychrnonize system callbacks.
- Add ObOpenObjectByName to NDK, since this API is not documented in official headers.

svn path=/trunk/; revision=24422
2006-10-06 06:36:35 +00:00
Alex Ionescu 45d84c9668 - Guard some current cmlib includes against new cm branch
- Remove NTSYSAPI from NtBuildNumber definition in NDK.

svn path=/trunk/; revision=24416
2006-10-05 23:01:38 +00:00
Alex Ionescu 8859463623 - Remove SMSS's code for signaling the "init" event.
- Make ExpInitNls responsible for NLS initialization in Phase 0 as well, to clean up the code in ExpInitailizeExecutive a bit.
- Initialize the system time/clock in Phase 1, not in Phase 0.
- Do HAL Phase1 initialization as the first step in Phase 1 initialization, then initialize the system clock (since the HAL's RTC is now configured).
- Do Ob Phase 1 init in Phase 1 initialization, not in phase 0.
- Do Ke Phase 1 init after HAL, Ob and Ex phase 1 inits.
- Initialize NLS for Phase 1 after Ke Phase 1, instead of much later.

svn path=/trunk/; revision=24414
2006-10-05 16:38:58 +00:00
Alex Ionescu 093d1a3aba - Get rid of the completely convoluted way that Phase 1 initialization was being ended, with umpteen events and waits and timeouts all synchronized from user-mode and do a simple 5-second wait to determine if smss started OK or not.
- Promote the Phase 1 initialization thread by jumping directly into the zero-page thread, and remove manual zero-page thread initialization code since we simply jump into its main routine.
- 100 less lines of code :)

svn path=/trunk/; revision=24413
2006-10-05 16:14:28 +00:00
Alex Ionescu eb8c705ce9 - Put all Phase 1 Ex* Initialization in ExpInitSystemPhase1 and clean up associated deprecated calls.
- Call ExpInitializePushLocks since we weren't doing this before.

svn path=/trunk/; revision=24412
2006-10-05 15:13:59 +00:00
Alex Ionescu 3f66fcf605 - Rewrite ExpLoadInitialProcess by inlining and simplifying what the call to RtlCreateProcsesParameters should do, and also create our own custom environment with the same arguments that NT's smss gets.
- This optimizes booting as well as gets use the differnet SESSIONY_INITIALIZATION_FAILED, where Y is a number representing which step of the process parameter/envieonment creation failed.

svn path=/trunk/; revision=24411
2006-10-05 14:49:20 +00:00
Aleksey Bragin 3727f8fc7d - Add #ifdef DEBUG / #endif to fix compile. FreeLdr's debug macros needs some improvement in the future...
svn path=/trunk/; revision=24410
2006-10-05 09:15:44 +00:00
Alex Ionescu 5162751ab3 - Use KeLoaderBlock for registry hive loading.
- Get rid of the CACHED_MODULE array and associated structures and stop using them, get rid of ParseAndCacheLoadedModules. Stop using KeLoadedModules and KeLoadedModuleCount outside of freeldr.c.
- Except for MmInit1, the kernel should now be totally isolated from FreeLDR-specific data.

svn path=/trunk/; revision=24409
2006-10-05 02:02:27 +00:00
Alex Ionescu 0bfcd77883 - Implement ExpInitNls to initialize the NLS Section using the new semantics recently implemented. Works pretty much like the previous code in rtl/nls.c except it uses the new variable names as well as maps a view of the NLS Table into the system process.c
- Delete rtl/nls.c and all the associated deprecated code.
- Do MmInit1 and SharedUserData stuff *after* initializing the initial thread, to avoid an ASSERT during bootup.

svn path=/trunk/; revision=24408
2006-10-05 01:44:54 +00:00
Ged Murphy 52d60b023b add a few more icons to the device imagelist
svn path=/trunk/; revision=24407
2006-10-04 22:29:18 +00:00
Christoph von Wittich a387e6f9f8 -removed unused var
svn path=/trunk/; revision=24406
2006-10-04 22:06:00 +00:00
Aleksey Bragin b103aa1ece - Add most needed memory-manipulating functions. Some places are really crappy (like WinLdrSetProcessorContext's IDT filling), will be fixed soon.
- FIXME: Since FreeLdr doesn't really keep track of which memory is of which type, this code has a massive hack for guessing the memory type, which is incorrect for future usage

svn path=/trunk/; revision=24405
2006-10-04 21:58:36 +00:00
Christoph von Wittich a361366988 -support debugging of control panel applets
svn path=/trunk/; revision=24404
2006-10-04 21:47:43 +00:00
Christoph von Wittich 245dca159a -don't use GetLastError with Reg* functions
-remove @16 from def file (msvc doesn't like it)

svn path=/trunk/; revision=24403
2006-10-04 21:47:08 +00:00
Aleksey Bragin 602923e572 - Fix warning in winldr.c
- Implement WinLdrAllocateDataTableEntry() used for allocating and initializing the DTE
- Implement WinLdrLoadImage(), which uses LdrRelocateImageWithBias() from RTL, calling it with loader name "FLx86" (RTL should treat it differently -- ROS/WinLdr-specific behavior)

svn path=/trunk/; revision=24402
2006-10-04 21:36:56 +00:00
Aleksey Bragin 76abbb4423 - Remove some crap from the LoadAndBootWindows()
- Change debugging checkpoint to online-asm (all this is temporary), since any code after while(1){}; seems to be just optimized away by gcc
- Uncomment NDEBUG for now

svn path=/trunk/; revision=24401
2006-10-04 21:11:16 +00:00
Thomas Bluemel 32dcc834ed Fix broken resources
svn path=/trunk/; revision=24400
2006-10-04 19:55:53 +00:00
Ged Murphy a595b4c7da add some overlay icons needed for devmgmt
svn path=/trunk/; revision=24399
2006-10-04 19:04:16 +00:00
Thomas Bluemel 948a1f9045 Fix almost the same bug in LdrGetProcedureAddress as in r24397
svn path=/trunk/; revision=24398
2006-10-04 18:46:57 +00:00
Thomas Bluemel 80da4a434c - Fix binary search algorithm in LdrGetProcedureAddress
- Fix temporary ntdll export hack (r24395)

svn path=/trunk/; revision=24397
2006-10-04 16:51:51 +00:00
Ged Murphy 7e6d549b19 - Open the device propsheet for child items (not parents as there isn't much point)
- Tag the Device ID onto the treeview items and provide functionality to tear it down
- Remove/change some code which wasn't needed to speed up opening time3
- We now have a pretty functional device manager. However it's heavily reliant on devmgr.dll, therefore functionality per device will rely on how complete this lib is.

svn path=/trunk/; revision=24396
2006-10-04 16:39:45 +00:00
Alex Ionescu d0cb64ce3d - Implement XPSP2+ syscall stub that uses indirect pointer instead of executable code inside KUSER_SHARED_DATA.
- Someone (FILIP!) please fix LdrGetProcedureAddress. It's broken and I had to rename an ntdll export to make it work (see comments).
- Make sure you REBUILD CLEAN. This commit changes NCITool!!!
- Setup some NPX-related CPU features in SharedUserData during KiInitializeKernel.
- Remove some now-deprecated initialization functions.

svn path=/trunk/; revision=24395
2006-10-04 16:00:36 +00:00
Thomas Bluemel 48236aa642 Don't compile with -Wconversion since we have function callbacks that have parameters with sizes different from int without forward declarations. Fixes superfluous warnings.
svn path=/trunk/; revision=24394
2006-10-04 15:19:23 +00:00
Aleksey Bragin 778bad347c - Format code of InstallFatBootcodeToPartition(), changing from tabs+spaces mix to tabs only (use "ignore whitespaces" settings to view other changes)
- Change installation logic when installing to a NTLDR's boot.ini: Firstly freeldr.ini is checked for existence, and either created or updated, then boot.ini is checked for having a proper entry, and if needed - entry is added. Fixes related bugs (having more and more ReactOS entries, no entry added if freeldr.ini already exists in the root folder)

svn path=/trunk/; revision=24392
2006-10-04 12:26:12 +00:00
Magnus Olsen 41dea75354 this file some have forget set eol-style native
fixed

svn path=/trunk/; revision=24391
2006-10-04 10:59:01 +00:00
Magnus Olsen 07725072f3 1. move all languages file to own folder
2. fixed sub languages on allot languages rc files
3. add LMH1 Norwegian translations.

See issue #1698 for more details.

svn path=/trunk/; revision=24389
2006-10-04 06:58:03 +00:00
Alex Ionescu 38a5188c8e - Fix boot crash due to last patch, forgot that SharedUserDAta wasn't available yet.
svn path=/trunk/; revision=24388
2006-10-04 05:59:56 +00:00
Alex Ionescu a6056d1fa9 - Fix KUSER_SHARED_DATA in winddk.h
- Scanfor NOEXECUTE/EXECUTE/OPTIN/OPTOUT/ALWAYSON/ALWAYSOFF load strings and set the appropriate NX policy in KUSER_SHARED_DATA as well as kernel CPU Feature flags.

svn path=/trunk/; revision=24387
2006-10-04 05:48:46 +00:00
Alex Ionescu 1e4f141555 - Add KF_XMMI64 feature flag for SSE2 and detect it.
- Detect Hyper-Threading and set Local APIC ID (put back Thomas's code that he added in an old revision and that I had accidentally removed and forgotten to re-convert into the new KiGetFeatureBits function).
- Add code to set the kernel MX Csr Mask in the FX Save Area.
- Startup the sysenter handler on the DPC stack.
- Detect and notify users with broken Pentiums.
- Do some NPX checks to forcefully disable any FPU flags that might be set (SSE, MMX, 3DNOW) if the NPX is disabled.

svn path=/trunk/; revision=24386
2006-10-04 05:29:30 +00:00
Alex Ionescu 917979cceb - Make Kernel initialization (KeInit2) portable/more complete. KeInit2 becomes KeInitSystem, the portable part, with a call to KiInitMachineDependent, the arch-specific part.
- Do all CPU configuration through IPIs and synchronize with potential multiple CPUs.
- Add mtrr.c and patpge.c for future support of MTRR, AMD K6 MTRR, PGE and PAT support, with initilization calls in each of them (which only print out a "Sorry" message).
- Add some stubbed code for extra initizliation to do later once some detection things are fixed.

svn path=/trunk/; revision=24385
2006-10-04 03:37:11 +00:00
Ged Murphy ad0184614e update comctl32 to Wine-0.9.22 to get the new imagelist code.
svn path=/trunk/; revision=24384
2006-10-03 22:46:26 +00:00
Ged Murphy 2ef79f3efe add LPCDLGTEMPLATE definition
svn path=/trunk/; revision=24383
2006-10-03 22:43:46 +00:00
Ged Murphy f1775cc055 fix processor display
svn path=/trunk/; revision=24382
2006-10-03 20:51:35 +00:00
Thomas Bluemel 99379a7e2c Fix warning
svn path=/trunk/; revision=24381
2006-10-03 20:04:39 +00:00
Ged Murphy a2d3c5fe33 - Implement the context menu (mouse only at the moment) makeing it accessable when the cursor over the item only
- open the propsheet when double clicking child items
- make 'properties' bold

svn path=/trunk/; revision=24380
2006-10-03 19:55:15 +00:00