mirror of
https://github.com/reactos/reactos.git
synced 2025-06-10 04:14:53 +00:00
- 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
This commit is contained in:
parent
9088db842e
commit
4b00ba5d4d
13 changed files with 93 additions and 76 deletions
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
CcInit(VOID)
|
CcInitializeCacheManager(VOID)
|
||||||
{
|
{
|
||||||
CcInitView();
|
CcInitView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,7 +188,8 @@ CmInitHives(BOOLEAN SetupBoot)
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
INIT_FUNCTION
|
INIT_FUNCTION
|
||||||
CmInitializeRegistry(VOID)
|
NTAPI
|
||||||
|
CmInitSystem1(VOID)
|
||||||
{
|
{
|
||||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||||
UNICODE_STRING KeyName;
|
UNICODE_STRING KeyName;
|
||||||
|
|
|
@ -15,6 +15,9 @@
|
||||||
|
|
||||||
/* DATA **********************************************************************/
|
/* DATA **********************************************************************/
|
||||||
|
|
||||||
|
/* HACK */
|
||||||
|
extern BOOLEAN KiClockSetupComplete;
|
||||||
|
|
||||||
#define BUILD_OSCSDVERSION(major, minor) (((major & 0xFF) << 8) | (minor & 0xFF))
|
#define BUILD_OSCSDVERSION(major, minor) (((major & 0xFF) << 8) | (minor & 0xFF))
|
||||||
|
|
||||||
/* NT Version Info */
|
/* NT Version Info */
|
||||||
|
@ -858,6 +861,8 @@ ExPhase2Init(PVOID Context)
|
||||||
HANDLE ProcessHandle;
|
HANDLE ProcessHandle;
|
||||||
HANDLE ThreadHandle;
|
HANDLE ThreadHandle;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
TIME_FIELDS TimeFields;
|
||||||
|
LARGE_INTEGER SystemBootTime, UniversalBootTime;
|
||||||
|
|
||||||
/* Set to phase 1 */
|
/* Set to phase 1 */
|
||||||
ExpInitializationPhase = 1;
|
ExpInitializationPhase = 1;
|
||||||
|
@ -868,54 +873,88 @@ ExPhase2Init(PVOID Context)
|
||||||
/* Do Phase 1 HAL Initialization */
|
/* Do Phase 1 HAL Initialization */
|
||||||
HalInitSystem(1, KeLoaderBlock);
|
HalInitSystem(1, KeLoaderBlock);
|
||||||
|
|
||||||
/* Setup system time */
|
/* Check if GUI Boot is enabled */
|
||||||
KiInitializeSystemClock();
|
if (strstr(KeLoaderBlock->LoadOptions, "NOGUIBOOT")) NoGuiBoot = TRUE;
|
||||||
|
|
||||||
|
/* Query the clock */
|
||||||
|
if (HalQueryRealTimeClock(&TimeFields))
|
||||||
|
{
|
||||||
|
/* Convert to time fields */
|
||||||
|
RtlTimeFieldsToTime(&TimeFields, &SystemBootTime);
|
||||||
|
UniversalBootTime = SystemBootTime;
|
||||||
|
|
||||||
|
#if 0 // FIXME: Won't work until we can read registry data here
|
||||||
|
/* FIXME: This assumes that the RTC is not already in GMT */
|
||||||
|
ExpTimeZoneBias.QuadPart = Int32x32To64(ExpLastTimeZoneBias * 60,
|
||||||
|
10000000);
|
||||||
|
|
||||||
|
/* Set the boot time-zone bias */
|
||||||
|
SharedUserData->TimeZoneBias.High2Time = ExpTimeZoneBias.HighPart;
|
||||||
|
SharedUserData->TimeZoneBias.LowPart = ExpTimeZoneBias.LowPart;
|
||||||
|
SharedUserData->TimeZoneBias.High1Time = ExpTimeZoneBias.HighPart;
|
||||||
|
|
||||||
|
/* Convert the boot time to local time, and set it */
|
||||||
|
UniversalBootTime.QuadPart = SystemBootTime.QuadPart +
|
||||||
|
ExpTimeZoneBias.QuadPart;
|
||||||
|
#endif
|
||||||
|
KiSetSystemTime(&UniversalBootTime);
|
||||||
|
|
||||||
|
/* Remember this as the boot time */
|
||||||
|
KeBootTime = UniversalBootTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The clock is ready now (FIXME: HACK FOR OLD HAL) */
|
||||||
|
KiClockSetupComplete = TRUE;
|
||||||
|
|
||||||
/* Initialize all processors */
|
/* Initialize all processors */
|
||||||
HalAllProcessorsStarted();
|
HalAllProcessorsStarted();
|
||||||
|
|
||||||
/* Call OB initialization again */
|
/* Call OB initialization again */
|
||||||
if (!ObInit()) KEBUGCHECK(OBJECT1_INITIALIZATION_FAILED);
|
if (!ObInit()) KeBugCheck(OBJECT1_INITIALIZATION_FAILED);
|
||||||
|
|
||||||
/* Initialize Basic System Objects and Worker Threads */
|
/* Initialize Basic System Objects and Worker Threads */
|
||||||
if (!ExInitSystem()) KEBUGCHECK(PHASE1_INITIALIZATION_FAILED);
|
if (!ExInitSystem()) KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, 1, 0, 0, 0);
|
||||||
|
|
||||||
/* Initialize the later stages of the kernel */
|
/* Initialize the later stages of the kernel */
|
||||||
if (!KeInitSystem()) KEBUGCHECK(PHASE1_INITIALIZATION_FAILED);
|
if (!KeInitSystem()) KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, 2, 0, 0, 0);
|
||||||
|
|
||||||
|
/* Call KD Providers at Phase 1 */
|
||||||
|
if (!KdInitSystem(ExpInitializationPhase, KeLoaderBlock))
|
||||||
|
{
|
||||||
|
/* Failed, bugcheck */
|
||||||
|
KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, 3, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/* Create NLS section */
|
/* Create NLS section */
|
||||||
ExpInitNls(KeLoaderBlock);
|
ExpInitNls(KeLoaderBlock);
|
||||||
|
|
||||||
/* Call KD Providers at Phase 1 */
|
|
||||||
KdInitSystem(1, KeLoaderBlock);
|
|
||||||
|
|
||||||
/* Initialize I/O Objects, Filesystems, Error Logging and Shutdown */
|
/* Initialize I/O Objects, Filesystems, Error Logging and Shutdown */
|
||||||
IoInit();
|
IoInit();
|
||||||
|
|
||||||
|
/* Initialize Cache Views */
|
||||||
|
CcInitializeCacheManager();
|
||||||
|
|
||||||
|
/* Initialize the Registry (Hives are NOT yet loaded!) */
|
||||||
|
CmInitSystem1();
|
||||||
|
|
||||||
|
/* Update timezone information */
|
||||||
|
ExRefreshTimeZoneInformation(&SystemBootTime);
|
||||||
|
|
||||||
/* TBD */
|
/* TBD */
|
||||||
PoInit(AcpiTableDetected, KeLoaderBlock);
|
PoInit(AcpiTableDetected, KeLoaderBlock);
|
||||||
|
|
||||||
/* Initialize the Registry (Hives are NOT yet loaded!) */
|
|
||||||
CmInitializeRegistry();
|
|
||||||
|
|
||||||
/* Unmap Low memory, and initialize the MPW and Balancer Thread */
|
/* Unmap Low memory, and initialize the MPW and Balancer Thread */
|
||||||
MmInit3();
|
MmInit3();
|
||||||
|
|
||||||
/* Initialize Cache Views */
|
/* Initialize the File System Runtime Library */
|
||||||
CcInit();
|
FsRtlInitSystem();
|
||||||
|
|
||||||
/* Initialize File Locking */
|
/* Report all resources used by HAL */
|
||||||
FsRtlpInitFileLockingImplementation();
|
|
||||||
|
|
||||||
/* Report all resources used by hal */
|
|
||||||
HalReportResourceUsage();
|
HalReportResourceUsage();
|
||||||
|
|
||||||
/* Clear the screen to blue */
|
/* Clear the screen to blue */
|
||||||
HalInitSystem(2, KeLoaderBlock);
|
HalInitSystem(2, KeLoaderBlock);
|
||||||
|
|
||||||
/* Check if GUI Boot is enabled */
|
|
||||||
if (strstr(KeLoaderBlock->LoadOptions, "NOGUIBOOT")) NoGuiBoot = TRUE;
|
|
||||||
|
|
||||||
/* Display version number and copyright/warranty message */
|
/* Display version number and copyright/warranty message */
|
||||||
if (NoGuiBoot) ExpDisplayNotice();
|
if (NoGuiBoot) ExpDisplayNotice();
|
||||||
|
|
||||||
|
@ -931,9 +970,6 @@ ExPhase2Init(PVOID Context)
|
||||||
/* Initialize VDM support */
|
/* Initialize VDM support */
|
||||||
KeI386VdmInitialize();
|
KeI386VdmInitialize();
|
||||||
|
|
||||||
/* Initialize the time zone information from the registry */
|
|
||||||
ExpInitTimeZoneInfo();
|
|
||||||
|
|
||||||
/* Enter the kernel debugger before starting up the boot drivers */
|
/* Enter the kernel debugger before starting up the boot drivers */
|
||||||
if (KdDebuggerEnabled && KdpEarlyBreak)
|
if (KdDebuggerEnabled && KdpEarlyBreak)
|
||||||
DbgBreakPoint();
|
DbgBreakPoint();
|
||||||
|
@ -953,7 +989,7 @@ ExPhase2Init(PVOID Context)
|
||||||
/* Initialize shared user page. Set dos system path, dos device map, etc. */
|
/* Initialize shared user page. Set dos system path, dos device map, etc. */
|
||||||
InitSystemSharedUserPage(KeLoaderBlock);
|
InitSystemSharedUserPage(KeLoaderBlock);
|
||||||
|
|
||||||
/* Initailize the Process Manager at Phase 1 */
|
/* Initialize the Process Manager at Phase 1 */
|
||||||
if (!PsInitSystem()) KeBugCheck(PROCESS1_INITIALIZATION_FAILED);
|
if (!PsInitSystem()) KeBugCheck(PROCESS1_INITIALIZATION_FAILED);
|
||||||
|
|
||||||
/* Launch initial process */
|
/* Launch initial process */
|
||||||
|
|
|
@ -548,7 +548,7 @@ QSI_DEF(SystemTimeOfDayInformation)
|
||||||
|
|
||||||
KeQuerySystemTime(&CurrentTime);
|
KeQuerySystemTime(&CurrentTime);
|
||||||
|
|
||||||
Sti->BootTime= SystemBootTime;
|
Sti->BootTime= KeBootTime;
|
||||||
Sti->CurrentTime = CurrentTime;
|
Sti->CurrentTime = CurrentTime;
|
||||||
Sti->TimeZoneBias.QuadPart = ExpTimeZoneBias.QuadPart;
|
Sti->TimeZoneBias.QuadPart = ExpTimeZoneBias.QuadPart;
|
||||||
Sti->TimeZoneId = ExpTimeZoneId;
|
Sti->TimeZoneId = ExpTimeZoneId;
|
||||||
|
|
|
@ -23,16 +23,16 @@
|
||||||
|
|
||||||
/* Note: Bias[minutes] = UTC - local time */
|
/* Note: Bias[minutes] = UTC - local time */
|
||||||
TIME_ZONE_INFORMATION ExpTimeZoneInfo;
|
TIME_ZONE_INFORMATION ExpTimeZoneInfo;
|
||||||
|
ULONG ExpLastTimeZoneBias = -1;
|
||||||
LARGE_INTEGER ExpTimeZoneBias;
|
LARGE_INTEGER ExpTimeZoneBias;
|
||||||
ULONG ExpTimeZoneId;
|
ULONG ExpTimeZoneId;
|
||||||
ULONG ExpTickCountMultiplier;
|
ULONG ExpTickCountMultiplier;
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
VOID
|
BOOLEAN
|
||||||
INIT_FUNCTION
|
|
||||||
NTAPI
|
NTAPI
|
||||||
ExpInitTimeZoneInfo(VOID)
|
ExRefreshTimeZoneInformation(IN PLARGE_INTEGER CurrentBootTime)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER CurrentTime;
|
LARGE_INTEGER CurrentTime;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
@ -64,7 +64,7 @@ ExpInitTimeZoneInfo(VOID)
|
||||||
SharedUserData->TimeZoneId = ExpTimeZoneId;
|
SharedUserData->TimeZoneId = ExpTimeZoneId;
|
||||||
|
|
||||||
/* Convert boot time from local time to UTC */
|
/* Convert boot time from local time to UTC */
|
||||||
SystemBootTime.QuadPart += ExpTimeZoneBias.QuadPart;
|
KeBootTime.QuadPart += ExpTimeZoneBias.QuadPart;
|
||||||
|
|
||||||
/* Convert system time from local time to UTC */
|
/* Convert system time from local time to UTC */
|
||||||
do
|
do
|
||||||
|
@ -78,6 +78,9 @@ ExpInitTimeZoneInfo(VOID)
|
||||||
SharedUserData->SystemTime.LowPart = CurrentTime.u.LowPart;
|
SharedUserData->SystemTime.LowPart = CurrentTime.u.LowPart;
|
||||||
SharedUserData->SystemTime.High1Time = CurrentTime.u.HighPart;
|
SharedUserData->SystemTime.High1Time = CurrentTime.u.HighPart;
|
||||||
SharedUserData->SystemTime.High2Time = CurrentTime.u.HighPart;
|
SharedUserData->SystemTime.High2Time = CurrentTime.u.HighPart;
|
||||||
|
|
||||||
|
/* Return success */
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
|
|
|
@ -77,7 +77,7 @@ IsSurroundingLock(
|
||||||
*/
|
*/
|
||||||
VOID
|
VOID
|
||||||
STDCALL INIT_FUNCTION
|
STDCALL INIT_FUNCTION
|
||||||
FsRtlpInitFileLockingImplementation(VOID)
|
FsRtlInitSystem(VOID)
|
||||||
{
|
{
|
||||||
ExInitializeNPagedLookasideList( &LockTocLookaside,
|
ExInitializeNPagedLookasideList( &LockTocLookaside,
|
||||||
NULL,
|
NULL,
|
||||||
|
|
|
@ -112,7 +112,7 @@ WriteCacheSegment(PCACHE_SEGMENT CacheSeg);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
CcInit(VOID);
|
CcInitializeCacheManager(VOID);
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
|
|
|
@ -7,6 +7,7 @@ extern TIME_ZONE_INFORMATION ExpTimeZoneInfo;
|
||||||
extern LARGE_INTEGER ExpTimeZoneBias;
|
extern LARGE_INTEGER ExpTimeZoneBias;
|
||||||
extern ULONG ExpTimeZoneId;
|
extern ULONG ExpTimeZoneId;
|
||||||
extern ULONG ExpTickCountMultiplier;
|
extern ULONG ExpTickCountMultiplier;
|
||||||
|
extern ULONG ExpLastTimeZoneBias;
|
||||||
extern POBJECT_TYPE ExEventPairObjectType;
|
extern POBJECT_TYPE ExEventPairObjectType;
|
||||||
extern ULONG NtBuildNumber;
|
extern ULONG NtBuildNumber;
|
||||||
extern ULONG NtMajorVersion;
|
extern ULONG NtMajorVersion;
|
||||||
|
@ -66,9 +67,11 @@ VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
ExpInitializePushLocks(VOID);
|
ExpInitializePushLocks(VOID);
|
||||||
|
|
||||||
VOID
|
BOOLEAN
|
||||||
NTAPI
|
NTAPI
|
||||||
ExpInitTimeZoneInfo(VOID);
|
ExRefreshTimeZoneInformation(
|
||||||
|
IN PLARGE_INTEGER SystemBootTime
|
||||||
|
);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
|
|
|
@ -22,7 +22,7 @@ FsRtlpInitNotifyImplementation(VOID);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
FsRtlpInitFileLockingImplementation(VOID);
|
FsRtlInitSystem(VOID);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
|
|
|
@ -66,7 +66,7 @@ extern PVOID KeUserApcDispatcher;
|
||||||
extern PVOID KeUserCallbackDispatcher;
|
extern PVOID KeUserCallbackDispatcher;
|
||||||
extern PVOID KeUserExceptionDispatcher;
|
extern PVOID KeUserExceptionDispatcher;
|
||||||
extern PVOID KeRaiseUserExceptionDispatcher;
|
extern PVOID KeRaiseUserExceptionDispatcher;
|
||||||
extern LARGE_INTEGER SystemBootTime;
|
extern LARGE_INTEGER KeBootTime;
|
||||||
extern ULONG KeI386NpxPresent;
|
extern ULONG KeI386NpxPresent;
|
||||||
extern ULONG KeI386XMMIPresent;
|
extern ULONG KeI386XMMIPresent;
|
||||||
extern ULONG KeI386FxsrPresent;
|
extern ULONG KeI386FxsrPresent;
|
||||||
|
|
|
@ -64,13 +64,13 @@ VOID IoInit(VOID);
|
||||||
VOID IoInit2(BOOLEAN BootLog);
|
VOID IoInit2(BOOLEAN BootLog);
|
||||||
VOID NTAPI IoInit3(VOID);
|
VOID NTAPI IoInit3(VOID);
|
||||||
BOOLEAN NTAPI ObInit(VOID);
|
BOOLEAN NTAPI ObInit(VOID);
|
||||||
VOID CmInitializeRegistry(VOID);
|
VOID NTAPI CmInitSystem1(VOID);
|
||||||
VOID NTAPI CmInitHives(BOOLEAN SetupBoot);
|
VOID NTAPI CmInitHives(BOOLEAN SetupBoot);
|
||||||
VOID CmInit2(PCHAR CommandLine);
|
VOID CmInit2(PCHAR CommandLine);
|
||||||
VOID CmShutdownRegistry(VOID);
|
VOID CmShutdownRegistry(VOID);
|
||||||
BOOLEAN CmImportSystemHive(PCHAR ChunkBase, ULONG ChunkSize);
|
BOOLEAN CmImportSystemHive(PCHAR ChunkBase, ULONG ChunkSize);
|
||||||
BOOLEAN CmImportHardwareHive(PCHAR ChunkBase, ULONG ChunkSize);
|
BOOLEAN CmImportHardwareHive(PCHAR ChunkBase, ULONG ChunkSize);
|
||||||
VOID KdInitSystem(ULONG Reserved, PLOADER_PARAMETER_BLOCK LoaderBlock);
|
BOOLEAN NTAPI KdInitSystem(ULONG Reserved, PLOADER_PARAMETER_BLOCK LoaderBlock);
|
||||||
|
|
||||||
/* FIXME - RtlpCreateUnicodeString is obsolete and should be removed ASAP! */
|
/* FIXME - RtlpCreateUnicodeString is obsolete and should be removed ASAP! */
|
||||||
BOOLEAN FASTCALL
|
BOOLEAN FASTCALL
|
||||||
|
|
|
@ -159,8 +159,9 @@ KdpCallInitRoutine(ULONG BootPhase)
|
||||||
WrapperTable.KdpInitRoutine(&WrapperTable, BootPhase);
|
WrapperTable.KdpInitRoutine(&WrapperTable, BootPhase);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
BOOLEAN
|
||||||
INIT_FUNCTION
|
INIT_FUNCTION
|
||||||
|
NTAPI
|
||||||
KdInitSystem(ULONG BootPhase,
|
KdInitSystem(ULONG BootPhase,
|
||||||
PLOADER_PARAMETER_BLOCK LoaderBlock)
|
PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||||
{
|
{
|
||||||
|
@ -253,11 +254,14 @@ KdInitSystem(ULONG BootPhase,
|
||||||
|
|
||||||
/* Call Wrapper at Phase 0 */
|
/* Call Wrapper at Phase 0 */
|
||||||
if (WrapperInitRoutine) WrapperInitRoutine(&WrapperTable, 0);
|
if (WrapperInitRoutine) WrapperInitRoutine(&WrapperTable, 0);
|
||||||
return;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Call the Initialization Routines of the Registered Providers */
|
/* Call the Initialization Routines of the Registered Providers */
|
||||||
KdpCallInitRoutine(BootPhase);
|
KdpCallInitRoutine(BootPhase);
|
||||||
|
|
||||||
|
/* Return success */
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -26,15 +26,7 @@
|
||||||
|
|
||||||
/* GLOBALS ****************************************************************/
|
/* GLOBALS ****************************************************************/
|
||||||
|
|
||||||
/*
|
LARGE_INTEGER KeBootTime, KeBootTimeBias;
|
||||||
* Current time
|
|
||||||
*/
|
|
||||||
#if defined(__GNUC__)
|
|
||||||
LARGE_INTEGER SystemBootTime = (LARGE_INTEGER)0LL;
|
|
||||||
#else
|
|
||||||
LARGE_INTEGER SystemBootTime = { 0 };
|
|
||||||
#endif
|
|
||||||
|
|
||||||
KDPC KiExpireTimerDpc;
|
KDPC KiExpireTimerDpc;
|
||||||
BOOLEAN KiClockSetupComplete = FALSE;
|
BOOLEAN KiClockSetupComplete = FALSE;
|
||||||
ULONG KiTimeLimitIsrMicroseconds;
|
ULONG KiTimeLimitIsrMicroseconds;
|
||||||
|
@ -66,28 +58,6 @@ ULONG KeTimeAdjustment = 100000;
|
||||||
|
|
||||||
/* FUNCTIONS **************************************************************/
|
/* FUNCTIONS **************************************************************/
|
||||||
|
|
||||||
/*
|
|
||||||
* FUNCTION: Initializes timer irq handling
|
|
||||||
* NOTE: This is only called once from main()
|
|
||||||
*/
|
|
||||||
VOID
|
|
||||||
INIT_FUNCTION
|
|
||||||
NTAPI
|
|
||||||
KiInitializeSystemClock(VOID)
|
|
||||||
{
|
|
||||||
TIME_FIELDS TimeFields;
|
|
||||||
|
|
||||||
/* Calculate the starting time for the system clock */
|
|
||||||
HalQueryRealTimeClock(&TimeFields);
|
|
||||||
RtlTimeFieldsToTime(&TimeFields, &SystemBootTime);
|
|
||||||
|
|
||||||
/* Set up the Used Shared Data */
|
|
||||||
SharedUserData->SystemTime.High2Time = SystemBootTime.u.HighPart;
|
|
||||||
SharedUserData->SystemTime.LowPart = SystemBootTime.u.LowPart;
|
|
||||||
SharedUserData->SystemTime.High1Time = SystemBootTime.u.HighPart;
|
|
||||||
KiClockSetupComplete = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
KiSetSystemTime(PLARGE_INTEGER NewSystemTime)
|
KiSetSystemTime(PLARGE_INTEGER NewSystemTime)
|
||||||
|
@ -116,7 +86,7 @@ KiSetSystemTime(PLARGE_INTEGER NewSystemTime)
|
||||||
DeltaTime.QuadPart = NewSystemTime->QuadPart - OldSystemTime.QuadPart;
|
DeltaTime.QuadPart = NewSystemTime->QuadPart - OldSystemTime.QuadPart;
|
||||||
|
|
||||||
/* Update system boot time */
|
/* Update system boot time */
|
||||||
SystemBootTime.QuadPart += DeltaTime.QuadPart;
|
KeBootTime.QuadPart += DeltaTime.QuadPart;
|
||||||
|
|
||||||
/* Update absolute timers */
|
/* Update absolute timers */
|
||||||
DPRINT1("FIXME: TIMER UPDATE NOT DONE!!!\n");
|
DPRINT1("FIXME: TIMER UPDATE NOT DONE!!!\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue