Commit graph

22864 commits

Author SHA1 Message Date
Art Yerkes 79e9d9d8aa Added 'austin' AVL implementation and provide a binding for the AVL functions
in generictable.

Not tested, (but nothing relies on it yet).

Austin is
 Copyright (C) 2000 Kaz Kylheku <kaz@ashi.footprints.net>
 Copyright (C) 2000 Carl van Tast <vanTast@netway.at>

Copying, reuse and modification are permitted on liberal terms.

svn path=/trunk/; revision=24482
2006-10-10 12:31:16 +00:00
Aleksey Bragin a8e5dde037 Add a stub to peloader.c
svn path=/trunk/; revision=24481
2006-10-10 10:42:07 +00:00
Aleksey Bragin 3bef467687 - Implement WinLdrLoadBootDrivers() / WinLdrLoadDeviceDriver() - to be able to load boot-time drivers
- Perform hardware detection in the beginning (I had to insert RegInitializeRegistry() hack because MachHwDetect initializes certain stuff in registry)
- Convert info from hwdetect to suitable form in LPB (code by Alex Ionescu, just moved/adapted). Debug routine added to output its contents.
- Move allocation memory for NlsData into "phase 0" (AllocateAndInitLPB)
- Fixed SystemRoot to be of a correct form (later will be autogenerated of course, now just for reference)

svn path=/trunk/; revision=24480
2006-10-10 10:38:45 +00:00
Filip Navara 493f953a0c Fix setting of SystemBootDevice and SystemStartOptions in registry.
Fix detection of MiniNT systems.

svn path=/trunk/; revision=24479
2006-10-10 00:22:04 +00:00
Filip Navara 7bbb81a0d4 Sort the key indexes in CM.
svn path=/trunk/; revision=24478
2006-10-09 23:43:06 +00:00
Hervé Poussineau ca6e7110f5 - Start NetLogon service (lsass.exe)
- Fix lots of problems in error handling
- Some general cleanup

svn path=/trunk/; revision=24477
2006-10-09 19:19:28 +00:00
Hervé Poussineau e16a26e1f2 Formatting and add a call to StartServiceCtrlDispatcher
svn path=/trunk/; revision=24476
2006-10-09 19:16:47 +00:00
Magnus Olsen f86ee0a05c make our msvcrt bit more windows nt4/2000 compatible
do not link _i64toa and _i64tow to ntdll they are missing in windows nt4/windows 2000 ntdll. 

svn path=/trunk/; revision=24475
2006-10-09 18:42:24 +00:00
Magnus Olsen 80c28a9405 fixed so our taskmgr works in windows 2000
svn path=/trunk/; revision=24474
2006-10-09 18:01:56 +00:00
Thomas Bluemel ca392ef651 Make sure the compiler doesn't optimize away writes to video memory
svn path=/trunk/; revision=24473
2006-10-09 16:37:27 +00:00
Thomas Bluemel 8a80403d2a Some portability fixes that address possible alignment issues. Read R. Chen's blog 10/06/06 for more information.
svn path=/trunk/; revision=24472
2006-10-09 15:09:50 +00:00
Aleksey Bragin 182fc37942 Revert r24430 changes (by Magnus Olsen) since they are incorrect (additionally confirmed by Filip Navara)
svn path=/trunk/; revision=24471
2006-10-09 15:02:33 +00:00
Thomas Bluemel b79edc3b52 Fix compilation with GCC4
svn path=/trunk/; revision=24470
2006-10-09 14:59:10 +00:00
Thomas Bluemel 2600e04b68 Strings should be const char *. Fixes compilation with GCC4
svn path=/trunk/; revision=24469
2006-10-09 14:54:40 +00:00
Thomas Bluemel b8dd6657bc Strings should be const char *. Fixes compilation with GCC4
svn path=/trunk/; revision=24468
2006-10-09 14:43:16 +00:00
Mindflyer c255fa82a3 Change copyright to 1996-2006, because
a) our earliest version records show 1996
b) we are now in 2006

svn path=/trunk/; revision=24467
2006-10-09 12:37:03 +00:00
Aleksey Bragin b6df2387ba Fix mkhive compiling by adding _NTSYSTEM_ define. This is needed after Thomas' fixes to headers.
svn path=/trunk/; revision=24466
2006-10-09 08:07:19 +00:00
Alex Ionescu 4ffb9d2c3e - Some misc changes to fix some of the 250+ warnings in the MSVC build.
svn path=/trunk/; revision=24465
2006-10-09 05:59:18 +00:00
Alex Ionescu 6951a4887c - Bootvid rewrite by Filip Navara (with some fixes by myself)
- HAL DMA enhancements by Filip Navara.
- CSRSS Console enhancements by Filip Navara.
- Win32k Primitive Queue/Input/Painting/Focus enhancements by Filip Navara.
- Other misc win32k/CSR bug fixes by Filip Navara.
- The new bootvid code has some bugs, but try out a GUI Boot!

svn path=/trunk/; revision=24464
2006-10-09 04:00:34 +00:00
Alex Ionescu 3012ee8072 - Initialize the registry in one shot, and allow it to fail and do the associated CONFIG_INIT_FAILED bugcheck.
- Initialize Io in one shot, with IoInitSystem.
- Locate the system DLL a bit later, since on the boot CD this creates a small incompatibility due to the wrong path being in use.

svn path=/trunk/; revision=24463
2006-10-09 01:16:28 +00:00
Alex Ionescu b772538a22 - Add RtlInitEmptyAnsiString to DDK.
- Fix a pretty bad stack/memory corruption bug related to IoReassignSystemRoot.
- Combine IoInit2 and IoInit3 into IoInitSystem, and make it return a BOOLEAN, and handle error with the appropriate IO1_INIT_FAILED bugcheck. Will combine IoInit1 soon.

svn path=/trunk/; revision=24462
2006-10-08 23:46:26 +00:00
Alex Ionescu 2b1ade4723 - Remove InitSharedUserDataPage since this entire function is not needed anymore due to the recent ARC improvements.
- Call IoAssignDriverLetters with the proper parameters, and give it a chance to update the SystemRoot path (although our version doesn't yet do this).

svn path=/trunk/; revision=24461
2006-10-08 22:50:26 +00:00
Alex Ionescu d4b5fef3d6 - Finalize ARC Boot changes:
* Rename IoCreateArcNames to IopCreateArcNames and set it to NTAPI, as well as pass the loader block as a parameter.
  * Reduce buffers to 128 bytes, since ARC Paths don't get longer then that.
  * Optimize stack usage by using a single ANSI_STRING instead of 3 or 4.
  * Optimize stack usage by using a single ansi buffer, not 2 or more.

svn path=/trunk/; revision=24458
2006-10-08 21:38:45 +00:00
Alex Ionescu b5f79593de - Optimize IopApplyRosCdromArcHack by not searching for the second copy of ntoskrnl if we already found the first.
- Also optimize stack usage by only using an ANSI buffer instead of having another Unicode buffer and unicode strings. Saves 530 bytes of stack.

svn path=/trunk/; revision=24457
2006-10-08 21:16:20 +00:00
Alex Ionescu 5e214ceaa0 - Part 2.5 of ARC Boot changes. Re-factor IoCreateArcNames not to use a list-entry of detected disk from pool that gets looped and de-referenced, but instead use a simple loop which calls a function that gets disk information one-by-one (IopGetDiskInformation), so that it's used on the spot instead of allocated, linked, and retrieved later.
- Inline IopAssignArcNamesToDisk to reduce some stack size abuse and too much parameter shuffling.
- Stack use is still very inefficient, will fix next.

svn path=/trunk/; revision=24456
2006-10-08 21:09:00 +00:00
Thomas Bluemel 73c2dc5053 Some header fixes
svn path=/trunk/; revision=24454
2006-10-08 20:28:03 +00:00
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