Commit graph

22738 commits

Author SHA1 Message Date
Alex Ionescu 1047de88bf - Greatly simplify and optimize IoCreateArcNames by using ARC data from FreeLDR/NTLDR (now nearly 100% compatible!) instead of querying registry data (which FreeLdr had already set up, so we cached those values like ntldr does).
- Last step is to stop using a list of drives and pool allocated entries, to optimize memory usage and re-factor the code.

svn path=/trunk/; revision=24453
2006-10-08 19:59:53 +00:00
Alex Ionescu c537eb20f2 - Have FreeLDR fill out ARC_DISK_SIGNATURE information for each detected disk, as it's filling the registry.
- Add code to KiRosFrldrLpbToLpb to convert this array to the official ARC_DISK_INFORMATION structure that contains LIST_ENTRYies for each ARC_DISK_SIGNATURE, and initialize the ArcDiskSignatureListHead.
- The end result will be that in the next patch we can remove a bunch of registry-reading code in IoCreateArcNames.

svn path=/trunk/; revision=24452
2006-10-08 19:34:16 +00:00
Alex Ionescu 7a1b73cf84 - Part 2 of ARC boot changes: Major modifications done to the existing code, as well as re-formatting and cleanup. Floppy ARC names are not created anymore (they don't exist), and CD-ROM ARC name is only created 1) when there is a boot CD and 2) only for the boot CD. This mimics NT functionality.
- Optimize some code paths, mostly by not querying the whole GET_DRIVE_GEOMETRY IRP twice and reducing some buffer usage. Also re-factor some code better into smaller functions.
- Document and work around currently FreeLDR incompatibility (lack of ARC_DISK_INFORMATION) data in LoaderBlock.

svn path=/trunk/; revision=24451
2006-10-08 16:58:03 +00:00
Aleksey Bragin b234cb305e - Add dumping boot drivers list, remove unneded comment
- Implement WinLdrScanRegistry() (based on freeldr's already existing implementation) which searches for boot-loading drivers
- Implement WinLdrAddDriverToList() - it correctly fills an entry in the BootDriversList in LoaderParameterBlock

svn path=/trunk/; revision=24444
2006-10-08 10:06:06 +00:00
Aleksey Bragin 3c3080f16b - Add simple support functions to be able to use more RTL in FreeLdr
svn path=/trunk/; revision=24442
2006-10-08 08:54:44 +00:00
Alex Ionescu 6d262bb755 - Whoops, don't call IopReassignSystemRoot twice.
svn path=/trunk/; revision=24441
2006-10-08 07:59:30 +00:00
Alex Ionescu 66f4128216 - Part 1 of ARC boot cleanups/changes: Create a valid \\SystemRoot symbolic link as the system is booting, which points to the ARC name, then, once drivers have loaded, re-assign it to the proper NT Device name. Added proper security descriptors and flags to symbolic links, as well as proper bugchecks when required.
- Kept and cleaned up the ROS hack for CD-ROM boot.

svn path=/trunk/; revision=24440
2006-10-08 07:53:37 +00:00
Alex Ionescu 9307f32ce3 - More re-shuffling of initialization calls, including enabling access to the blue screen much much earlier (no point in doing it so late, but this change is not that useful since soon we'll have bootvid).
- Split Po init in two, so the early Po init (which we'll need to do eventually) doesn't depent on the later Po init (which uses a PnP notification which depends on the Io system).
- Make I/O initialize quite a bit later.

svn path=/trunk/; revision=24439
2006-10-08 04:47:26 +00:00
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