/*
-* PROJECT: ReactOS Kernel
-* LICENSE: GPL - See COPYING in the top level directory
-* FILE: ntoskrnl/ex/init.c
-* PURPOSE: Executive Initialization Code
-* PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
-* Eric Kohl (ekohl@rz-online.de)
-*/
+ * PROJECT: ReactOS Kernel
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: ntoskrnl/ex/init.c
+ * PURPOSE: Executive Initialization Code
+ * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
+ * Eric Kohl (ekohl@rz-online.de)
+ */
/* INCLUDES ******************************************************************/
if (!ExpNlsTableBase) KeBugCheck(PHASE0_INITIALIZATION_FAILED);
/* Copy the codepage data in its new location. */
- RtlMoveMemory(ExpNlsTableBase,
+ RtlCopyMemory(ExpNlsTableBase,
LoaderBlock->NlsData->AnsiCodePageData,
ExpNlsTableSize);
}
/* Copy the codepage data in its new location. */
- RtlMoveMemory(SectionBase, ExpNlsTableBase, ExpNlsTableSize);
+ RtlCopyMemory(SectionBase, ExpNlsTableBase, ExpNlsTableSize);
/* Free the previously allocated buffer and set the new location */
ExFreePool(ExpNlsTableBase);
}
/* Copy the table into the system process and set this as the base */
- RtlMoveMemory(SectionBase, ExpNlsTableBase, ExpNlsTableSize);
+ RtlCopyMemory(SectionBase, ExpNlsTableBase, ExpNlsTableSize);
ExpNlsTableBase = SectionBase;
}
/* Create the environment string */
RtlInitEmptyUnicodeString(&Environment,
ProcessParameters->Environment,
- Size);
+ (USHORT)Size);
/* Append the DLL path to it */
RtlAppendUnicodeToString(&Environment, L"Path=" );
/* Initialize the Process Manager */
if (!PsInitSystem()) KEBUGCHECK(PROCESS_INITIALIZATION_FAILED);
+ /* Initialize the User-Mode Debugging Subsystem */
+ DbgkInitialize();
+
/* Calculate the tick count multiplier */
ExpTickCountMultiplier = ExComputeTickCountMultiplier(KeMaximumIncrement);
SharedUserData->TickCountMultiplier = ExpTickCountMultiplier;
if (!NoGuiBoot) InbvDisplayBootLogo();
/* Clear the screen to blue and display the boot notice and debug status */
- HalInitSystem(2, KeLoaderBlock);
if (NoGuiBoot) ExpDisplayNotice();
KdInitSystem(2, KeLoaderBlock);
/* Unmap Low memory, and initialize the MPW and Balancer Thread */
MmInit3();
+#if DBG
+ extern ULONG Guard;
+#endif
+ ASSERT(Guard == 0xCACA1234);
/* Initialize VDM support */
KeI386VdmInitialize();
/* Wait 5 seconds for it to initialize */
Timeout.QuadPart = Int32x32To64(5, -10000000);
Status = ZwWaitForSingleObject(ProcessHandle, FALSE, &Timeout);
+ if (!NoGuiBoot) InbvFinalizeBootLogo();
if (Status == STATUS_SUCCESS)
{
/* Bugcheck the system if SMSS couldn't initialize */