* Removing the ARC Boot path and splitting it into the ARC Boot Device Name, the ARC HAL Device Name, and the NT Boot and HAL Path Names, saved in their respective LoaderBlock pointers.
* Converting every slash to a space. ("/DEBUGPORT" -> " DEBUGPORT")
* Now we can fully parse and read NTLDR command lines.
- Update various code in the kernel to:
* Use LoaderBlock->ArcDeviceNamePath & friends instead of the command line.
* Stop depending on slashes, and instead use strstr for parameters.
svn path=/trunk/; revision=24358
- Add a function for creating a stub of hardware config (config consisting of only one node - root)
- Implement two steps of LPB initialization (names Phase 0 and Phase 1 are used internally by me, and doesn't correspond to anything)
- Implement a WinLdrSetupForNt, which allocates and initializes some specific structures (PCR, TSS, GDT, IDT)
- Respectively enable calls to these functions from LoadAndBootWindows()
svn path=/trunk/; revision=24354
- This gets NTLDR working with ReactOS and I can boot all the way to MmInit1 (which fails due to missing KeMemoryMap & freeldr data).
- Serial port output works with DPRINT1 as well ;-)
svn path=/trunk/; revision=24352
- Add address conversion routines for windows loader
- Add stubs for PE loading, memory operations
- Add some code to the LoadAndBootWindows()
Some notes:
- The windows loader is going to become some kind of a library in future, shared at least between freeldr and EFI loader.
- The code in windows loader is specific to i386 architecture for now, but I add it to the "freeldr_base". I better separate it a bit later, after discussion with arty (because I hardly want compatibility with loading windows on PPC).
svn path=/trunk/; revision=24350
- 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