- Also move some ROS-specific/Freeldr hacks on top of the file so they'll be easier to remove later when needed.
- Fix a bug in ExInitPoolLookasidePointers which was making us overwrite low-memory.
- Initialize NLS tables during Phase 0, so that the associated APIs can work earlier.
- Bugcheck if HAL Phase 0 initialization failed, and force interrupts enabled after the HAL is ready.
svn path=/trunk/; revision=24348
- Update ExpInitializeExecutive to check for a valid setup block and detect text-mode and network installation modes. Use ExpInTextModeSetup instead of SetupMode variable, to make detection compatible with NTLDR.
svn path=/trunk/; revision=24347
- Add code in KiRosFrldrLpbToNtLpb to setup a LOADER_PARAMETER_EXTENSION and set the right version and size.
- Initialize the per-CPU PRCB Paged/NPaged lookaslide pool lists.
- Add code to support application CPUs booting in ExpInitializeExecutive, and pass the loaderblock as a parameter.
svn path=/trunk/; revision=24346
- Fix Ki386InitializeTss to properly set Boot TSS descriptor data (set it to 32-bits). Also properly setup the DF/NMI Task Gates in the IDT.
svn path=/trunk/; revision=24336
- Fix a double bug in KiSystemStartup. First, we were setting KPCR->Number instead of KPRCB->Number. Second, we were using KeGetPcr instead of __writefsdword. It worked on ROS because KeGetPcr is hard-coded to ROS's KPCR buffer.
svn path=/trunk/; revision=24334
- Use freeldr's stack during all of freeldr.c, and only switch to the boot stack in KiSystemStartup before calling KiInitializeKernel. This is what NT does as well (it piggybacks on NTLDR's stack until then). This allowed us to clean boot.S and now we can boot from NTLDR properly.
svn path=/trunk/; revision=24333
- Change some internal functions to use UNICODE_STRING instead of PCHAR since this is how LdrEntry->BaseDllName is, and also it's closer to NT Design.
svn path=/trunk/; revision=24331
- Create a LDR_DATA_TABLE entry for each module (driver, hal, kernel) and properly fill it out and insert it into the loader block.
- Use the NLS data block to hold pointers to the NLS tables.
- Use the ->RegistryBase/Length loader block members to hold pointers to the SYSTEM hive.
- Create a MEMORY_ALLOCATION_DESCRIPTOR for each type of memory currently used (LoaderNlsData, LoaderRegistrydata, LoaderSystemCode, LoaderHalCode, LoaderBootDriver).
- Changes are currently UNUSED!
- Revert LOADER_PARAMETER_BLOCK change, it actually really is PNLS_DATA_BLOCK.
svn path=/trunk/; revision=24318
- Set the booting CPU as idle if no next thread was scheduled.
- Raise IRQL to HIGH_LEVEL upon exiting KiInitializeKernel to match the re-lowering to DISPATCH_LEVEL in KiSystemStartup (and subsequent interrupt flush).
svn path=/trunk/; revision=24308
- Only check for break-in on the Boot CPU.
- Set priority to 0 *Before* lowering to DISPATCH_LEVEL.
- Also force interrupts to be enabled before lowering IRQL.
- Also set the idle thread's wait irql to DISPATCH_LEVEL (might fix some odd crashes) and set it as Running on UP builds (on SMP builds this is done in other code).
svn path=/trunk/; revision=24307
- Remove intrinsics in winddk.h since they're now properly done in intrin.h (thanks KJK!!!)
- Make freeldr.c setup the boot KTSS like NTLDR does, so that the GDT entry for it is valid (and remove the code that was doing this from Ki386InitializeTss)
- Refactor KiSystemStartup to use 100% dynamic pointers and machine data queried from the Loader Block or actual GDT/IDT/Selectors in memory, isntead of hard-coded ntoskrnl offsets. This makes it possible to be loaded by NTLDR, which sets these system structures up by itself. (we do it in freeldr.c, as hacks).
svn path=/trunk/; revision=24306
- Implemented KiRosFrldrLpbtoNtLpb to do a lightweight conversion and setup. Next patches will try to get rid of PLOADER_MODULE and use LDR_DATA_TABLE_ENTRY as well as increase bootstrap compatibility.
svn path=/trunk/; revision=24305
- Add stub for processing IRPs sent to the mouse driver
TODO (will be done once problem with load-order will be resolved):
- Store mouclass's callback address
- Actually call it thus making driver working
- Cleanup routines
svn path=/trunk/; revision=24300