ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
January 2007
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
21 participants
401 discussions
Start a n
N
ew thread
[ion] 25626: - Implement KeUpdateSystemTime properly, it now saves and returns the old time, supports HAL time, as well as loops the timer list to fixup relative timers and expired timers after the time has changed. - Replace mm failure detection code by dprint + while loop to avoid bugchecks which might make the error worse to see. - Remove some deprecated code/functions and cleanup clock.c entirely.
by ion@svn.reactos.org
Author: ion Date: Thu Jan 25 08:14:55 2007 New Revision: 25626 URL:
http://svn.reactos.org/svn/reactos?rev=25626&view=rev
Log: - Implement KeUpdateSystemTime properly, it now saves and returns the old time, supports HAL time, as well as loops the timer list to fixup relative timers and expired timers after the time has changed. - Replace mm failure detection code by dprint + while loop to avoid bugchecks which might make the error worse to see. - Remove some deprecated code/functions and cleanup clock.c entirely. Modified: trunk/reactos/ntoskrnl/ex/init.c trunk/reactos/ntoskrnl/ex/time.c trunk/reactos/ntoskrnl/include/internal/ke.h trunk/reactos/ntoskrnl/ke/clock.c trunk/reactos/ntoskrnl/ke/dpc.c trunk/reactos/ntoskrnl/mm/pagefile.c trunk/reactos/ntoskrnl/mm/pageop.c trunk/reactos/ntoskrnl/mm/rmap.c Modified: trunk/reactos/ntoskrnl/ex/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=256…
============================================================================== --- trunk/reactos/ntoskrnl/ex/init.c (original) +++ trunk/reactos/ntoskrnl/ex/init.c Thu Jan 25 08:14:55 2007 @@ -14,9 +14,6 @@ #include <internal/debug.h> /* DATA **********************************************************************/ - -/* HACK */ -extern BOOLEAN KiClockSetupComplete; #define BUILD_OSCSDVERSION(major, minor) (((major & 0xFF) << 8) | (minor & 0xFF)) @@ -1127,9 +1124,6 @@ KeBootTimeBias = 0; } - /* The clock is ready now (FIXME: HACK FOR OLD HAL) */ - KiClockSetupComplete = TRUE; - /* Initialize all processors */ if (!HalAllProcessorsStarted()) KeBugCheck(HAL1_INITIALIZATION_FAILED); Modified: trunk/reactos/ntoskrnl/ex/time.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/time.c?rev=256…
============================================================================== --- trunk/reactos/ntoskrnl/ex/time.c (original) +++ trunk/reactos/ntoskrnl/ex/time.c Thu Jan 25 08:14:55 2007 @@ -82,7 +82,7 @@ NTSTATUS ExpSetTimeZoneInformation(PTIME_ZONE_INFORMATION TimeZoneInformation) { - LARGE_INTEGER LocalTime, SystemTime; + LARGE_INTEGER LocalTime, SystemTime, OldTime; TIME_FIELDS TimeFields; DPRINT("ExpSetTimeZoneInformation() called\n"); @@ -123,7 +123,7 @@ ExLocalTimeToSystemTime(&LocalTime, &SystemTime); /* Set the new system time */ - KeSetSystemTime(&SystemTime, NULL, FALSE, NULL); + KeSetSystemTime(&SystemTime, &OldTime, FALSE, NULL); /* Return success */ DPRINT("ExpSetTimeZoneInformation() done\n"); @@ -184,16 +184,13 @@ return STATUS_PRIVILEGE_NOT_HELD; } - /* Check if caller wants the old time */ - if(PreviousTime) KeQuerySystemTime(&OldSystemTime); - /* Convert the time and set it in HAL */ ExSystemTimeToLocalTime(&NewSystemTime, &LocalTime); RtlTimeToTimeFields(&LocalTime, &TimeFields); HalSetRealTimeClock(&TimeFields); /* Now set system time */ - KeSetSystemTime(&NewSystemTime, NULL, FALSE, NULL); + KeSetSystemTime(&NewSystemTime, &OldSystemTime, FALSE, NULL); /* Check if caller wanted previous time */ if(PreviousTime) Modified: trunk/reactos/ntoskrnl/include/internal/ke.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ke.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ke.h Thu Jan 25 08:14:55 2007 @@ -85,7 +85,8 @@ extern PVOID KeUserExceptionDispatcher; extern PVOID KeRaiseUserExceptionDispatcher; extern LARGE_INTEGER KeBootTime; -extern ULONG KeBootTimeBias; +extern ULONGLONG KeBootTimeBias; +extern BOOLEAN ExCmosClockIsSane; extern ULONG KeI386NpxPresent; extern ULONG KeI386XMMIPresent; extern ULONG KeI386FxsrPresent; Modified: trunk/reactos/ntoskrnl/ke/clock.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/clock.c?rev=25…
============================================================================== --- trunk/reactos/ntoskrnl/ke/clock.c (original) +++ trunk/reactos/ntoskrnl/ke/clock.c Thu Jan 25 08:14:55 2007 @@ -1,118 +1,182 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel + * PROJECT: ReactOS Kernel + * LICENSE: GPL - See COPYING in the top level directory * FILE: ntoskrnl/ke/clock.c - * PURPOSE: Handle System Clock - * - * PROGRAMMERS: Alex Ionescu (alex(a)relsoft.net) - Created - * David Welch & Phillip Susi - Implementation (?) - */ - - /* NOTES ******************************************************************/ -/* - * System time units are 100-nanosecond intervals - */ - -/* INCLUDES ***************************************************************/ + * PURPOSE: System Clock Support + * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ #include <ntoskrnl.h> - #define NDEBUG -#include <internal/debug.h> - -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, KiInitializeSystemClock) -#endif - -/* GLOBALS ****************************************************************/ +#include <debug.h> + +/* GLOBALS *******************************************************************/ LARGE_INTEGER KeBootTime; -ULONG KeBootTimeBias; -KDPC KiTimerExpireDpc; -BOOLEAN KiClockSetupComplete = FALSE; -ULONG KiTimeLimitIsrMicroseconds; - -/* - * Number of timer interrupts since initialisation - */ +ULONGLONG KeBootTimeBias; volatile KSYSTEM_TIME KeTickCount = {0}; volatile ULONG KiRawTicks = 0; +ULONG KeMaximumIncrement; +ULONG KeMinimumIncrement; +ULONG KeTimeAdjustment; +ULONG KeTimeIncrement; LONG KiTickOffset = 0; -/* - * The increment in the system clock every timer tick (in system time units) - * - * = (1/18.2)*10^9 - * - * RJJ was 54945055 - */ -#define CLOCK_INCREMENT (100000) - -ULONG KeMaximumIncrement = 100000; -ULONG KeMinimumIncrement = 100000; -ULONG KeTimeAdjustment = 100000; - -#define MICROSECONDS_PER_TICK (10000) -#define TICKS_TO_CALIBRATE (1) -#define CALIBRATE_PERIOD (MICROSECONDS_PER_TICK * TICKS_TO_CALIBRATE) - -/* FUNCTIONS **************************************************************/ - -VOID -NTAPI -KeSetSystemTime(IN PLARGE_INTEGER NewSystemTime, +/* PRIVATE FUNCTIONS *********************************************************/ + +VOID +NTAPI +KeSetSystemTime(IN PLARGE_INTEGER NewTime, OUT PLARGE_INTEGER OldTime, IN BOOLEAN FixInterruptTime, - IN PLARGE_INTEGER HalTime) -{ - LARGE_INTEGER OldSystemTime; - LARGE_INTEGER DeltaTime; - KIRQL OldIrql; - - ASSERT(KeGetCurrentIrql() <= DISPATCH_LEVEL); - - OldIrql = KiAcquireDispatcherLock(); - - do - { - OldSystemTime.u.HighPart = SharedUserData->SystemTime.High1Time; - OldSystemTime.u.LowPart = SharedUserData->SystemTime.LowPart; - } - while (OldSystemTime.u.HighPart != SharedUserData->SystemTime.High2Time); - - /* Set the new system time */ - SharedUserData->SystemTime.LowPart = NewSystemTime->u.LowPart; - SharedUserData->SystemTime.High1Time = NewSystemTime->u.HighPart; - SharedUserData->SystemTime.High2Time = NewSystemTime->u.HighPart; - - /* Calculate the difference between the new and the old time */ - DeltaTime.QuadPart = NewSystemTime->QuadPart - OldSystemTime.QuadPart; - - /* Update system boot time */ - KeBootTime.QuadPart += DeltaTime.QuadPart; - - /* Update absolute timers */ - DPRINT1("FIXME: TIMER UPDATE NOT DONE!!!\n"); - - KiReleaseDispatcherLock(OldIrql); - - /* - * NOTE: Expired timers will be processed at the next clock tick! - */ -} + IN PLARGE_INTEGER HalTime OPTIONAL) +{ + TIME_FIELDS TimeFields; + KIRQL OldIrql, OldIrql2; + LARGE_INTEGER DeltaTime; + PLIST_ENTRY ListHead, NextEntry; + PKTIMER Timer; + PKSPIN_LOCK_QUEUE LockQueue; + LIST_ENTRY TempList, TempList2; + ULONG Hand, i; + PKTIMER_TABLE_ENTRY TimerEntry; + + /* Sanity checks */ + ASSERT((NewTime->HighPart & 0xF0000000) == 0); + ASSERT(KeGetCurrentIrql() <= DISPATCH_LEVEL); + + /* Check if this is for the HAL */ + if (HalTime) RtlTimeToTimeFields(HalTime, &TimeFields); + + /* Set affinity to this CPU, lock the dispatcher, and raise IRQL */ + KeSetSystemAffinityThread(1); + OldIrql = KiAcquireDispatcherLock(); + KeRaiseIrql(HIGH_LEVEL, &OldIrql2); + + /* Query the system time now */ + KeQuerySystemTime(OldTime); + + /* Set the new system time */ + SharedUserData->SystemTime.LowPart = NewTime->LowPart; + SharedUserData->SystemTime.High1Time = NewTime->HighPart; + SharedUserData->SystemTime.High2Time = NewTime->HighPart; + + /* Check if this was for the HAL and set the RTC time */ + if (HalTime) ExCmosClockIsSane = HalSetRealTimeClock(&TimeFields); + + /* Calculate the difference between the new and the old time */ + DeltaTime.QuadPart = NewTime->QuadPart - OldTime->QuadPart; + + /* Update system boot time */ + KeBootTime.QuadPart += DeltaTime.QuadPart; + KeBootTimeBias = KeBootTimeBias + DeltaTime.QuadPart; + + /* Lower IRQL back */ + KeLowerIrql(OldIrql2); + + /* Check if we need to adjust interrupt time */ + if (FixInterruptTime) KEBUGCHECK(0); + + /* Setup a temporary list of absolute timers */ + InitializeListHead(&TempList); + + /* Loop current timers */ + for (i = 0; i < TIMER_TABLE_SIZE; i++) + { + /* Loop the entries in this table and lock the timers */ + ListHead = &KiTimerTableListHead[i].Entry; + LockQueue = KiAcquireTimerLock(i); + NextEntry = ListHead->Flink; + while (NextEntry != ListHead) + { + /* Get the timer */ + Timer = CONTAINING_RECORD(NextEntry, KTIMER, TimerListEntry); + NextEntry = NextEntry->Flink; + + /* Is is absolute? */ + if (Timer->Header.Absolute) + { + /* Remove it from the timer list */ + if (RemoveEntryList(&Timer->TimerListEntry)) + { + /* Get the entry and check if it's empty */ + TimerEntry = &KiTimerTableListHead[Timer->Header.Hand]; + if (IsListEmpty(&TimerEntry->Entry)) + { + /* Clear the time then */ + TimerEntry->Time.HighPart = 0xFFFFFFFF; + } + } + + /* Insert it into our temporary list */ + DPRINT1("Adding a timer!\n"); + InsertTailList(&TempList, &Timer->TimerListEntry); + } + } + + /* Release the lock */ + KiReleaseTimerLock(LockQueue); + } + + /* Setup a temporary list of expired timers */ + InitializeListHead(&TempList2); + + /* Loop absolute timers */ + while (TempList.Flink != &TempList) + { + /* Get the timer */ + Timer = CONTAINING_RECORD(TempList.Flink, KTIMER, TimerListEntry); + RemoveEntryList(&Timer->TimerListEntry); + + /* Update the due time and handle */ + Timer->DueTime.QuadPart -= DeltaTime.QuadPart; + Hand = KiComputeTimerTableIndex(Timer->DueTime.QuadPart); + Timer->Header.Hand = (UCHAR)Hand; + + /* Lock the timer and re-insert it */ + LockQueue = KiAcquireTimerLock(Hand); + if (KiInsertTimerTable(Timer, Hand)) + { + /* Remove it from the timer list */ + if (RemoveEntryList(&Timer->TimerListEntry)) + { + /* Get the entry and check if it's empty */ + TimerEntry = &KiTimerTableListHead[Timer->Header.Hand]; + if (IsListEmpty(&TimerEntry->Entry)) + { + /* Clear the time then */ + TimerEntry->Time.HighPart = 0xFFFFFFFF; + } + } + + /* Insert it into our temporary list */ + DPRINT1("Adding a timer 2!\n"); + InsertTailList(&TempList2, &Timer->TimerListEntry); + } + + /* Release the lock */ + KiReleaseTimerLock(LockQueue); + } + + /* FIXME: Process expired timers! */ + KiReleaseDispatcherLock(OldIrql); + + /* Revert affinity */ + KeRevertToUserAffinityThread(); +} + +/* PUBLIC FUNCTIONS **********************************************************/ /* * @implemented */ ULONG -STDCALL +NTAPI KeQueryTimeIncrement(VOID) -/* - * FUNCTION: Gets the increment (in 100-nanosecond units) that is added to - * the system clock every time the clock interrupts - * RETURNS: The increment - */ -{ +{ + /* Return the increment */ return KeMaximumIncrement; } @@ -121,47 +185,60 @@ */ #undef KeQueryTickCount VOID -STDCALL -KeQueryTickCount(PLARGE_INTEGER TickCount) -/* - * FUNCTION: Returns the number of ticks since the system was booted - * ARGUMENTS: - * TickCount (OUT) = Points to storage for the number of ticks - */ -{ - TickCount->QuadPart = *(PULONGLONG)&KeTickCount; -} - -/* - * FUNCTION: Gets the current system time - * ARGUMENTS: - * CurrentTime (OUT) = The routine stores the current time here - * NOTE: The time is the number of 100-nanosecond intervals since the - * 1st of January, 1601. - * - * @implemented - */ -VOID -STDCALL -KeQuerySystemTime(PLARGE_INTEGER CurrentTime) -{ - do { - CurrentTime->u.HighPart = SharedUserData->SystemTime.High1Time; - CurrentTime->u.LowPart = SharedUserData->SystemTime.LowPart; - } while (CurrentTime->u.HighPart != SharedUserData->SystemTime.High2Time); -} - +NTAPI +KeQueryTickCount(IN PLARGE_INTEGER TickCount) +{ + /* Loop until we get a perfect match */ + for (;;) + { + /* Read the tick count value */ + TickCount->HighPart = KeTickCount.High1Time; + TickCount->LowPart = KeTickCount.LowPart; + if (TickCount->HighPart == KeTickCount.High2Time) break; + YieldProcessor(); + } +} + +/* + * @implemented + */ +VOID +NTAPI +KeQuerySystemTime(OUT PLARGE_INTEGER CurrentTime) +{ + /* Loop until we get a perfect match */ + for (;;) + { + /* Read the time value */ + CurrentTime->HighPart = SharedUserData->SystemTime.High1Time; + CurrentTime->LowPart = SharedUserData->SystemTime.LowPart; + if (CurrentTime->HighPart == + SharedUserData->SystemTime.High2Time) break; + YieldProcessor(); + } +} + +/* + * @implemented + */ ULONGLONG -STDCALL +NTAPI KeQueryInterruptTime(VOID) { LARGE_INTEGER CurrentTime; - do { - CurrentTime.u.HighPart = SharedUserData->InterruptTime.High1Time; - CurrentTime.u.LowPart = SharedUserData->InterruptTime.LowPart; - } while (CurrentTime.u.HighPart != SharedUserData->InterruptTime.High2Time); - + /* Loop until we get a perfect match */ + for (;;) + { + /* Read the time value */ + CurrentTime.HighPart = SharedUserData->InterruptTime.High1Time; + CurrentTime.LowPart = SharedUserData->InterruptTime.LowPart; + if (CurrentTime.HighPart == + SharedUserData->InterruptTime.High2Time) break; + YieldProcessor(); + } + + /* Return the time value */ return CurrentTime.QuadPart; } @@ -169,32 +246,20 @@ * @implemented */ VOID -STDCALL -KeSetTimeIncrement( - IN ULONG MaxIncrement, - IN ULONG MinIncrement) +NTAPI +KeSetTimeIncrement(IN ULONG MaxIncrement, + IN ULONG MinIncrement) { /* Set some Internal Variables */ - /* FIXME: We use a harcoded CLOCK_INCREMENT. That *must* be changed */ KeMaximumIncrement = MaxIncrement; - KeMinimumIncrement = MinIncrement; -} - -/* - * @implemented - */ -ULONG -STDCALL -NtGetTickCount(VOID) -{ - LARGE_INTEGER TickCount; - - KeQueryTickCount(&TickCount); - return TickCount.u.LowPart; + KeMinimumIncrement = max(MinIncrement, 10000); + KeTimeAdjustment = MaxIncrement; + KeTimeIncrement = MaxIncrement; + KiTickOffset = MaxIncrement; } NTSTATUS -STDCALL +NTAPI NtQueryTimerResolution(OUT PULONG MinimumResolution, OUT PULONG MaximumResolution, OUT PULONG ActualResolution) @@ -204,7 +269,7 @@ } NTSTATUS -STDCALL +NTAPI NtSetTimerResolution(IN ULONG DesiredResolution, IN BOOLEAN SetResolution, OUT PULONG CurrentResolution) Modified: trunk/reactos/ntoskrnl/ke/dpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/dpc.c?rev=2562…
============================================================================== --- trunk/reactos/ntoskrnl/ke/dpc.c (original) +++ trunk/reactos/ntoskrnl/ke/dpc.c Thu Jan 25 08:14:55 2007 @@ -22,6 +22,8 @@ ULONG KiIdealDpcRate = 20; BOOLEAN KeThreadDpcEnable; FAST_MUTEX KiGenericCallDpcMutex; +KDPC KiTimerExpireDpc; +ULONG KiTimeLimitIsrMicroseconds; /* PRIVATE FUNCTIONS *********************************************************/ Modified: trunk/reactos/ntoskrnl/mm/pagefile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/pagefile.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/mm/pagefile.c (original) +++ trunk/reactos/ntoskrnl/mm/pagefile.c Thu Jan 25 08:14:55 2007 @@ -363,7 +363,11 @@ KIRQL oldIrql; ULONG MiAvailSwapPages; - if (!PagingReady) KEBUGCHECK(0); + if (!PagingReady) + { + DPRINT1("PAGING USED TOO SOON!!!\n"); + while (TRUE); + } KeAcquireSpinLock(&PagingFileListLock, &oldIrql); MiAvailSwapPages = (MiFreeSwapPages * MM_PAGEFILE_COMMIT_RATIO) + MM_PAGEFILE_COMMIT_GRACE; @@ -383,7 +387,11 @@ { KIRQL oldIrql; - if (!PagingReady) KEBUGCHECK(0); + if (!PagingReady) + { + DPRINT1("PAGING USED TOO SOON!!!\n"); + while (TRUE); + } KeAcquireSpinLock(&PagingFileListLock, &oldIrql); MiReservedSwapPages = MiReservedSwapPages - Nr; KeReleaseSpinLock(&PagingFileListLock, oldIrql); @@ -395,7 +403,11 @@ KIRQL oldIrql; ULONG i, j; - if (!PagingReady) KEBUGCHECK(0); + if (!PagingReady) + { + DPRINT1("PAGING USED TOO SOON!!!\n"); + while (TRUE); + } KeAcquireSpinLock(&PagingFile->AllocMapLock, &oldIrql); for (i = 0; i < PagingFile->AllocMapSize; i++) @@ -425,7 +437,11 @@ ULONG off; KIRQL oldIrql; - if (!PagingReady) KEBUGCHECK(0); + if (!PagingReady) + { + DPRINT1("PAGING USED TOO SOON!!!\n"); + while (TRUE); + } i = FILE_FROM_ENTRY(Entry); off = OFFSET_FROM_ENTRY(Entry); @@ -470,7 +486,11 @@ ULONG off; SWAPENTRY entry; - if (!PagingReady) KEBUGCHECK(0); + if (!PagingReady) + { + DPRINT1("PAGING USED TOO SOON!!!\n"); + while (TRUE); + } KeAcquireSpinLock(&PagingFileListLock, &oldIrql); if (MiFreeSwapPages == 0) Modified: trunk/reactos/ntoskrnl/mm/pageop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/pageop.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/mm/pageop.c (original) +++ trunk/reactos/ntoskrnl/mm/pageop.c Thu Jan 25 08:14:55 2007 @@ -149,7 +149,11 @@ KIRQL oldIrql; PMM_PAGEOP PageOp; - if (!PageOpReady) KEBUGCHECK(0); + if (!PageOpReady) + { + DPRINT1("PAGEOPS USED TOO SOON!!!\n"); + while (TRUE); + } /* * Calcuate the hash value for pageop structure @@ -269,3 +273,4 @@ + Modified: trunk/reactos/ntoskrnl/mm/rmap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/rmap.c?rev=256…
============================================================================== --- trunk/reactos/ntoskrnl/mm/rmap.c (original) +++ trunk/reactos/ntoskrnl/mm/rmap.c Thu Jan 25 08:14:55 2007 @@ -390,7 +390,11 @@ PMM_RMAP_ENTRY new_entry; ULONG PrevSize; - if (!RmapReady) KEBUGCHECK(0); + if (!RmapReady) + { + DPRINT1("RMAPS USED TOO SOON!!!\n"); + while (TRUE); + } Address = (PVOID)PAGE_ROUND_DOWN(Address); @@ -459,6 +463,12 @@ PMM_RMAP_ENTRY previous_entry; PEPROCESS Process; + if (!RmapReady) + { + DPRINT1("RMAPS USED TOO SOON!!!\n"); + while (TRUE); + } + ExAcquireFastMutex(&RmapListLock); current_entry = MmGetRmapListHeadPage(Page); if (current_entry == NULL) @@ -496,6 +506,12 @@ PVOID Address) { PMM_RMAP_ENTRY current_entry, previous_entry; + + if (!RmapReady) + { + DPRINT1("RMAPS USED TOO SOON!!!\n"); + while (TRUE); + } ExAcquireFastMutex(&RmapListLock); previous_entry = NULL;
17 years, 11 months
1
0
0
0
[ion] 25625: - Implement ObQueryTypeInfo and link it to NtQueryObject. - Fix a bug in ObQueryNameInfo. See issue #1993 for more details.
by ion@svn.reactos.org
Author: ion Date: Thu Jan 25 04:50:40 2007 New Revision: 25625 URL:
http://svn.reactos.org/svn/reactos?rev=25625&view=rev
Log: - Implement ObQueryTypeInfo and link it to NtQueryObject. - Fix a bug in ObQueryNameInfo. See issue #1993 for more details. Modified: trunk/reactos/include/ndk/obtypes.h trunk/reactos/ntoskrnl/ob/oblife.c trunk/reactos/ntoskrnl/ob/obname.c Modified: trunk/reactos/include/ndk/obtypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/obtypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/obtypes.h (original) +++ trunk/reactos/include/ndk/obtypes.h Thu Jan 25 04:50:40 2007 @@ -269,6 +269,34 @@ UNICODE_STRING TypeName; } OBJECT_DIRECTORY_INFORMATION, *POBJECT_DIRECTORY_INFORMATION; +// +// Object Type Information +// +typedef struct _OBJECT_TYPE_INFORMATION +{ + UNICODE_STRING TypeName; + ULONG TotalNumberOfObjects; + ULONG TotalNumberOfHandles; + ULONG TotalPagedPoolUsage; + ULONG TotalNonPagedPoolUsage; + ULONG TotalNamePoolUsage; + ULONG TotalHandleTableUsage; + ULONG HighWaterNumberOfObjects; + ULONG HighWaterNumberOfHandles; + ULONG HighWaterPagedPoolUsage; + ULONG HighWaterNonPagedPoolUsage; + ULONG HighWaterNamePoolUsage; + ULONG HighWaterHandleTableUsage; + ULONG InvalidAttributes; + GENERIC_MAPPING GenericMapping; + ULONG ValidAccessMask; + BOOLEAN SecurityRequired; + BOOLEAN MaintainHandleCount; + ULONG PoolType; + ULONG DefaultPagedPoolCharge; + ULONG DefaultNonPagedPoolCharge; +} OBJECT_TYPE_INFORMATION, *POBJECT_TYPE_INFORMATION; + #ifndef NTOS_MODE_USER typedef struct _OBJECT_BASIC_INFORMATION @@ -306,14 +334,14 @@ typedef struct _OBJECT_TYPE_INITIALIZER { USHORT Length; - UCHAR UseDefaultObject; - UCHAR CaseInsensitive; + BOOLEAN UseDefaultObject; + BOOLEAN CaseInsensitive; ULONG InvalidAttributes; GENERIC_MAPPING GenericMapping; ULONG ValidAccessMask; - UCHAR SecurityRequired; - UCHAR MaintainHandleCount; - UCHAR MaintainTypeList; + BOOLEAN SecurityRequired; + BOOLEAN MaintainHandleCount; + BOOLEAN MaintainTypeList; POOL_TYPE PoolType; ULONG DefaultPagedPoolCharge; ULONG DefaultNonPagedPoolCharge; Modified: trunk/reactos/ntoskrnl/ob/oblife.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/oblife.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/ob/oblife.c (original) +++ trunk/reactos/ntoskrnl/ob/oblife.c Thu Jan 25 04:50:40 2007 @@ -820,6 +820,78 @@ return STATUS_SUCCESS; } +NTSTATUS +NTAPI +ObQueryTypeInfo(IN POBJECT_TYPE ObjectType, + OUT POBJECT_TYPE_INFORMATION ObjectTypeInfo, + IN ULONG Length, + OUT PULONG ReturnLength) +{ + NTSTATUS Status = STATUS_SUCCESS; + PWSTR InfoBuffer; + + /* Enter SEH */ + _SEH_TRY + { + /* Set return length aligned to 4-byte boundary */ + *ReturnLength += sizeof(*ObjectTypeInfo) + + ALIGN_UP(ObjectType->Name.MaximumLength, ULONG); + + /* Check if thats too much though. */ + if (Length < *ReturnLength) return STATUS_INFO_LENGTH_MISMATCH; + + /* Build the data */ + ObjectTypeInfo->TotalNumberOfHandles = + ObjectType->TotalNumberOfHandles; + ObjectTypeInfo->TotalNumberOfObjects = + ObjectType->TotalNumberOfObjects; + ObjectTypeInfo->HighWaterNumberOfHandles = + ObjectType->HighWaterNumberOfHandles; + ObjectTypeInfo->HighWaterNumberOfObjects = + ObjectType->HighWaterNumberOfObjects; + ObjectTypeInfo->PoolType = + ObjectType->TypeInfo.PoolType; + ObjectTypeInfo->DefaultNonPagedPoolCharge = + ObjectType->TypeInfo.DefaultNonPagedPoolCharge; + ObjectTypeInfo->DefaultPagedPoolCharge = + ObjectType->TypeInfo.DefaultPagedPoolCharge; + ObjectTypeInfo->ValidAccessMask = + ObjectType->TypeInfo.ValidAccessMask; + ObjectTypeInfo->SecurityRequired = + ObjectType->TypeInfo.SecurityRequired; + ObjectTypeInfo->InvalidAttributes = + ObjectType->TypeInfo.InvalidAttributes; + ObjectTypeInfo->GenericMapping = + ObjectType->TypeInfo.GenericMapping; + ObjectTypeInfo->MaintainHandleCount = + ObjectType->TypeInfo.MaintainHandleCount; + + /* Setup the name buffer */ + InfoBuffer = (PWSTR)(ObjectTypeInfo + 1); + ObjectTypeInfo->TypeName.Buffer = InfoBuffer; + ObjectTypeInfo->TypeName.MaximumLength = ObjectType->Name.MaximumLength; + ObjectTypeInfo->TypeName.Length = ObjectType->Name.Length; + + /* Copy it */ + RtlCopyMemory(InfoBuffer, + ObjectType->Name.Buffer, + ObjectType->Name.Length); + + /* Null-terminate it */ + (InfoBuffer)[ObjectType->Name.Length / sizeof(WCHAR)] = UNICODE_NULL; + } + _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) + { + /* Otherwise, get the exception code */ + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + + /* Return status to caller */ + return Status; +} + + /* PUBLIC FUNCTIONS **********************************************************/ NTSTATUS @@ -1416,8 +1488,13 @@ /* Information about this type */ case ObjectTypeInformation: - DPRINT1("NOT IMPLEMENTED!\n"); - Status = STATUS_NOT_IMPLEMENTED; + + /* Call the helper and break out */ + Status = ObQueryTypeInfo(ObjectHeader->Type, + (POBJECT_TYPE_INFORMATION) + ObjectInformation, + Length, + &InfoLength); break; /* Information about all types */ Modified: trunk/reactos/ntoskrnl/ob/obname.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obname.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/ob/obname.c (original) +++ trunk/reactos/ntoskrnl/ob/obname.c Thu Jan 25 04:50:40 2007 @@ -985,6 +985,7 @@ POBJECT_DIRECTORY ParentDirectory; ULONG NameSize; PWCH ObjectName; + BOOLEAN ObjectIsNamed; /* Get the Kernel Meta-Structures */ ObjectHeader = OBJECT_TO_OBJECT_HEADER(Object); @@ -994,8 +995,9 @@ if (ObjectHeader->Type->TypeInfo.QueryNameProcedure) { /* Call the procedure */ + ObjectIsNamed = ((LocalInfo) && (LocalInfo->Name.Length > 0)); return ObjectHeader->Type->TypeInfo.QueryNameProcedure(Object, - TRUE, //fixme + ObjectIsNamed, ObjectNameInfo, Length, ReturnLength,
17 years, 11 months
1
0
0
0
[ion] 25624: - Rename KiSetSystemTime to KeSetSystemTime and enhance prototype for later use. - Create Phase 1 initialization for the SRM (SeInitSystem). Right now it inserts the system boot token into object manager, which is something we forgot to do before. - Renamed ExPhase2Init to Phase1Initialization, since it's not Phase 2. - Updated Phase 1 PS Initialization to get the KeLoaderBlock pointer and use it as a context parameter when calling Phase1Initialization. - Split off Phase1Initializat
by ion@svn.reactos.org
Author: ion Date: Thu Jan 25 04:13:09 2007 New Revision: 25624 URL:
http://svn.reactos.org/svn/reactos?rev=25624&view=rev
Log: - Rename KiSetSystemTime to KeSetSystemTime and enhance prototype for later use. - Create Phase 1 initialization for the SRM (SeInitSystem). Right now it inserts the system boot token into object manager, which is something we forgot to do before. - Renamed ExPhase2Init to Phase1Initialization, since it's not Phase 2. - Updated Phase 1 PS Initialization to get the KeLoaderBlock pointer and use it as a context parameter when calling Phase1Initialization. - Split off Phase1Initialization into Phase1InitializationDiscard, which is the bulk of the phase 1 code (99% of it) and can be put in an .INIT section to be freed after boot. - Modify parts of the Inbv setup code. Also implement support for /SOS, and try to mimic its behaviour on NT (not fully achieved). You will need /SOS to see boot messages on the screen! FreeLDR now adds this by default to the "Debug "configuration. - Temporarily disable ReactOS Banner during boot. We will get this data from the .mc/.res file in a later patch instead of hard-coding it. - Optimize calling and usage of ExpLoadInitialProcess. - Add support for Y2K bug fix documented for Windows NT (/YEAR). - Add support to detect WinPE/MiniNT/ReactOS Live CD. - Add temporary debugging code to MmInit2 and some Mm functions to detect if these functions are being used too early, which could result in catastrophic to subtle bugs. - Add more bugchecks when failures occur, and enhance others. Also add more codes to ntoskrnl.mc. - Disable calls to ObfDereferenceDeviceMap since it's not yet implemented. Modified: trunk/reactos/base/setup/usetup/bootsup.c trunk/reactos/ntoskrnl/ex/init.c trunk/reactos/ntoskrnl/ex/time.c trunk/reactos/ntoskrnl/inbv/inbv.c trunk/reactos/ntoskrnl/include/internal/ex.h trunk/reactos/ntoskrnl/include/internal/inbv.h trunk/reactos/ntoskrnl/include/internal/ke.h trunk/reactos/ntoskrnl/include/internal/po.h trunk/reactos/ntoskrnl/include/internal/ps.h trunk/reactos/ntoskrnl/io/iomgr/driver.c trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c trunk/reactos/ntoskrnl/ke/clock.c trunk/reactos/ntoskrnl/mm/mminit.c trunk/reactos/ntoskrnl/mm/pagefile.c trunk/reactos/ntoskrnl/mm/pageop.c trunk/reactos/ntoskrnl/mm/rmap.c trunk/reactos/ntoskrnl/ntoskrnl.mc trunk/reactos/ntoskrnl/ob/obname.c trunk/reactos/ntoskrnl/po/power.c trunk/reactos/ntoskrnl/ps/psmgr.c trunk/reactos/ntoskrnl/se/semgr.c Modified: trunk/reactos/base/setup/usetup/bootsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/bootsup.…
============================================================================== --- trunk/reactos/base/setup/usetup/bootsup.c (original) +++ trunk/reactos/base/setup/usetup/bootsup.c Thu Jan 25 04:13:09 2007 @@ -305,12 +305,12 @@ L"SystemPath", ArcPath); - /* Options=/DEBUGPORT=SCREEN /NOGUIBOOT */ + /* Options=/DEBUGPORT=SCREEN /NOGUIBOOT /SOS*/ IniCacheInsertKey(IniSection, NULL, INSERT_LAST, L"Options", - L"/DEBUGPORT=SCREEN /NOGUIBOOT"); + L"/DEBUGPORT=SCREEN /NOGUIBOOT /SOS"); /* Create "DOS" section */ IniSection = IniCacheAppendSection(IniCache, @@ -416,12 +416,12 @@ L"SystemPath", ArcPath); - /* Options=/DEBUGPORT=SCREEN /NOGUIBOOT */ + /* Options=/DEBUGPORT=COM1 /NOGUIBOOT /SOS*/ IniCacheInsertKey(IniSection, NULL, INSERT_LAST, L"Options", - L"/DEBUGPORT=COM1 /NOGUIBOOT"); + L"/DEBUGPORT=COM1 /NOGUIBOOT /SOS"); /* Save the ini file */ IniCacheSave(IniCache, IniPath); Modified: trunk/reactos/ntoskrnl/ex/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=256…
============================================================================== --- trunk/reactos/ntoskrnl/ex/init.c (original) +++ trunk/reactos/ntoskrnl/ex/init.c Thu Jan 25 04:13:09 2007 @@ -33,8 +33,7 @@ BOOLEAN ExpInTextModeSetup; BOOLEAN IoRemoteBootClient; ULONG InitSafeBootMode; - -BOOLEAN NoGuiBoot = FALSE; +BOOLEAN InitIsWinPEMode, InitWinPEModeType; /* NT Boot Path */ UNICODE_STRING NtSystemRoot; @@ -52,6 +51,9 @@ NLSTABLEINFO ExpNlsTableInfo; ULONG ExpNlsTableSize; PVOID ExpNlsSectionPointer; + +/* CMOS Timer Sanity */ +BOOLEAN ExCmosClockIsSane = TRUE; /* FUNCTIONS ****************************************************************/ @@ -353,13 +355,11 @@ NTSTATUS NTAPI -ExpLoadInitialProcess(IN PHANDLE ProcessHandle, - IN PHANDLE ThreadHandle) +ExpLoadInitialProcess(IN OUT PRTL_USER_PROCESS_INFORMATION ProcessInformation) { PRTL_USER_PROCESS_PARAMETERS ProcessParameters = NULL; NTSTATUS Status; ULONG Size; - RTL_USER_PROCESS_INFORMATION ProcessInformation; PWSTR p; UNICODE_STRING NullString = RTL_CONSTANT_STRING(L""); UNICODE_STRING SmssName, Environment, SystemDriveString; @@ -509,7 +509,7 @@ FALSE, NULL, NULL, - &ProcessInformation); + ProcessInformation); if (!NT_SUCCESS(Status)) { /* Failed */ @@ -517,16 +517,14 @@ } /* Resume the thread */ - Status = ZwResumeThread(ProcessInformation.ThreadHandle, NULL); + Status = ZwResumeThread(ProcessInformation->ThreadHandle, NULL); if (!NT_SUCCESS(Status)) { /* Failed */ KeBugCheckEx(SESSION4_INITIALIZATION_FAILED, Status, 0, 0, 0); } - /* Return Handles */ - *ProcessHandle = ProcessInformation.ProcessHandle; - *ThreadHandle = ProcessInformation.ThreadHandle; + /* Return success */ return STATUS_SUCCESS; } @@ -749,7 +747,9 @@ RtlInitString(&SymbolString, NameBuffer); /* Load the symbols */ - DbgLoadImageSymbols(&SymbolString, LdrEntry->DllBase, -1); + DbgLoadImageSymbols(&SymbolString, + LdrEntry->DllBase, + 0xFFFFFFFF); } } @@ -988,7 +988,7 @@ if (!SeInit()) KEBUGCHECK(SECURITY_INITIALIZATION_FAILED); /* Initialize the Process Manager */ - if (!PsInitSystem()) KEBUGCHECK(PROCESS_INITIALIZATION_FAILED); + if (!PsInitSystem(LoaderBlock)) KEBUGCHECK(PROCESS_INITIALIZATION_FAILED); /* Initialize the PnP Manager */ if (!PpInitSystem()) KEBUGCHECK(PP0_INITIALIZATION_FAILED); @@ -1018,14 +1018,27 @@ VOID NTAPI -ExPhase2Init(PVOID Context) +Phase1InitializationDiscard(PVOID Context) { + PLOADER_PARAMETER_BLOCK LoaderBlock = Context; + PCHAR CommandLine, Y2KHackRequired; LARGE_INTEGER Timeout; - HANDLE ProcessHandle; - HANDLE ThreadHandle; NTSTATUS Status; TIME_FIELDS TimeFields; - LARGE_INTEGER SystemBootTime, UniversalBootTime; + LARGE_INTEGER SystemBootTime, UniversalBootTime, OldTime; + PRTL_USER_PROCESS_INFORMATION ProcessInfo; + BOOLEAN SosEnabled, NoGuiBoot; + ULONG YearHack = 0; + + /* Allocate initial process information */ + ProcessInfo = ExAllocatePoolWithTag(NonPagedPool, + sizeof(RTL_USER_PROCESS_INFORMATION), + TAG('I', 'n', 'i', 't')); + if (!ProcessInfo) + { + /* Bugcheck */ + KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, STATUS_NO_MEMORY, 8, 0, 0); + } /* Set to phase 1 */ ExpInitializationPhase = 1; @@ -1034,29 +1047,59 @@ KeSetPriorityThread(KeGetCurrentThread(), HIGH_PRIORITY); /* Do Phase 1 HAL Initialization */ - HalInitSystem(1, KeLoaderBlock); + if (!HalInitSystem(1, LoaderBlock)) KeBugCheck(HAL1_INITIALIZATION_FAILED); + + /* Get the command line and upcase it */ + CommandLine = _strupr(LoaderBlock->LoadOptions); /* Check if GUI Boot is enabled */ - if (strstr(KeLoaderBlock->LoadOptions, "NOGUIBOOT")) NoGuiBoot = TRUE; - - /* Display the boot screen image if not disabled */ + NoGuiBoot = (strstr(CommandLine, "NOGUIBOOT")) ? TRUE: FALSE; + + /* Get the SOS setting */ + SosEnabled = strstr(CommandLine, "SOS") ? TRUE: FALSE; + + /* Setup the boot driver */ InbvDisplayInitialize(); if (!ExpInTextModeSetup) InbvDisplayInitialize2(NoGuiBoot); - if (!NoGuiBoot) InbvDisplayBootLogo(); - - /* Clear the screen to blue and display the boot notice and debug status */ - if (NoGuiBoot) ExpDisplayNotice(); - KdInitSystem(2, KeLoaderBlock); - - /* Set up Region Maps, Sections and the Paging File */ - MmInit2(); + + /* Check if GUI boot is enabled */ + if (!NoGuiBoot) + { + /* It is, display the boot logo and enable printing strings */ + InbvEnableDisplayString(SosEnabled); + InbvDisplayBootLogo(SosEnabled); + } + else + { + /* Release display ownership if not using GUI boot */ + if (!SosEnabled) InbvNotifyDisplayOwnershipLost(NULL); + + /* Don't allow boot-time strings */ + InbvEnableDisplayString(FALSE); + } + + /* Check if this is LiveCD (WinPE) mode */ + if (strstr(CommandLine, "MININT")) + { + /* Setup WinPE Settings */ + InitIsWinPEMode = TRUE; + InitWinPEModeType |= (strstr(CommandLine, "INRAM")) ? 0x80000000 : 1; + } /* Initialize Power Subsystem in Phase 0 */ - PoInit(0, AcpiTableDetected); + if (!PoInitSystem(0, AcpiTableDetected)) KeBugCheck(INTERNAL_POWER_ERROR); + + /* Check for Y2K hack */ + Y2KHackRequired = strstr(CommandLine, "YEAR"); + if (Y2KHackRequired) Y2KHackRequired = strstr(Y2KHackRequired, "="); + if (Y2KHackRequired) YearHack = atol(Y2KHackRequired + 1); /* Query the clock */ - if (HalQueryRealTimeClock(&TimeFields)) - { + if ((ExCmosClockIsSane) && (HalQueryRealTimeClock(&TimeFields))) + { + /* Check if we're using the Y2K hack */ + if (Y2KHackRequired) TimeFields.Year = (CSHORT)YearHack; + /* Convert to time fields */ RtlTimeFieldsToTime(&TimeFields, &SystemBootTime); UniversalBootTime = SystemBootTime; @@ -1075,40 +1118,53 @@ UniversalBootTime.QuadPart = SystemBootTime.QuadPart + ExpTimeZoneBias.QuadPart; #endif - KiSetSystemTime(&UniversalBootTime); + + /* Update the system time */ + KeSetSystemTime(&UniversalBootTime, &OldTime, FALSE, NULL); /* Remember this as the boot time */ KeBootTime = UniversalBootTime; + KeBootTimeBias = 0; } /* The clock is ready now (FIXME: HACK FOR OLD HAL) */ KiClockSetupComplete = TRUE; /* Initialize all processors */ - HalAllProcessorsStarted(); + if (!HalAllProcessorsStarted()) KeBugCheck(HAL1_INITIALIZATION_FAILED); /* Call OB initialization again */ if (!ObInit()) KeBugCheck(OBJECT1_INITIALIZATION_FAILED); /* Initialize Basic System Objects and Worker Threads */ - if (!ExInitSystem()) KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, 1, 0, 0, 0); + if (!ExInitSystem()) KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, 0, 0, 1, 0); /* Initialize the later stages of the kernel */ - if (!KeInitSystem()) KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, 2, 0, 0, 0); + if (!KeInitSystem()) KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, 0, 0, 2, 0); /* Call KD Providers at Phase 1 */ if (!KdInitSystem(ExpInitializationPhase, KeLoaderBlock)) { /* Failed, bugcheck */ - KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, 3, 0, 0, 0); - } + KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, 0, 0, 3, 0); + } + + /* Initialize the SRM in Phase 1 */ + if (!SeInit()) KEBUGCHECK(SECURITY1_INITIALIZATION_FAILED); + + /* Update the progress bar */ + InbvUpdateProgressBar(10); /* Create SystemRoot Link */ - Status = ExpCreateSystemRootLink(KeLoaderBlock); - if (!NT_SUCCESS(Status)) - { + Status = ExpCreateSystemRootLink(LoaderBlock); + if (!NT_SUCCESS(Status)) + { + /* Failed to create the system root link */ KeBugCheckEx(SYMBOLIC_INITIALIZATION_FAILED, Status, 0, 0, 0); } + + /* Set up Region Maps, Sections and the Paging File */ + MmInit2(); /* Create NLS section */ ExpInitNls(KeLoaderBlock); @@ -1148,17 +1204,17 @@ KeI386VdmInitialize(); /* Initialize Power Subsystem in Phase 1*/ - PoInit(1, AcpiTableDetected); + PoInitSystem(1, AcpiTableDetected); /* Initialize the Process Manager at Phase 1 */ - if (!PsInitSystem()) KeBugCheck(PROCESS1_INITIALIZATION_FAILED); + if (!PsInitSystem(LoaderBlock)) KeBugCheck(PROCESS1_INITIALIZATION_FAILED); /* Launch initial process */ - Status = ExpLoadInitialProcess(&ProcessHandle, &ThreadHandle); + Status = ExpLoadInitialProcess(ProcessInfo); /* Wait 5 seconds for it to initialize */ Timeout.QuadPart = Int32x32To64(5, -10000000); - Status = ZwWaitForSingleObject(ProcessHandle, FALSE, &Timeout); + Status = ZwWaitForSingleObject(ProcessInfo->ProcessHandle, FALSE, &Timeout); if (!NoGuiBoot) InbvFinalizeBootLogo(); if (Status == STATUS_SUCCESS) { @@ -1167,15 +1223,26 @@ } /* Close process handles */ - ZwClose(ThreadHandle); - ZwClose(ProcessHandle); + ZwClose(ProcessInfo->ThreadHandle); + ZwClose(ProcessInfo->ProcessHandle); /* FIXME: We should free the initial process' memory!*/ /* Increase init phase */ ExpInitializationPhase += 1; + + /* Free the process information */ + ExFreePool(ProcessInfo); +} + +VOID +NTAPI +Phase1Initialization(IN PVOID Context) +{ + /* Do the .INIT part of Phase 1 which we can free later */ + Phase1InitializationDiscard(Context); /* Jump into zero page thread */ MmZeroPageThreadMain(NULL); } -/* EOF */ + Modified: trunk/reactos/ntoskrnl/ex/time.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/time.c?rev=256…
============================================================================== --- trunk/reactos/ntoskrnl/ex/time.c (original) +++ trunk/reactos/ntoskrnl/ex/time.c Thu Jan 25 04:13:09 2007 @@ -123,7 +123,7 @@ ExLocalTimeToSystemTime(&LocalTime, &SystemTime); /* Set the new system time */ - KiSetSystemTime(&SystemTime); + KeSetSystemTime(&SystemTime, NULL, FALSE, NULL); /* Return success */ DPRINT("ExpSetTimeZoneInformation() done\n"); @@ -193,7 +193,7 @@ HalSetRealTimeClock(&TimeFields); /* Now set system time */ - KiSetSystemTime(&NewSystemTime); + KeSetSystemTime(&NewSystemTime, NULL, FALSE, NULL); /* Check if caller wanted previous time */ if(PreviousTime) Modified: trunk/reactos/ntoskrnl/inbv/inbv.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/inbv/inbv.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/inbv/inbv.c (original) +++ trunk/reactos/ntoskrnl/inbv/inbv.c Thu Jan 25 04:13:09 2007 @@ -300,14 +300,14 @@ VOID NTAPI -InbvDisplayBootLogo(VOID) +InbvDisplayBootLogo(IN BOOLEAN SosEnabled) { InbvEnableBootDriver(TRUE); if (BootVidDriverInstalled) { InbvResetDisplayParameters = BootVidResetDisplayParameters; - BootVidDisplayBootLogo(BootVidBase); + if (!SosEnabled) BootVidDisplayBootLogo(BootVidBase); } } Modified: trunk/reactos/ntoskrnl/include/internal/ex.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ex.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ex.h Thu Jan 25 04:13:09 2007 @@ -138,7 +138,7 @@ VOID NTAPI -ExPhase2Init( +Phase1Initialization( IN PVOID Context ); Modified: trunk/reactos/ntoskrnl/include/internal/inbv.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/inbv.h (original) +++ trunk/reactos/ntoskrnl/include/internal/inbv.h Thu Jan 25 04:13:09 2007 @@ -14,7 +14,7 @@ InbvDisplayInitialize2(BOOLEAN NoGuiBoot); VOID NTAPI -InbvDisplayBootLogo(VOID); +InbvDisplayBootLogo(IN BOOLEAN SosEnabled); VOID NTAPI InbvUpdateProgressBar(ULONG Progress); Modified: trunk/reactos/ntoskrnl/include/internal/ke.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ke.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ke.h Thu Jan 25 04:13:09 2007 @@ -85,6 +85,7 @@ extern PVOID KeUserExceptionDispatcher; extern PVOID KeRaiseUserExceptionDispatcher; extern LARGE_INTEGER KeBootTime; +extern ULONG KeBootTimeBias; extern ULONG KeI386NpxPresent; extern ULONG KeI386XMMIPresent; extern ULONG KeI386FxsrPresent; @@ -781,7 +782,12 @@ VOID NTAPI -KiSetSystemTime(PLARGE_INTEGER NewSystemTime); +KeSetSystemTime( + IN PLARGE_INTEGER NewSystemTime, + OUT PLARGE_INTEGER OldSystemTime, + IN BOOLEAN FixInterruptTime, + IN PLARGE_INTEGER HalTime +); ULONG NTAPI Modified: trunk/reactos/ntoskrnl/include/internal/po.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/po.h (original) +++ trunk/reactos/ntoskrnl/include/internal/po.h Thu Jan 25 04:13:09 2007 @@ -35,9 +35,9 @@ // // Initialization routines // -VOID +BOOLEAN NTAPI -PoInit( +PoInitSystem( IN ULONG BootPhase, IN BOOLEAN HaveAcpiTable ); Modified: trunk/reactos/ntoskrnl/include/internal/ps.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ps.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ps.h Thu Jan 25 04:13:09 2007 @@ -82,7 +82,7 @@ BOOLEAN NTAPI PsInitSystem( - VOID + IN PLOADER_PARAMETER_BLOCK LoaderBlock ); // Modified: trunk/reactos/ntoskrnl/io/iomgr/driver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/driver.c…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/driver.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/driver.c Thu Jan 25 04:13:09 2007 @@ -30,7 +30,6 @@ POBJECT_TYPE IoDriverObjectType = NULL; extern BOOLEAN ExpInTextModeSetup; -extern BOOLEAN NoGuiBoot; /* DECLARATIONS ***************************************************************/ @@ -281,7 +280,7 @@ BOOLEAN Unicode) { CHAR TextBuffer[256]; - if (ExpInTextModeSetup || !NoGuiBoot) return; + if (ExpInTextModeSetup) return; if (Unicode) { sprintf(TextBuffer, "Loading %S...\n", (PWCHAR)ServiceName); Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
============================================================================== --- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c (original) +++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c Thu Jan 25 04:13:09 2007 @@ -3363,11 +3363,12 @@ { /* Setup the guarded mutex and AVL table */ KeInitializeGuardedMutex(&PpDeviceReferenceTableLock); - RtlInitializeGenericTableAvl(&PpDeviceReferenceTable, - PiCompareInstancePath, - PiAllocateGenericTableEntry, - PiFreeGenericTableEntry, - NULL); + RtlInitializeGenericTableAvl( + &PpDeviceReferenceTable, + (PRTL_AVL_COMPARE_ROUTINE)PiCompareInstancePath, + (PRTL_AVL_ALLOCATE_ROUTINE)PiAllocateGenericTableEntry, + (PRTL_AVL_FREE_ROUTINE)PiFreeGenericTableEntry, + NULL); } BOOLEAN Modified: trunk/reactos/ntoskrnl/ke/clock.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/clock.c?rev=25…
============================================================================== --- trunk/reactos/ntoskrnl/ke/clock.c (original) +++ trunk/reactos/ntoskrnl/ke/clock.c Thu Jan 25 04:13:09 2007 @@ -26,7 +26,8 @@ /* GLOBALS ****************************************************************/ -LARGE_INTEGER KeBootTime, KeBootTimeBias; +LARGE_INTEGER KeBootTime; +ULONG KeBootTimeBias; KDPC KiTimerExpireDpc; BOOLEAN KiClockSetupComplete = FALSE; ULONG KiTimeLimitIsrMicroseconds; @@ -59,7 +60,10 @@ VOID NTAPI -KiSetSystemTime(PLARGE_INTEGER NewSystemTime) +KeSetSystemTime(IN PLARGE_INTEGER NewSystemTime, + OUT PLARGE_INTEGER OldTime, + IN BOOLEAN FixInterruptTime, + IN PLARGE_INTEGER HalTime) { LARGE_INTEGER OldSystemTime; LARGE_INTEGER DeltaTime; Modified: trunk/reactos/ntoskrnl/mm/mminit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mminit.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/mm/mminit.c (original) +++ trunk/reactos/ntoskrnl/mm/mminit.c Thu Jan 25 04:13:09 2007 @@ -451,15 +451,21 @@ MmInitializeMdlImplementation(); } +BOOLEAN RmapReady, PageOpReady, SectionsReady, PagingReady; + VOID NTAPI INIT_FUNCTION MmInit2(VOID) { MmInitializeRmapList(); + RmapReady = TRUE; MmInitializePageOp(); + PageOpReady = TRUE; MmInitSectionImplementation(); + SectionsReady = TRUE; MmInitPagingFile(); + PagingReady = TRUE; } VOID Modified: trunk/reactos/ntoskrnl/mm/pagefile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/pagefile.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/mm/pagefile.c (original) +++ trunk/reactos/ntoskrnl/mm/pagefile.c Thu Jan 25 04:13:09 2007 @@ -318,6 +318,8 @@ return(Status); } +extern BOOLEAN PagingReady; + VOID INIT_FUNCTION NTAPI @@ -361,6 +363,7 @@ KIRQL oldIrql; ULONG MiAvailSwapPages; + if (!PagingReady) KEBUGCHECK(0); KeAcquireSpinLock(&PagingFileListLock, &oldIrql); MiAvailSwapPages = (MiFreeSwapPages * MM_PAGEFILE_COMMIT_RATIO) + MM_PAGEFILE_COMMIT_GRACE; @@ -380,6 +383,7 @@ { KIRQL oldIrql; + if (!PagingReady) KEBUGCHECK(0); KeAcquireSpinLock(&PagingFileListLock, &oldIrql); MiReservedSwapPages = MiReservedSwapPages - Nr; KeReleaseSpinLock(&PagingFileListLock, oldIrql); @@ -391,6 +395,7 @@ KIRQL oldIrql; ULONG i, j; + if (!PagingReady) KEBUGCHECK(0); KeAcquireSpinLock(&PagingFile->AllocMapLock, &oldIrql); for (i = 0; i < PagingFile->AllocMapSize; i++) @@ -420,6 +425,7 @@ ULONG off; KIRQL oldIrql; + if (!PagingReady) KEBUGCHECK(0); i = FILE_FROM_ENTRY(Entry); off = OFFSET_FROM_ENTRY(Entry); @@ -464,6 +470,7 @@ ULONG off; SWAPENTRY entry; + if (!PagingReady) KEBUGCHECK(0); KeAcquireSpinLock(&PagingFileListLock, &oldIrql); if (MiFreeSwapPages == 0) Modified: trunk/reactos/ntoskrnl/mm/pageop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/pageop.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/mm/pageop.c (original) +++ trunk/reactos/ntoskrnl/mm/pageop.c Thu Jan 25 04:13:09 2007 @@ -133,6 +133,8 @@ return(NULL); } +extern BOOLEAN RmapReady, PageOpReady, SectionsReady, PagingReady; + PMM_PAGEOP NTAPI MmGetPageOp(PMEMORY_AREA MArea, HANDLE Pid, PVOID Address, @@ -146,6 +148,8 @@ ULONG_PTR Hash; KIRQL oldIrql; PMM_PAGEOP PageOp; + + if (!PageOpReady) KEBUGCHECK(0); /* * Calcuate the hash value for pageop structure Modified: trunk/reactos/ntoskrnl/mm/rmap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/rmap.c?rev=256…
============================================================================== --- trunk/reactos/ntoskrnl/mm/rmap.c (original) +++ trunk/reactos/ntoskrnl/mm/rmap.c Thu Jan 25 04:13:09 2007 @@ -379,6 +379,8 @@ return(FALSE); } +extern BOOLEAN RmapReady, PageOpReady, SectionsReady, PagingReady; + VOID NTAPI MmInsertRmap(PFN_TYPE Page, PEPROCESS Process, @@ -387,6 +389,8 @@ PMM_RMAP_ENTRY current_entry; PMM_RMAP_ENTRY new_entry; ULONG PrevSize; + + if (!RmapReady) KEBUGCHECK(0); Address = (PVOID)PAGE_ROUND_DOWN(Address); Modified: trunk/reactos/ntoskrnl/ntoskrnl.mc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.mc?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/ntoskrnl.mc (original) +++ trunk/reactos/ntoskrnl/ntoskrnl.mc Thu Jan 25 04:13:09 2007 @@ -1105,6 +1105,14 @@ INVALID_WORK_QUEUE_ITEM . +MessageId=0xA0 +Severity=Success +Facility=System +SymbolicName=INTERNAL_POWER_ERROR +Language=English +INTERNAL_POWER_ERROR +. + MessageId=0xA5 Severity=Success Facility=System Modified: trunk/reactos/ntoskrnl/ob/obname.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obname.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/ob/obname.c (original) +++ trunk/reactos/ntoskrnl/ob/obname.c Thu Jan 25 04:13:09 2007 @@ -501,7 +501,7 @@ if (DeviceMap) { /* Dereference it */ - ObfDereferenceDeviceMap(DeviceMap); + //ObfDereferenceDeviceMap(DeviceMap); DeviceMap = NULL; } @@ -935,7 +935,7 @@ } /* Check if we have a device map and dereference it if so */ - if (DeviceMap) ObfDereferenceDeviceMap(DeviceMap); + //if (DeviceMap) ObfDereferenceDeviceMap(DeviceMap); /* Check if we have a referenced directory and dereference it if so */ if (ReferencedDirectory) ObDereferenceObject(ReferencedDirectory); Modified: trunk/reactos/ntoskrnl/po/power.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/po/power.c?rev=25…
============================================================================== --- trunk/reactos/ntoskrnl/po/power.c (original) +++ trunk/reactos/ntoskrnl/po/power.c Thu Jan 25 04:13:09 2007 @@ -12,10 +12,6 @@ #include <ntoskrnl.h> #define NDEBUG #include <internal/debug.h> - -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, PoInit) -#endif extern ULONG ExpInitialiationPhase; @@ -304,11 +300,10 @@ return Status; } -VOID -INIT_FUNCTION -NTAPI -PoInit(IN ULONG BootPhase, - IN BOOLEAN HaveAcpiTable) +BOOLEAN +NTAPI +PoInitSystem(IN ULONG BootPhase, + IN BOOLEAN HaveAcpiTable) { PVOID NotificationEntry; PCHAR CommandLine; @@ -326,7 +321,7 @@ PopAddRemoveSysCapsCallback, NULL, &NotificationEntry); - return; + return TRUE; } /* Get the Command Line */ @@ -348,6 +343,8 @@ /* Otherwise check the LoaderBlock's Flag */ PopAcpiPresent = HaveAcpiTable; } + + return TRUE; } VOID Modified: trunk/reactos/ntoskrnl/ps/psmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/psmgr.c?rev=25…
============================================================================== --- trunk/reactos/ntoskrnl/ps/psmgr.c (original) +++ trunk/reactos/ntoskrnl/ps/psmgr.c Thu Jan 25 04:13:09 2007 @@ -271,7 +271,7 @@ BOOLEAN NTAPI -PspInitPhase1(VOID) +PspInitPhase1() { /* Initialize the System DLL and return status of operation */ if (!NT_SUCCESS(PspInitializeSystemDll())) return FALSE; @@ -280,7 +280,7 @@ BOOLEAN NTAPI -PspInitPhase0(VOID) +PspInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { NTSTATUS Status; OBJECT_ATTRIBUTES ObjectAttributes; @@ -478,8 +478,8 @@ &ObjectAttributes, 0, NULL, - ExPhase2Init, - NULL); + Phase1Initialization, + LoaderBlock); if (!NT_SUCCESS(Status)) return FALSE; /* Create a handle to it */ @@ -497,7 +497,7 @@ BOOLEAN NTAPI -PsInitSystem(VOID) +PsInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { /* Check the initialization phase */ switch (ExpInitializationPhase) @@ -505,7 +505,7 @@ case 0: /* Do Phase 0 */ - return PspInitPhase0(); + return PspInitPhase0(LoaderBlock); case 1: @@ -515,7 +515,11 @@ default: /* Don't know any other phase! Bugcheck! */ - KeBugCheck(UNEXPECTED_INITIALIZATION_CALL); + KeBugCheckEx(UNEXPECTED_INITIALIZATION_CALL, + 1, + ExpInitializationPhase, + 0, + 0); return FALSE; } } Modified: trunk/reactos/ntoskrnl/se/semgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/semgr.c?rev=25…
============================================================================== --- trunk/reactos/ntoskrnl/se/semgr.c (original) +++ trunk/reactos/ntoskrnl/se/semgr.c Thu Jan 25 04:13:09 2007 @@ -20,58 +20,95 @@ SE_EXPORTS SepExports; static ERESOURCE SepSubjectContextLock; +extern ULONG ExpInitializationPhase; /* PROTOTYPES ***************************************************************/ static BOOLEAN SepInitExports(VOID); -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, SeInit) -#pragma alloc_text(INIT, SepInitExports) -#endif - /* FUNCTIONS ****************************************************************/ -BOOLEAN -INIT_FUNCTION +BOOLEAN +NTAPI +SepInitializationPhase0(VOID) +{ + DPRINT1("FIXME: SeAccessCheck has been HACKED to always grant access!\n"); + DPRINT1("FIXME: Please fix all the code that doesn't get proper rights!\n"); + + SepInitLuid(); + if (!SepInitSecurityIDs()) return FALSE; + if (!SepInitDACLs()) return FALSE; + if (!SepInitSDs()) return FALSE; + SepInitPrivileges(); + if (!SepInitExports()) return FALSE; + + /* Initialize the subject context lock */ + ExInitializeResource(&SepSubjectContextLock); + + /* Initialize token objects */ + SepInitializeTokenImplementation(); + + /* Clear impersonation info for the idle thread */ + PsGetCurrentThread()->ImpersonationInfo = NULL; + PspClearCrossThreadFlag(PsGetCurrentThread(), + CT_ACTIVE_IMPERSONATION_INFO_BIT); + + /* Initialize the boot token */ + ObInitializeFastReference(&PsGetCurrentProcess()->Token, NULL); + ObInitializeFastReference(&PsGetCurrentProcess()->Token, + SepCreateSystemProcessToken()); + return TRUE; +} + +BOOLEAN +NTAPI +SepInitializationPhase1(VOID) +{ + NTSTATUS Status; + PAGED_CODE(); + + /* Insert the system token into the tree */ + Status = ObInsertObject((PVOID)(PsGetCurrentProcess()->Token.Value & + ~MAX_FAST_REFS), + NULL, + 0, + 0, + NULL, + NULL); + ASSERT(NT_SUCCESS(Status)); + + /* FIXME: TODO \\ Security directory */ + return TRUE; +} + +BOOLEAN NTAPI SeInit(VOID) { - DPRINT1("FIXME: SeAccessCheck has been HACKED to always grant access!\n"); - DPRINT1("FIXME: Please fix all the code that doesn't get proper rights!\n"); - - SepInitLuid(); - - if (!SepInitSecurityIDs()) - return FALSE; - - if (!SepInitDACLs()) - return FALSE; - - if (!SepInitSDs()) - return FALSE; - - SepInitPrivileges(); - - if (!SepInitExports()) - return FALSE; - - /* Initialize the subject context lock */ - ExInitializeResource(&SepSubjectContextLock); - - /* Initialize token objects */ - SepInitializeTokenImplementation(); - - /* Clear impersonation info for the idle thread */ - PsGetCurrentThread()->ImpersonationInfo = NULL; - PspClearCrossThreadFlag(PsGetCurrentThread(), CT_ACTIVE_IMPERSONATION_INFO_BIT); - - /* Initailize the boot token */ - ObInitializeFastReference(&PsGetCurrentProcess()->Token, NULL); - ObInitializeFastReference(&PsGetCurrentProcess()->Token, - SepCreateSystemProcessToken()); - return TRUE; + /* Check the initialization phase */ + switch (ExpInitializationPhase) + { + case 0: + + /* Do Phase 0 */ + return SepInitializationPhase0(); + + case 1: + + /* Do Phase 1 */ + return SepInitializationPhase1(); + + default: + + /* Don't know any other phase! Bugcheck! */ + KeBugCheckEx(UNEXPECTED_INITIALIZATION_CALL, + 0, + ExpInitializationPhase, + 0, + 0); + return FALSE; + } } BOOLEAN
17 years, 11 months
1
0
0
0
[janderwald] 25623: - set svn eol-properties - update translation by Heis Spiter heis underscore spiter at hotmail dot c o m See issue #2000 for more details.
by janderwald@svn.reactos.org
Author: janderwald Date: Wed Jan 24 23:27:50 2007 New Revision: 25623 URL:
http://svn.reactos.org/svn/reactos?rev=25623&view=rev
Log: - set svn eol-properties - update translation by Heis Spiter heis underscore spiter at hotmail dot c o m See issue #2000 for more details. Modified: trunk/reactos/dll/cpl/intl_new/Fr.rc (contents, props changed) Modified: trunk/reactos/dll/cpl/intl_new/Fr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl_new/Fr.rc?rev…
============================================================================== --- trunk/reactos/dll/cpl/intl_new/Fr.rc (original) +++ trunk/reactos/dll/cpl/intl_new/Fr.rc Wed Jan 24 23:27:50 2007 @@ -5,40 +5,40 @@ CAPTION "Options régionales" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Options régionales et standards", IDC_GROUPBOX, 5, 3, 242, 165 - LTEXT "Cette option influence la façon d'affichage par les programmes des nombres, des devises, des dates et de l'heure.", IDC_STATIC, 14, 15, 230, 16 - LTEXT "&Choisir un élément de la liste ou presser le bouton ""Pa&ramétrer"" pour modifier séparément les formats:", IDC_STATIC, 14, 36, 230, 16 + GROUPBOX "Standards et formats", IDC_GROUPBOX, 5, 3, 242, 165 + LTEXT "Cette option modifie la façon dont certains programmes affichent les nombres, les monnaies, les dates et les heures.", IDC_STATIC, 14, 15, 230, 16 + LTEXT "Sélectionnez un élément pour afficher ses paramètres ou cliquez sur Personnaliser pour choisir vos propres formats :", IDC_STATIC, 14, 36, 230, 16 COMBOBOX IDC_SETREG_COMBO, 14, 54, 168, 120, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SORT - PUSHBUTTON "Pa&ramétrer...", IDC_SETUP_BUTTON, 187, 54, 52, 13 + PUSHBUTTON "Personnaliser...", IDC_SETUP_BUTTON, 187, 54, 52, 13 LTEXT "Exemples", IDC_STATIC, 14, 73, 70, 10 - LTEXT "Nombre:", IDC_STATIC, 16, 86, 48, 10 - LTEXT "Monétaire:", IDC_STATIC, 16, 101, 48, 10 - LTEXT "Heure:", IDC_STATIC, 16, 116, 48, 10 - LTEXT "Date courte:", IDC_STATIC, 16, 131, 48, 10 - LTEXT "Date longue:", IDC_STATIC, 16, 146, 48, 10 + LTEXT "Nombre :", IDC_STATIC, 16, 86, 48, 10 + LTEXT "Symbole monétaire :", IDC_STATIC, 16, 101, 48, 10 + LTEXT "Heure :", IDC_STATIC, 16, 116, 48, 10 + LTEXT "Date courte :", IDC_STATIC, 16, 131, 48, 10 + LTEXT "Date longue :", IDC_STATIC, 16, 146, 48, 10 EDITTEXT IDC_NUMSAMPLE_EDIT, 69, 86, 170, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP EDITTEXT IDC_MONEYSAMPLE_EDIT, 69, 101, 170, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP EDITTEXT IDC_TIMESAMPLE_EDIT, 69, 116, 170, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP EDITTEXT IDC_SHORTTIMESAMPLE_EDIT, 69, 131, 170, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP EDITTEXT IDC_FULLTIMESAMPLE_EDIT, 69, 146, 170, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP - GROUPBOX "Position géographique", IDC_GROUPBOX, 5, 172, 242, 56 - LTEXT "Sélectionner votre position géographique pour les services tels que les infos locales ou la météo" , IDC_STATIC, 14, 184, 225, 24 + GROUPBOX "Emplacement", IDC_GROUPBOX, 5, 172, 242, 56 + LTEXT "Pour aider les services à vous fournir des informations telles que les actualités et la météo, sélectionnez votre emplacement actuel :" , IDC_STATIC, 14, 184, 225, 24 COMBOBOX IDC_LOCATION_COMBO, 14, 211, 225, 40, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SORT END IDD_EXTRAOPTSPAGE DIALOGEX 0, 0, 252, 236 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Extra" +CAPTION "Options avancées" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Program language that not unicode supported", IDC_GROUPBOX, 5, 5, 242, 90 + GROUPBOX "Langue pour les programmes non Unicode", IDC_GROUPBOX, 5, 5, 242, 90 COMBOBOX IDC_LANGUAGE_COMBO, 14, 75, 225, 60, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT "This option...", IDC_STATIC, 14, 18, 223, 33 - LTEXT "Sélectionner la langue...", IDC_STATIC, 14, 55, 223, 18 - GROUPBOX "Transformation tables codepages", IDC_GROUPBOX, 5, 101, 242, 88 + LTEXT "Ce paramètre système permet à des programmes non Unicode d'afficher des dialogues et des menus dans leur langue d'origine. Ce paramètre n'affecte pas les programmes Unicode mais s'applique à tous les utilisateurs de cet ordinateur.", IDC_STATIC, 14, 18, 223, 33 + LTEXT "Sélectionnez une langue qui corresponde à la version des programmes non Unicode que vous voulez utiliser :", IDC_STATIC, 14, 55, 223, 18 + GROUPBOX "Tables de conversion des pages de code", IDC_GROUPBOX, 5, 101, 242, 88 /* TODO: add other components*/ END @@ -47,10 +47,10 @@ CAPTION "Langues" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Langue de saisie du texte et services", IDC_GROUPBOX, 5, 3, 242, 52 - LTEXT "Pour voir ou modifier les langues et les méthodes de saisie de texte, cliquer sur ""Détail...""", -1, 12, 13, 230, 18 - PUSHBUTTON "Dé&tail...", IDC_DETAIL_BUTTON, 186, 34, 54, 14 - GROUPBOX "Support de langages additionnels", IDC_GROUPBOX, 5, 60, 242, 82 + GROUPBOX "Services de texte et langues d'entrée", IDC_GROUPBOX, 5, 3, 242, 52 + LTEXT "Pour afficher ou modifier les langues et les méthodes que vous pouvez utiliser pour entrer du texte, cliquer sur Détails.", -1, 12, 13, 230, 18 + PUSHBUTTON "Détails...", IDC_DETAIL_BUTTON, 186, 34, 54, 14 + GROUPBOX "Prise en charge de langues supplémentaires", IDC_GROUPBOX, 5, 60, 242, 82 /* TODO: add other components*/ END @@ -59,62 +59,62 @@ CAPTION "Nombres" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Exemples", IDC_GROUPBOX, 5, 7, 242, 48 - LTEXT "Positif:", -1, 11, 20, 28, 10 + GROUPBOX "Aperçu", IDC_GROUPBOX, 5, 7, 242, 48 + LTEXT "Positif :", -1, 11, 20, 28, 10 EDITTEXT IDC_NUM_EDIT, 42, 18, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT "Négatif:", -1, 128, 20, 31, 10 + LTEXT "Négatif :", -1, 128, 20, 31, 10 EDITTEXT IDC_NEGNUM_EDIT, 162, 18, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT "Positif:", -1, 11, 38, 28, 10 + LTEXT "Positif :", -1, 11, 38, 28, 10 EDITTEXT IDC_NUM1_EDIT, 42, 36, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT "Négatif:", -1, 128, 38, 31, 10 + LTEXT "Négatif :", -1, 128, 38, 31, 10 EDITTEXT IDC_NEGNUM1_EDIT, 162, 36, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT "Séparateur décimal:", -1, 18, 61, 126, 9 + LTEXT "Symbole décimal :", -1, 18, 61, 126, 9 COMBOBOX IDC_NUMDECIMALSEP_COMBO, 147, 59, 100, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Nombre de chiffres décimaux:", -1, 18, 77, 126, 9 + LTEXT "Nombre de décimales :", -1, 18, 77, 126, 9 COMBOBOX IDC_NUMFRACSYBMS_COMBO, 147, 75, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Séparateur de champ:", -1, 18, 93, 126, 9 + LTEXT "Symbole de groupement des chiffres :", -1, 18, 93, 126, 9 COMBOBOX IDC_NUMFIELDSEP_COMBO, 147, 91, 100, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Nombre de chiffres dans le champ:", -1, 18, 109, 126, 9 + LTEXT "Groupement des chiffres :", -1, 18, 109, 126, 9 COMBOBOX IDC_NUMDIGFIELD_COMBO, 147, 107, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Signe de nombre négatif:", -1, 18, 125, 126, 9 + LTEXT "Symbole du signe négatif :", -1, 18, 125, 126, 9 COMBOBOX IDC_NUMNEGSIGN_COMBO, 147, 123, 100, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Format des nombres négatifs:", -1, 18, 141, 126, 9 + LTEXT "Format de nombre négatif :", -1, 18, 141, 126, 9 COMBOBOX IDC_NUMNEGFMT_COMBO, 147, 139, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Zéros d'en-tête:", -1, 18, 157, 126, 9 + LTEXT "Afficher les zéros en en-tête :", -1, 18, 157, 126, 9 COMBOBOX IDC_NUMLEADZERO_COMBO, 147, 155, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Séparateur d'éléments de liste :", -1, 18, 173, 126, 9 + LTEXT "Séparateur de listes :", -1, 18, 173, 126, 9 COMBOBOX IDC_NUMELEMLISTSEP_COMBO, 147, 171, 100, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Unité de mesure:", -1, 18, 189, 126, 9 + LTEXT "Système de mesure:", -1, 18, 189, 126, 9 COMBOBOX IDC_NUMUNITSSYS_COMBO, 147, 187, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Region corresponding digits:", -1, 18, 205, 126, 9 + LTEXT "Chiffres correspondants à la région :", -1, 18, 205, 126, 9 COMBOBOX IDC_NUMREGDIG_COMBO, 147, 203, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Digit replacement:", -1, 18, 221, 126, 9 + LTEXT "Remplacement de chiffres :", -1, 18, 221, 126, 9 COMBOBOX IDC_NUMDIGREPL_COMBO, 147, 219, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE END IDD_CURRENCYOPTSSETUP DIALOGEX 0, 0, 252, 236 STYLE DS_FIXEDSYS | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Monnaie" +CAPTION "Symbole monétaire" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Exemples", IDC_GROUPBOX, 5, 7, 242, 40 - LTEXT "Positif:", -1, 10, 25, 30, 10 + LTEXT "Positif :", -1, 10, 25, 30, 10 EDITTEXT IDC_CURRENCY_EDIT, 42, 23, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT "Négatif:", -1, 128, 25, 31, 10 + LTEXT "Négatif :", -1, 128, 25, 31, 10 EDITTEXT IDC_NEGCURRENCY_EDIT, 162, 23, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT "Symbole monétaire:", -1, 20, 61, 126, 9 + LTEXT "Symbole monétaire :", -1, 20, 61, 126, 9 COMBOBOX IDC_CURRENCYUNIT_COMBO, 148, 59, 90, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE | CBS_SORT - LTEXT "Monnaie au format négatif:", -1, 20, 78, 126, 9 + LTEXT "Format positif :", -1, 20, 78, 126, 9 COMBOBOX IDC_POSCURRENCYSUM_COMBO, 148, 76, 90, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Monnaie au format positif:", -1, 20, 95, 126, 9 + LTEXT "Format négatif :", -1, 20, 95, 126, 9 COMBOBOX IDC_NEGCURRENCYSUM_COMBO, 148, 93, 90, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Séparateur décimal:", -1, 20, 121, 126, 9 + LTEXT "Symbole décimal :", -1, 20, 121, 126, 9 COMBOBOX IDC_WHOLEFRACTSEP_COMBO, 148, 119, 90, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE | CBS_SORT - LTEXT "Nombre de chiffres décimaux:", -1, 20, 137, 126, 9 + LTEXT "Nombre de décimales :", -1, 20, 137, 126, 9 COMBOBOX IDC_FRACSYMBSNUM_COMBO, 148, 136, 90, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE | CBS_SORT - LTEXT "Séparateur de champ:", -1, 20, 166, 126, 9 + LTEXT "Symbole de groupement des chiffres :", -1, 20, 166, 126, 9 COMBOBOX IDC_FIELDSEP_COMBO, 148, 164, 90, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE | CBS_SORT - LTEXT "Nombre de chiffres dans le champ:", -1, 20, 183, 126, 9 + LTEXT "Groupement des chiffres :", -1, 20, 183, 126, 9 COMBOBOX IDC_DIGINFIELDNUM_COMBO, 148, 181, 90, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE END @@ -123,20 +123,20 @@ CAPTION "Heure" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Exemples", IDC_GROUPBOX, 5, 7, 242, 33 - LTEXT "Exemple:", -1, 13, 21, 52, 10 + GROUPBOX "Aperçu", IDC_GROUPBOX, 5, 7, 242, 33 + LTEXT "Exemple d'heure :", -1, 13, 21, 52, 10 EDITTEXT IDC_TIME_EDIT, 68, 19, 84, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP EDITTEXT IDC_UNKNOWN_EDIT, 156, 19, 84, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT "Format de l'heure:", -1, 10, 52, 147, 10 + LTEXT "Format de l'heure :", -1, 10, 52, 147, 10 COMBOBOX IDC_TIMEFMT_COMBO, 161, 50, 84, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Séparateur horaire:", -1, 10, 69, 147, 10 + LTEXT "Séparateur horaire :", -1, 10, 69, 147, 10 COMBOBOX IDC_TIMESEP_COMBO, 161, 67, 84, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Heure avant midi (AM):", -1, 10, 86, 147, 10 + LTEXT "Symbole AM :", -1, 10, 86, 147, 10 COMBOBOX IDC_TIMEAM_COMBO, 161, 84, 84, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Heure après midi (PM):", -1, 10, 104, 147, 10 + LTEXT "Symbole PM :", -1, 10, 104, 147, 10 COMBOBOX IDC_TIMEPM_COMBO, 161, 102, 84, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE GROUPBOX "", IDC_GROUPBOX, 7, 132, 238, 80 - LTEXT "Description du format de l'heure\nh = heure m = minute s = seconde t = matin ou après-midi\n\nh = heure au format 12 heures\nH = heure au format 24 heures\n\nhh, mm, ss = avec des zéros\nh, m, s = sans zéros", -1, 13, 141, 226, 65 + LTEXT "Notation du format de l'heure\nh = heure m = minute s = seconde t = matin ou après-midi\n\nh = 12 heures\nH = 24 heures\n\nhh, mm, ss = précédé d'un zéro\nh, m, s = pas de zéro", -1, 13, 141, 226, 65 END IDD_DATEOPTSSETUP DIALOGEX 0, 0, 252, 236 @@ -145,37 +145,37 @@ FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Calendrier", IDC_GROUPBOX, 5, 7, 242, 74 - LTEXT "Si l'année est saisie sur 2 chiffres, l'afficher en tant qu'année entre:", -1, 13, 18, 225, 8 + LTEXT "Quand une année à deux chiffres est entrée, l'interpréter comme une année comprise entre :", -1, 13, 18, 225, 8 EDITTEXT IDC_FIRSTYEAR_EDIT, 13, 30, 36, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP LTEXT "et", -1, 55, 32, 17, 8 EDITTEXT IDC_SECONDYEAR_EDIT, 77, 30, 36, 12, ES_LEFT | ES_NUMBER | WS_GROUP CONTROL "",IDC_SCR_MAX_YEAR, "msctls_updown32", UDS_NOTHOUSANDS | UDS_WRAP | UDS_SETBUDDYINT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_CHILD | WS_VISIBLE, 113, 30, 10, 12 - LTEXT "Calendrier:", -1, 13, 48, 56, 10 + LTEXT "Calendrier :", -1, 13, 48, 56, 10 COMBOBOX IDC_CALTYPE_COMBO, 77, 46, 161, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SORT | WS_DISABLED - LTEXT "Chronology by Hijra:", -1, 13, 59, 60, 16 + LTEXT "Chronologie d'Hijra :", -1, 13, 59, 60, 16 COMBOBOX IDC_HIJCHRON_COMBO, 77, 64, 161, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SORT | WS_DISABLED - GROUPBOX "Format court", IDC_GROUPBOX, 7, 83, 238, 81 - LTEXT "Exemple:", -1, 13, 95, 63, 10 + GROUPBOX "Date courte", IDC_GROUPBOX, 7, 83, 238, 81 + LTEXT "Exemple de date courte :", -1, 13, 95, 63, 10 EDITTEXT IDC_SHRTDATESAMPLE_EDIT, 77, 93, 161, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT "Exemple - lecture de droite à gauche:", -1, 13, 109, 60, 16 + LTEXT "Exemple de lecture de droite à gauche:", -1, 13, 109, 60, 16 EDITTEXT IDC_SHRTDATERTOL_EDIT, 77, 111, 161, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_DISABLED - LTEXT "Format court:", -1, 13, 131, 60, 10 + LTEXT "Format de date courte :", -1, 13, 131, 60, 10 COMBOBOX IDC_SHRTDATEFMT_COMBO, 77, 129, 161, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Séparateur de date:", -1, 13, 148, 113, 10 + LTEXT "Séparateur de date :", -1, 13, 148, 113, 10 COMBOBOX IDC_SHRTDATESEP_COMBO, 187, 146, 51, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - GROUPBOX "Format long:", IDC_GROUPBOX, 7, 167, 238, 64 - LTEXT "Exemple:", -1, 13, 179, 61, 10 + GROUPBOX "Date longue", IDC_GROUPBOX, 7, 167, 238, 64 + LTEXT "Exemple de date longue :", -1, 13, 179, 61, 10 EDITTEXT IDC_LONGDATESAMPLE_EDIT, 77, 177, 161, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT "Exemple - lecture de gauche à droite:", -1, 13, 193, 61, 16 + LTEXT "Exemple de lecture de gauche à droite:", -1, 13, 193, 61, 16 EDITTEXT IDC_LONGDATERTOL_EDIT, 77, 195, 161, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_DISABLED - LTEXT "Format long:", -1, 13, 215, 60, 10 + LTEXT "Format de date longue :", -1, 13, 215, 60, 10 COMBOBOX IDC_LONGDATEFMT_COMBO, 77, 213, 161, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE END STRINGTABLE BEGIN - IDS_CPLNAME "Langage et options régionales" - IDS_CPLDESCRIPTION "Sélectionner le langage, les formats de nombres, les devises, l'heure et la date." + IDS_CPLNAME "Options régionales et linguistiques" + IDS_CPLDESCRIPTION "Personnaliser les paramètres d'affichage des langues, des nombres, de l'heure et des dates." END Propchange: trunk/reactos/dll/cpl/intl_new/Fr.rc ------------------------------------------------------------------------------ svn:eol-style = native
17 years, 11 months
1
0
0
0
[ion] 25622: - Fix a bug, fix breakage from previous revision.
by ion@svn.reactos.org
Author: ion Date: Wed Jan 24 22:54:51 2007 New Revision: 25622 URL:
http://svn.reactos.org/svn/reactos?rev=25622&view=rev
Log: - Fix a bug, fix breakage from previous revision. Modified: trunk/reactos/lib/rtl/i386/debug_asm.S Modified: trunk/reactos/lib/rtl/i386/debug_asm.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/i386/debug_asm.S?r…
============================================================================== --- trunk/reactos/lib/rtl/i386/debug_asm.S (original) +++ trunk/reactos/lib/rtl/i386/debug_asm.S Wed Jan 24 22:54:51 2007 @@ -51,7 +51,7 @@ mov ecx, [ebp+8] mov edx, [ebp+12] int 0x2D - int 3 + //int 3 /* Restore stack */ pop ebp
17 years, 11 months
1
0
0
0
[ion] 25621: - Fix ExInitPoolLookasidePointers and ExpInitailizeLookasideLists. - Implement DbgLoadImageSymbols, Implement DebugService, and ExpLoadBootSymbols during phase 0 executive init to make KD load the symbols for all the boot drivers, and optionally breakpoint. Not yet useful since we don't have KD. - Detect /BURNMEM and /PERFMEM and go all the way to determining the pages required, but warn the user that we don't support these flags yet. - Detect FLG_KERNEL_STACK_TRACE_DB and FLG_ENABL
by ion@svn.reactos.org
Author: ion Date: Wed Jan 24 22:48:34 2007 New Revision: 25621 URL:
http://svn.reactos.org/svn/reactos?rev=25621&view=rev
Log: - Fix ExInitPoolLookasidePointers and ExpInitailizeLookasideLists. - Implement DbgLoadImageSymbols, Implement DebugService, and ExpLoadBootSymbols during phase 0 executive init to make KD load the symbols for all the boot drivers, and optionally breakpoint. Not yet useful since we don't have KD. - Detect /BURNMEM and /PERFMEM and go all the way to determining the pages required, but warn the user that we don't support these flags yet. - Detect FLG_KERNEL_STACK_TRACE_DB and FLG_ENABLE_EXCEPTION_LOGGING and warn that we don't support these yet. - Add call to Cm to setup system variables, but disable until cm rewrite. - Add PnP Manager initialization call and implement PnP Manager Phase 0 initialization (PiInitPhase0, PpInitializeDeviceReferenceTable), but this isn't used for now. - Move MmInit2 to Phase 1 initialization, and initailize bootvid there as well. - Add/Fix missing definitions, prototypes to NDK/NTIFS. Modified: trunk/reactos/include/ddk/ntifs.h trunk/reactos/include/ndk/kdtypes.h trunk/reactos/include/ndk/rtlfuncs.h trunk/reactos/lib/rtl/debug.c trunk/reactos/lib/rtl/i386/debug_asm.S trunk/reactos/lib/rtl/rtlp.h trunk/reactos/ntoskrnl/ex/init.c trunk/reactos/ntoskrnl/ex/lookas.c trunk/reactos/ntoskrnl/include/internal/io.h trunk/reactos/ntoskrnl/include/internal/kd.h trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c trunk/reactos/ntoskrnl/kd/kdmain.c trunk/reactos/ntoskrnl/ntoskrnl.mc Modified: trunk/reactos/include/ddk/ntifs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntifs.h?rev=25…
============================================================================== --- trunk/reactos/include/ddk/ntifs.h (original) +++ trunk/reactos/include/ddk/ntifs.h Wed Jan 24 22:48:34 2007 @@ -1534,6 +1534,16 @@ PVOID TableContext; } RTL_AVL_TABLE, *PRTL_AVL_TABLE; +NTSYSAPI +VOID +NTAPI +RtlInitializeGenericTableAvl( + PRTL_AVL_TABLE Table, + PRTL_AVL_COMPARE_ROUTINE CompareRoutine, + PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine, + PRTL_AVL_FREE_ROUTINE FreeRoutine, + PVOID TableContext +); #if defined(USE_LPC6432) #define LPC_CLIENT_ID CLIENT_ID64 Modified: trunk/reactos/include/ndk/kdtypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/kdtypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/kdtypes.h (original) +++ trunk/reactos/include/ndk/kdtypes.h Wed Jan 24 22:48:34 2007 @@ -161,4 +161,15 @@ PHANDLE Handles; } SYSDBG_TRIAGE_DUMP, *PSYSDBG_TRIAGE_DUMP; +// +// KD Structures +// +typedef struct _KD_SYMBOLS_INFO +{ + PVOID BaseOfDll; + PVOID ProcessId; + ULONG CheckSum; + ULONG SizeOfImage; +} KD_SYMBOLS_INFO, *PKD_SYMBOLS_INFO; + #endif // _KDTYPES_H Modified: trunk/reactos/include/ndk/rtlfuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtlfuncs.h?rev…
============================================================================== --- trunk/reactos/include/ndk/rtlfuncs.h (original) +++ trunk/reactos/include/ndk/rtlfuncs.h Wed Jan 24 22:48:34 2007 @@ -2502,7 +2502,17 @@ VOID NTAPI -DbgBreakPoint(VOID); +DbgBreakPoint( + VOID +); + +NTSTATUS +NTAPI +DbgLoadImageSymbols( + IN PANSI_STRING Name, + IN PVOID Base, + IN ULONG ProcessId +); // // Generic Table Functions Modified: trunk/reactos/lib/rtl/debug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/debug.c?rev=25621&…
============================================================================== --- trunk/reactos/lib/rtl/debug.c (original) +++ trunk/reactos/lib/rtl/debug.c Wed Jan 24 22:48:34 2007 @@ -315,15 +315,37 @@ } /* - * @unimplemented - */ -NTSTATUS -NTAPI -DbgLoadImageSymbols(IN PUNICODE_STRING Name, - IN ULONG Base, - IN ULONG Unknown3) -{ - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + * @implemented + */ +NTSTATUS +NTAPI +DbgLoadImageSymbols(IN PANSI_STRING Name, + IN PVOID Base, + IN ULONG ProcessId) +{ + PIMAGE_NT_HEADERS NtHeader; + KD_SYMBOLS_INFO SymbolInfo; + + /* Setup the symbol data */ + SymbolInfo.BaseOfDll = Base; + SymbolInfo.ProcessId = UlongToPtr(ProcessId); + + /* Get NT Headers */ + NtHeader = NULL; //RtlImageNtHeader(Base); + if (NtHeader) + { + /* Get the rest of the data */ + SymbolInfo.CheckSum = NtHeader->OptionalHeader.CheckSum; + SymbolInfo.SizeOfImage = NtHeader->OptionalHeader.SizeOfImage; + } + else + { + /* No data available */ + SymbolInfo.CheckSum = SymbolInfo.SizeOfImage = 0; + } + + /* Load the symbols */ + DebugService2(Name, &SymbolInfo, BREAKPOINT_LOAD_SYMBOLS); + return STATUS_SUCCESS; } /* EOF */ Modified: trunk/reactos/lib/rtl/i386/debug_asm.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/i386/debug_asm.S?r…
============================================================================== --- trunk/reactos/lib/rtl/i386/debug_asm.S (original) +++ trunk/reactos/lib/rtl/i386/debug_asm.S Wed Jan 24 22:48:34 2007 @@ -14,6 +14,7 @@ .globl _DbgBreakPointWithStatus@4 .globl _DbgUserBreakPoint@0 .globl _DebugService@20 +.globl _DebugService2@12 .globl _DbgBreakPointNoBugCheck@0 /* FUNCTIONS ***************************************************************/ @@ -36,6 +37,25 @@ mov eax, [esp+4] int 3 ret 4 +.endfunc + +.func DebugService2@12 +_DebugService2@12: + + /* Setup the stack */ + push ebp + mov ebp, esp + + /* Call the interrupt */ + mov eax, [ebp+16] + mov ecx, [ebp+8] + mov edx, [ebp+12] + int 0x2D + int 3 + + /* Restore stack */ + pop ebp + ret 12 .endfunc .func DebugService@20 Modified: trunk/reactos/lib/rtl/rtlp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/rtlp.h?rev=25621&r…
============================================================================== --- trunk/reactos/lib/rtl/rtlp.h (original) +++ trunk/reactos/lib/rtl/rtlp.h Wed Jan 24 22:48:34 2007 @@ -135,6 +135,12 @@ IN PVOID Argument1, IN PVOID Argument2); +NTSTATUS +NTAPI +DebugService2(IN PVOID Argument1, + IN PVOID Argument2, + IN ULONG Service); + /* Tags for the String Allocators */ #define TAG_USTR TAG('U', 'S', 'T', 'R') #define TAG_ASTR TAG('A', 'S', 'T', 'R') Modified: trunk/reactos/ntoskrnl/ex/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=256…
============================================================================== --- trunk/reactos/ntoskrnl/ex/init.c (original) +++ trunk/reactos/ntoskrnl/ex/init.c Wed Jan 24 22:48:34 2007 @@ -82,6 +82,7 @@ &ObjectAttributes); if (!NT_SUCCESS(Status)) { + /* Failed */ KeBugCheckEx(SYMBOLIC_INITIALIZATION_FAILED, Status, 1, 0, 0); } @@ -102,6 +103,7 @@ &ObjectAttributes); if (!NT_SUCCESS(Status)) { + /* Failed */ KeBugCheckEx(SYMBOLIC_INITIALIZATION_FAILED, Status, 2, 0, 0); } @@ -113,6 +115,7 @@ Status = RtlAnsiStringToUnicodeString(&LinkName, &AnsiName, TRUE); if (!NT_SUCCESS(Status)) { + /* Failed */ KeBugCheckEx(SYMBOLIC_INITIALIZATION_FAILED, Status, 3, 0, 0); } @@ -154,6 +157,7 @@ /* Check if creating the link failed */ if (!NT_SUCCESS(Status)) { + /* Failed */ KeBugCheckEx(SYMBOLIC_INITIALIZATION_FAILED, Status, 5, 0, 0); } @@ -669,6 +673,97 @@ VOID NTAPI +ExpLoadBootSymbols(IN PLOADER_PARAMETER_BLOCK LoaderBlock) +{ + ULONG i = 0; + PLIST_ENTRY NextEntry; + ULONG Count, Length; + PWCHAR Name; + PLDR_DATA_TABLE_ENTRY LdrEntry; + BOOLEAN OverFlow = FALSE; + CHAR NameBuffer[256]; + ANSI_STRING SymbolString; + + /* Loop the driver list */ + NextEntry = LoaderBlock->LoadOrderListHead.Flink; + while (NextEntry != &LoaderBlock->LoadOrderListHead) + { + /* Skip the first two images */ + if (i >= 2) + { + /* Get the entry */ + LdrEntry = CONTAINING_RECORD(NextEntry, + LDR_DATA_TABLE_ENTRY, + InLoadOrderLinks); + if (LdrEntry->FullDllName.Buffer[0] == L'\\') + { + /* We have a name, read its data */ + Name = LdrEntry->FullDllName.Buffer; + Length = LdrEntry->FullDllName.Length / sizeof(WCHAR); + + /* Check if our buffer can hold it */ + if (sizeof(NameBuffer) < Length + sizeof(ANSI_NULL)) + { + /* It's too long */ + OverFlow = TRUE; + } + else + { + /* Copy the name */ + for (Count = 0; Count < Length; Count++, Name++) + { + /* Copy the character */ + NameBuffer[Count] = (CHAR)*Name; + } + + /* Null-terminate */ + NameBuffer[Count] = ANSI_NULL; + } + } + else + { + /* This should be a driver, check if it fits */ + if (sizeof(NameBuffer) < + (sizeof("\\System32\\Drivers\\") + + NtSystemRoot.Length / sizeof(WCHAR) - sizeof(UNICODE_NULL) + + LdrEntry->BaseDllName.Length / sizeof(WCHAR) + + sizeof(ANSI_NULL))) + { + /* Buffer too small */ + OverFlow = TRUE; + } + else + { + /* Otherwise build the name. HACKED for GCC :( */ + sprintf(NameBuffer, + "%c\\System32\\Drivers\\%S", + SharedUserData->NtSystemRoot[2], + LdrEntry->BaseDllName.Buffer); + } + } + + /* Check if the buffer was ok */ + if (!OverFlow) + { + /* Initialize the ANSI_STRING for the debugger */ + RtlInitString(&SymbolString, NameBuffer); + + /* Load the symbols */ + DbgLoadImageSymbols(&SymbolString, LdrEntry->DllBase, -1); + } + } + + /* Go to the next entry */ + i++; + NextEntry = NextEntry->Flink; + } + + /* Check if we should break after symbol load */ + if (KdBreakAfterSymbolLoad) DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C); +} + +VOID +NTAPI ExpInitializeExecutive(IN ULONG Cpu, IN PLOADER_PARAMETER_BLOCK LoaderBlock) { @@ -676,6 +771,8 @@ CHAR Buffer[256]; ANSI_STRING AnsiPath; NTSTATUS Status; + PCHAR CommandLine, PerfMem; + ULONG PerfMemUsed; /* Validate Loader */ if (!ExpIsLoaderValid(LoaderBlock)) @@ -728,6 +825,50 @@ /* Set phase to 0 */ ExpInitializationPhase = 0; + + /* Get boot command line */ + CommandLine = LoaderBlock->LoadOptions; + if (CommandLine) + { + /* Upcase it for comparison and check if we're in performance mode */ + _strupr(CommandLine); + PerfMem = strstr(CommandLine, "PERFMEM"); + if (PerfMem) + { + /* Check if the user gave a number of bytes to use */ + PerfMem = strstr(PerfMem, "="); + if (PerfMem) + { + /* Read the number of pages we'll use */ + PerfMemUsed = atol(PerfMem + 1) * (1024 * 1024 / PAGE_SIZE); + if (PerfMem) + { + /* FIXME: TODO */ + DPRINT1("BBT performance mode not yet supported." + "/PERFMEM option ignored.\n"); + } + } + } + + /* Check if we're burning memory */ + PerfMem = strstr(CommandLine, "BURNMEMORY"); + if (PerfMem) + { + /* Check if the user gave a number of bytes to use */ + PerfMem = strstr(PerfMem, "="); + if (PerfMem) + { + /* Read the number of pages we'll use */ + PerfMemUsed = atol(PerfMem + 1) * (1024 * 1024 / PAGE_SIZE); + if (PerfMem) + { + /* FIXME: TODO */ + DPRINT1("Burnable memory support not yet present." + "/BURNMEM option ignored.\n"); + } + } + } + } /* Setup NLS Base and offsets */ NlsData = LoaderBlock->NlsData; @@ -786,11 +927,14 @@ /* Setup bugcheck messages */ KiInitializeBugCheck(); + /* Setup initial system settings (FIXME: Needs Cm Rewrite) */ + //CmGetSystemControlValues(CommandLine, &CmControlVector); + /* Initialize the executive at phase 0 */ if (!ExInitSystem()) KEBUGCHECK(PHASE0_INITIALIZATION_FAILED); - /* Break into the Debugger if requested */ - if (KdPollBreakIn()) DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C); + /* Load boot symbols */ + ExpLoadBootSymbols(LoaderBlock); /* Set system ranges */ SharedUserData->Reserved1 = (ULONG_PTR)MmHighestUserAddress; @@ -798,6 +942,22 @@ /* Make a copy of the NLS Tables */ ExpInitNls(LoaderBlock); + + /* Check if the user wants a kernel stack trace database */ + if (NtGlobalFlag & FLG_KERNEL_STACK_TRACE_DB) + { + /* FIXME: TODO */ + DPRINT1("Kernel-mode stack trace support not yet present." + "FLG_KERNEL_STACK_TRACE_DB flag ignored.\n"); + } + + /* Check if he wanted exception logging */ + if (NtGlobalFlag & FLG_ENABLE_EXCEPTION_LOGGING) + { + /* FIXME: TODO */ + DPRINT1("Kernel-mode exception logging support not yet present." + "FLG_ENABLE_EXCEPTION_LOGGING flag ignored.\n"); + } /* Initialize the Handle Table */ ExpInitializeHandleTables(); @@ -827,14 +987,11 @@ /* Load basic Security for other Managers */ if (!SeInit()) KEBUGCHECK(SECURITY_INITIALIZATION_FAILED); - /* Set up Region Maps, Sections and the Paging File */ - MmInit2(); - - /* Initialize the boot video. */ - InbvDisplayInitialize(); - /* Initialize the Process Manager */ if (!PsInitSystem()) KEBUGCHECK(PROCESS_INITIALIZATION_FAILED); + + /* Initialize the PnP Manager */ + if (!PpInitSystem()) KEBUGCHECK(PP0_INITIALIZATION_FAILED); /* Initialize the User-Mode Debugging Subsystem */ DbgkInitialize(); @@ -883,12 +1040,16 @@ if (strstr(KeLoaderBlock->LoadOptions, "NOGUIBOOT")) NoGuiBoot = TRUE; /* Display the boot screen image if not disabled */ + InbvDisplayInitialize(); if (!ExpInTextModeSetup) InbvDisplayInitialize2(NoGuiBoot); if (!NoGuiBoot) InbvDisplayBootLogo(); /* Clear the screen to blue and display the boot notice and debug status */ if (NoGuiBoot) ExpDisplayNotice(); KdInitSystem(2, KeLoaderBlock); + + /* Set up Region Maps, Sections and the Paging File */ + MmInit2(); /* Initialize Power Subsystem in Phase 0 */ PoInit(0, AcpiTableDetected); Modified: trunk/reactos/ntoskrnl/ex/lookas.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/lookas.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/ex/lookas.c (original) +++ trunk/reactos/ntoskrnl/ex/lookas.c Wed Jan 24 22:48:34 2007 @@ -24,8 +24,8 @@ KSPIN_LOCK ExpPagedLookasideListLock; LIST_ENTRY ExSystemLookasideListHead; LIST_ENTRY ExPoolLookasideListHead; -NPAGED_LOOKASIDE_LIST ExpSmallNPagedPoolLookasideLists[MAXIMUM_PROCESSORS]; -PAGED_LOOKASIDE_LIST ExpSmallPagedPoolLookasideLists[MAXIMUM_PROCESSORS]; +GENERAL_LOOKASIDE ExpSmallNPagedPoolLookasideLists[MAXIMUM_PROCESSORS]; +GENERAL_LOOKASIDE ExpSmallPagedPoolLookasideLists[MAXIMUM_PROCESSORS]; /* PRIVATE FUNCTIONS *********************************************************/ @@ -63,30 +63,27 @@ ExInitPoolLookasidePointers(VOID) { ULONG i; - PPP_LOOKASIDE_LIST Entry; - PNPAGED_LOOKASIDE_LIST ListEntry; - PPAGED_LOOKASIDE_LIST PagedListEntry; - - /* Loop for all CPUs */ + PKPRCB Prcb = KeGetCurrentPrcb(); + PGENERAL_LOOKASIDE Entry; + + /* Loop for all pool lists */ for (i = 0; i < MAXIMUM_PROCESSORS; i++) { /* Initialize the non-paged list */ - ListEntry = &ExpSmallNPagedPoolLookasideLists[i]; - InitializeSListHead(&ListEntry->L.ListHead); + Entry = &ExpSmallNPagedPoolLookasideLists[i]; + InitializeSListHead(&Entry->ListHead); /* Bind to PRCB */ - Entry = &KeGetCurrentPrcb()->PPPagedLookasideList[i]; - Entry->L = &ListEntry->L; - Entry->P = &ListEntry->L; + Prcb->PPNPagedLookasideList[i].P = Entry; + Prcb->PPNPagedLookasideList[i].L = Entry; /* Initialize the paged list */ - PagedListEntry = &ExpSmallPagedPoolLookasideLists[i]; - InitializeSListHead(&PagedListEntry->L.ListHead); + Entry = &ExpSmallPagedPoolLookasideLists[i]; + InitializeSListHead(&Entry->ListHead); /* Bind to PRCB */ - Entry = &KeGetCurrentPrcb()->PPNPagedLookasideList[i]; - Entry->L = &PagedListEntry->L; - Entry->P = &PagedListEntry->L; + Prcb->PPPagedLookasideList[i].P = Entry; + Prcb->PPPagedLookasideList[i].L = Entry; } } @@ -94,7 +91,7 @@ NTAPI ExpInitLookasideLists() { - ULONG i, j; + ULONG i; /* Initialize locks and lists */ InitializeListHead(&ExpNonPagedLookasideListHead); @@ -105,20 +102,20 @@ KeInitializeSpinLock(&ExpPagedLookasideListLock); /* Initialize the system lookaside lists */ - for (i = 0, j = 1; i < (MAXIMUM_PROCESSORS - 1); j++, i++) + for (i = 0; i < MAXIMUM_PROCESSORS; i++) { /* Initialize the non-paged list */ - ExInitializeSystemLookasideList(&ExpSmallNPagedPoolLookasideLists[i].L, + ExInitializeSystemLookasideList(&ExpSmallNPagedPoolLookasideLists[i], NonPagedPool, - j * 8, + (i + 1) * 8, TAG('P', 'o', 'o', 'l'), 256, &ExPoolLookasideListHead); /* Initialize the paged list */ - ExInitializeSystemLookasideList(&ExpSmallPagedPoolLookasideLists[i].L, + ExInitializeSystemLookasideList(&ExpSmallPagedPoolLookasideLists[i], PagedPool, - j * 8, + (i + 1) * 8, TAG('P', 'o', 'o', 'l'), 256, &ExPoolLookasideListHead); Modified: trunk/reactos/ntoskrnl/include/internal/io.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/io.h (original) +++ trunk/reactos/ntoskrnl/include/internal/io.h Wed Jan 24 22:48:34 2007 @@ -441,6 +441,12 @@ VOID ); +BOOLEAN +NTAPI +PpInitSystem( + VOID +); + VOID PnpInit2( VOID Modified: trunk/reactos/ntoskrnl/include/internal/kd.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/kd.h (original) +++ trunk/reactos/ntoskrnl/include/internal/kd.h Wed Jan 24 22:48:34 2007 @@ -15,6 +15,7 @@ extern KD_PORT_INFORMATION GdbPortInfo; extern BOOLEAN _KdDebuggerEnabled; extern BOOLEAN _KdDebuggerNotPresent; +extern BOOLEAN KdBreakAfterSymbolLoad; BOOLEAN NTAPI Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
============================================================================== --- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c (original) +++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c Wed Jan 24 22:48:34 2007 @@ -19,6 +19,11 @@ PDEVICE_NODE IopRootDeviceNode; KSPIN_LOCK IopDeviceTreeLock; +ERESOURCE PpRegistryDeviceResource; +KGUARDED_MUTEX PpDeviceReferenceTableLock; +RTL_AVL_TABLE PpDeviceReferenceTable; + +extern ULONG ExpInitializationPhase; /* DATA **********************************************************************/ @@ -3317,5 +3322,90 @@ } } +RTL_GENERIC_COMPARE_RESULTS +NTAPI +PiCompareInstancePath(IN PRTL_AVL_TABLE Table, + IN PVOID FirstStruct, + IN PVOID SecondStruct) +{ + /* FIXME: TODO */ + KEBUGCHECK(0); + return 0; +} + +// +// The allocation function is called by the generic table package whenever +// it needs to allocate memory for the table. +// + +PVOID +NTAPI +PiAllocateGenericTableEntry(IN PRTL_AVL_TABLE Table, + IN CLONG ByteSize) +{ + /* FIXME: TODO */ + KEBUGCHECK(0); + return NULL; +} + +VOID +NTAPI +PiFreeGenericTableEntry(IN PRTL_AVL_TABLE Table, + IN PVOID Buffer) +{ + /* FIXME: TODO */ + KEBUGCHECK(0); +} + +VOID +NTAPI +PpInitializeDeviceReferenceTable(VOID) +{ + /* Setup the guarded mutex and AVL table */ + KeInitializeGuardedMutex(&PpDeviceReferenceTableLock); + RtlInitializeGenericTableAvl(&PpDeviceReferenceTable, + PiCompareInstancePath, + PiAllocateGenericTableEntry, + PiFreeGenericTableEntry, + NULL); +} + +BOOLEAN +NTAPI +PiInitPhase0(VOID) +{ + /* Initialize the resource when accessing device registry data */ + ExInitializeResourceLite(&PpRegistryDeviceResource); + + /* Setup the device reference AVL table */ + PpInitializeDeviceReferenceTable(); + return TRUE; +} + +BOOLEAN +NTAPI +PpInitSystem(VOID) +{ + /* Check the initialization phase */ + switch (ExpInitializationPhase) + { + case 0: + + /* Do Phase 0 */ + return PiInitPhase0(); + + case 1: + + /* Do Phase 1 */ + return FALSE; + //return PiInitPhase1(); + + default: + + /* Don't know any other phase! Bugcheck! */ + KeBugCheck(UNEXPECTED_INITIALIZATION_CALL); + return FALSE; + } +} /* EOF */ Modified: trunk/reactos/ntoskrnl/kd/kdmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd/kdmain.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/kd/kdmain.c (original) +++ trunk/reactos/ntoskrnl/kd/kdmain.c Wed Jan 24 22:48:34 2007 @@ -17,6 +17,7 @@ BOOLEAN KdEnteredDebugger = FALSE; BOOLEAN KdDebuggerNotPresent = TRUE; BOOLEAN KiEnableTimerWatchdog = FALSE; +BOOLEAN KdBreakAfterSymbolLoad = FALSE; ULONG KiBugCheckData; BOOLEAN KdpBreakPending; VOID STDCALL PspDumpThreads(BOOLEAN SystemThreads); Modified: trunk/reactos/ntoskrnl/ntoskrnl.mc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.mc?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/ntoskrnl.mc (original) +++ trunk/reactos/ntoskrnl/ntoskrnl.mc Wed Jan 24 22:48:34 2007 @@ -1081,6 +1081,14 @@ SPIN_LOCK_INIT_FAILURE . +MessageId=0x8F +Severity=Success +Facility=System +SymbolicName=PP0_INITIALIZATION_FAILED +Language=English +PP0_INITIALIZATION_FAILED +. + MessageId=0x94 Severity=Success Facility=System
17 years, 11 months
1
0
0
0
[hyperion] 25620: * __cpuid, __rdtsc, __readmsr, __readpmc, __writemsr, __wbinvd, __readcr0, __readcr2, __readcr3, __readcr4: show me a fan of the extended inline asm syntax and I'll show you a SPARKLING FIST OF BURNING RAGE. Sprinkled __volatile__ liberally because there is no way to say "has side effects" OR "delete if outputs are ignored", only BOTH or NEITHER. This breaks Visual C++ compatibility ever so subtly. Tread carefully. THANK YOU GCC TEAM for keeping things interesting! * __writemsr
by hyperion@svn.reactos.org
Author: hyperion Date: Wed Jan 24 22:07:19 2007 New Revision: 25620 URL:
http://svn.reactos.org/svn/reactos?rev=25620&view=rev
Log: * __cpuid, __rdtsc, __readmsr, __readpmc, __writemsr, __wbinvd, __readcr0, __readcr2, __readcr3, __readcr4: show me a fan of the extended inline asm syntax and I'll show you a SPARKLING FIST OF BURNING RAGE. Sprinkled __volatile__ liberally because there is no way to say "has side effects" OR "delete if outputs are ignored", only BOTH or NEITHER. This breaks Visual C++ compatibility ever so subtly. Tread carefully. THANK YOU GCC TEAM for keeping things interesting! * __writemsr: pass 64-bit value with "A" constraint * __writecr0, __writecr3, __writecr4: "memory" clobber becase Visual C++ does, too Modified: trunk/reactos/include/psdk/intrin.h Modified: trunk/reactos/include/psdk/intrin.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/intrin.h?rev=…
============================================================================== --- trunk/reactos/include/psdk/intrin.h (original) +++ trunk/reactos/include/psdk/intrin.h Wed Jan 24 22:07:19 2007 @@ -833,13 +833,13 @@ /*** System information ***/ static __inline__ __attribute__((always_inline)) void __cpuid(int CPUInfo[], const int InfoType) { - __asm__("cpuid" : "=a" (CPUInfo[0]), "=b" (CPUInfo[1]), "=c" (CPUInfo[2]), "=d" (CPUInfo[3]) : "a" (InfoType)); + __asm__ __volatile__("cpuid" : "=a" (CPUInfo[0]), "=b" (CPUInfo[1]), "=c" (CPUInfo[2]), "=d" (CPUInfo[3]) : "a" (InfoType)); } static __inline__ __attribute__((always_inline)) unsigned long long __rdtsc(void) { unsigned long long retval; - __asm__("rdtsc" : "=A" (retval)); + __asm__ __volatile__("rdtsc" : "=A"(retval)); return retval; } @@ -870,44 +870,44 @@ static __inline__ __attribute__((always_inline)) unsigned long __readcr0(void) { unsigned long value; - __asm__("mov %%cr0, %[value]" : [value] "=q" (value)); + __asm__ __volatile__("mov %%cr0, %[value]" : [value] "=q" (value)); return value; } static __inline__ __attribute__((always_inline)) unsigned long __readcr2(void) { unsigned long value; - __asm__("mov %%cr2, %[value]" : [value] "=q" (value)); + __asm__ __volatile__("mov %%cr2, %[value]" : [value] "=q" (value)); return value; } static __inline__ __attribute__((always_inline)) unsigned long __readcr3(void) { unsigned long value; - __asm__("mov %%cr3, %[value]" : [value] "=q" (value)); + __asm__ __volatile__("mov %%cr3, %[value]" : [value] "=q" (value)); return value; } static __inline__ __attribute__((always_inline)) unsigned long __readcr4(void) { unsigned long value; - __asm__("mov %%cr4, %[value]" : [value] "=q" (value)); + __asm__ __volatile__("mov %%cr4, %[value]" : [value] "=q" (value)); return value; } static __inline__ __attribute__((always_inline)) void __writecr0(const unsigned long long Data) { - __asm__("mov %[Data], %%cr0" : : [Data] "q" ((const unsigned long)(Data & 0xFFFFFFFF))); + __asm__("mov %[Data], %%cr0" : : [Data] "q" ((const unsigned long)(Data & 0xFFFFFFFF)) : "memory"); } static __inline__ __attribute__((always_inline)) void __writecr3(const unsigned long long Data) { - __asm__("mov %[Data], %%cr3" : : [Data] "q" ((const unsigned long)(Data & 0xFFFFFFFF))); + __asm__("mov %[Data], %%cr3" : : [Data] "q" ((const unsigned long)(Data & 0xFFFFFFFF)) : "memory"); } static __inline__ __attribute__((always_inline)) void __writecr4(const unsigned long long Data) { - __asm__("mov %[Data], %%cr4" : : [Data] "q" ((const unsigned long)(Data & 0xFFFFFFFF))); + __asm__("mov %[Data], %%cr4" : : [Data] "q" ((const unsigned long)(Data & 0xFFFFFFFF)) : "memory"); } static __inline__ __attribute__((always_inline)) void __invlpg(void * const Address) @@ -920,26 +920,19 @@ static __inline__ __attribute__((always_inline)) unsigned long long __readmsr(const int reg) { unsigned long long retval; - __asm__("rdmsr" : "=A" (retval) : "c" (reg)); + __asm__ __volatile__("rdmsr" : "=A" (retval) : "c" (reg)); return retval; } static __inline__ __attribute__((always_inline)) void __writemsr(const unsigned long Register, const unsigned long long Value) { - __asm__ - ( - "wrmsr" : - : - "a" ((unsigned long)((Value >> 0) & 0xFFFFFFFF)), - "d" ((unsigned long)((Value >> 32) & 0xFFFFFFFF)), - "c" (Register) - ); + __asm__ __volatile__("wrmsr" : : "A" (Value), "c" (Register)); } static __inline__ __attribute__((always_inline)) unsigned long long __readpmc(const int counter) { unsigned long long retval; - __asm__("rdpmc" : "=A" (retval) : "c" (counter)); + __asm__ __volatile__("rdpmc" : "=A" (retval) : "c" (counter)); return retval; } @@ -953,7 +946,7 @@ static __inline__ __attribute__((always_inline)) void __wbinvd(void) { - __asm__("wbinvd"); + __asm__ __volatile__("wbinvd"); } #else
17 years, 11 months
1
0
0
0
[hyperion] 25619: * __ll_lshift, __ll_rshift, __ull_rshift: fixed handling of 64-bit arguments and return values by forcing them to be passed as EDX:EAX. Finally generates decent code * updated comments to reflect current state of the code
by hyperion@svn.reactos.org
Author: hyperion Date: Wed Jan 24 21:01:34 2007 New Revision: 25619 URL:
http://svn.reactos.org/svn/reactos?rev=25619&view=rev
Log: * __ll_lshift, __ll_rshift, __ull_rshift: fixed handling of 64-bit arguments and return values by forcing them to be passed as EDX:EAX. Finally generates decent code * updated comments to reflect current state of the code Modified: trunk/reactos/include/psdk/intrin.h Modified: trunk/reactos/include/psdk/intrin.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/intrin.h?rev=…
============================================================================== --- trunk/reactos/include/psdk/intrin.h (original) +++ trunk/reactos/include/psdk/intrin.h Wed Jan 24 21:01:34 2007 @@ -38,9 +38,6 @@ implementation - e.g. __stosX; on the other hand, some memory barriers that *are* present could have been missed */ -/* - FIXME: atomic intrinsics haven't been tested yet -*/ /* NOTE: this is a *compatibility* header. Some functions may look wrong at @@ -72,10 +69,6 @@ would use in the same case */ -/* - BUGBUG: 'long long' arguments and returns mess up GCC royally. There has to - be something we can do about them -*/ #ifdef __i386__ /*** Stack frame juggling ***/ @@ -685,91 +678,53 @@ return retval; } -static __inline__ __attribute__((always_inline)) unsigned long long __ll_lshift(const unsigned long long Mask, int Bit) -{ - unsigned long lo32 = (unsigned long)((Mask >> 0) & 0xFFFFFFFF); - unsigned long hi32 = (unsigned long)((Mask >> 32) & 0xFFFFFFFF); +/* + NOTE: in __ll_lshift, __ll_rshift and __ull_rshift we use the "A" + constraint (edx:eax) for the Mask argument, because it's the only way GCC + can pass 64-bit operands around - passing the two 32 bit parts separately + just confuses it. Also we declare Bit as an int and then truncate it to + match Visual C++ behavior +*/ +static __inline__ __attribute__((always_inline)) unsigned long long __ll_lshift(const unsigned long long Mask, const int Bit) +{ + unsigned long long retval = Mask; __asm__ ( - "shldl %b[Bit], %k[Lo32], %k[Hi32]; sall %b[Bit], %k[Lo32]" : - [Lo32] "=q" (lo32), [Hi32] "=qm" (hi32): - "[Lo32]" (lo32), "[Hi32]" (hi32), [Bit] "Ic" (Bit) - ); - - { - union u_ - { - unsigned long long ull; - struct s_ - { - unsigned long lo32; - unsigned long hi32; - } - s; - } - u = { s : { lo32 : lo32, hi32 : hi32 } }; - - return u.ull; - } + "shldl %b[Bit], %%eax, %%edx; sall %b[Bit], %%eax" : + "+A" (retval) : + [Bit] "Nc" ((unsigned char)((unsigned long)Bit) & 0xFF) + ); + + return retval; } static __inline__ __attribute__((always_inline)) long long __ll_rshift(const long long Mask, const int Bit) { - unsigned long lo32 = (unsigned long)((Mask >> 0) & 0xFFFFFFFF); - long hi32 = (unsigned long)((Mask >> 32) & 0xFFFFFFFF); + unsigned long long retval = Mask; __asm__ ( - "shrdl %b[Bit], %k[Lo32], %k[Hi32]; sarl %b[Bit], %k[Lo32]" : - [Lo32] "=q" (lo32), [Hi32] "=qm" (hi32): - "[Lo32]" (lo32), "[Hi32]" (hi32), [Bit] "Ic" (Bit) - ); - - { - union u_ - { - long long ll; - struct s_ - { - unsigned long lo32; - long hi32; - } - s; - } - u = { s : { lo32 : lo32, hi32 : hi32 } }; - - return u.ll; - } + "shldl %b[Bit], %%eax, %%edx; sarl %b[Bit], %%eax" : + "+A" (retval) : + [Bit] "Nc" ((unsigned char)((unsigned long)Bit) & 0xFF) + ); + + return retval; } static __inline__ __attribute__((always_inline)) unsigned long long __ull_rshift(const unsigned long long Mask, int Bit) { - unsigned long lo32 = (unsigned long)((Mask >> 0) & 0xFFFFFFFF); - unsigned long hi32 = (unsigned long)((Mask >> 32) & 0xFFFFFFFF); + unsigned long long retval = Mask; __asm__ ( - "shrdl %b[Bit], %k[Hi32], %k[Lo32]; shrl %b[Bit], %k[Hi32]" : - [Lo32] "=qm" (lo32), [Hi32] "=q" (hi32): - "[Lo32]" (lo32), "[Hi32]" (hi32), [Bit] "Ic" (Bit) - ); - - { - union u_ - { - unsigned long long ull; - struct s_ - { - unsigned long lo32; - unsigned long hi32; - } - s; - } - u = { s : { lo32 : lo32, hi32 : hi32 } }; - - return u.ull; - } + "shrdl %b[Bit], %%eax, %%edx; shrl %b[Bit], %%eax" : + "+A" (retval) : + [Bit] "Nc" ((unsigned char)((unsigned long)Bit) & 0xFF) + ); + + return retval; }
17 years, 11 months
1
0
0
0
[spetreolle] 25618: add french resources fix typos
by spetreolle@svn.reactos.org
Author: spetreolle Date: Wed Jan 24 20:45:26 2007 New Revision: 25618 URL:
http://svn.reactos.org/svn/reactos?rev=25618&view=rev
Log: add french resources fix typos Added: trunk/reactos/dll/cpl/intl_new/Fr.rc Modified: trunk/reactos/dll/cpl/intl_new/En.rc trunk/reactos/dll/cpl/intl_new/intl.rc Modified: trunk/reactos/dll/cpl/intl_new/En.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl_new/En.rc?rev…
============================================================================== --- trunk/reactos/dll/cpl/intl_new/En.rc (original) +++ trunk/reactos/dll/cpl/intl_new/En.rc Wed Jan 24 20:45:26 2007 @@ -50,7 +50,7 @@ GROUPBOX "Text input languages and services", IDC_GROUPBOX, 5, 3, 242, 52 LTEXT "To view or change language or text input methods press ""Detail...""", -1, 12, 13, 230, 18 PUSHBUTTON "De&tail...", IDC_DETAIL_BUTTON, 186, 34, 54, 14 - GROUPBOX "Additionary language support", IDC_GROUPBOX, 5, 60, 242, 82 + GROUPBOX "Additional language support", IDC_GROUPBOX, 5, 60, 242, 82 /* TODO: add other components*/ END @@ -74,7 +74,7 @@ COMBOBOX IDC_NUMFRACSYBMS_COMBO, 147, 75, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE LTEXT "Field separator:", -1, 18, 93, 126, 9 COMBOBOX IDC_NUMFIELDSEP_COMBO, 147, 91, 100, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "Number of digidts in field:", -1, 18, 109, 126, 9 + LTEXT "Number of digits in field:", -1, 18, 109, 126, 9 COMBOBOX IDC_NUMDIGFIELD_COMBO, 147, 107, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE LTEXT "Negative number sign:", -1, 18, 125, 126, 9 COMBOBOX IDC_NUMNEGSIGN_COMBO, 147, 123, 100, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE @@ -114,7 +114,7 @@ COMBOBOX IDC_FRACSYMBSNUM_COMBO, 148, 136, 90, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE | CBS_SORT LTEXT "Field separator:", -1, 20, 166, 126, 9 COMBOBOX IDC_FIELDSEP_COMBO, 148, 164, 90, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE | CBS_SORT - LTEXT "Number of digidts in field:", -1, 20, 183, 126, 9 + LTEXT "Number of digits in field:", -1, 20, 183, 126, 9 COMBOBOX IDC_DIGINFIELDNUM_COMBO, 148, 181, 90, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE END Added: trunk/reactos/dll/cpl/intl_new/Fr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl_new/Fr.rc?rev…
============================================================================== --- trunk/reactos/dll/cpl/intl_new/Fr.rc (added) +++ trunk/reactos/dll/cpl/intl_new/Fr.rc Wed Jan 24 20:45:26 2007 @@ -1,0 +1,181 @@ +LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL + +IDD_REGOPTSPAGE DIALOGEX 0, 0, 252, 236 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Options régionales" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Options régionales et standards", IDC_GROUPBOX, 5, 3, 242, 165 + LTEXT "Cette option influence la façon d'affichage par les programmes des nombres, des devises, des dates et de l'heure.", IDC_STATIC, 14, 15, 230, 16 + LTEXT "&Choisir un élément de la liste ou presser le bouton ""Pa&ramétrer"" pour modifier séparément les formats:", IDC_STATIC, 14, 36, 230, 16 + COMBOBOX IDC_SETREG_COMBO, 14, 54, 168, 120, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | + WS_VSCROLL | WS_TABSTOP | CBS_SORT + PUSHBUTTON "Pa&ramétrer...", IDC_SETUP_BUTTON, 187, 54, 52, 13 + LTEXT "Exemples", IDC_STATIC, 14, 73, 70, 10 + LTEXT "Nombre:", IDC_STATIC, 16, 86, 48, 10 + LTEXT "Monétaire:", IDC_STATIC, 16, 101, 48, 10 + LTEXT "Heure:", IDC_STATIC, 16, 116, 48, 10 + LTEXT "Date courte:", IDC_STATIC, 16, 131, 48, 10 + LTEXT "Date longue:", IDC_STATIC, 16, 146, 48, 10 + EDITTEXT IDC_NUMSAMPLE_EDIT, 69, 86, 170, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + EDITTEXT IDC_MONEYSAMPLE_EDIT, 69, 101, 170, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + EDITTEXT IDC_TIMESAMPLE_EDIT, 69, 116, 170, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + EDITTEXT IDC_SHORTTIMESAMPLE_EDIT, 69, 131, 170, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + EDITTEXT IDC_FULLTIMESAMPLE_EDIT, 69, 146, 170, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + GROUPBOX "Position géographique", IDC_GROUPBOX, 5, 172, 242, 56 + LTEXT "Sélectionner votre position géographique pour les services tels que les infos locales ou la météo" , IDC_STATIC, 14, 184, 225, 24 + COMBOBOX IDC_LOCATION_COMBO, 14, 211, 225, 40, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | + WS_VSCROLL | WS_TABSTOP | CBS_SORT +END + +IDD_EXTRAOPTSPAGE DIALOGEX 0, 0, 252, 236 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Extra" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Program language that not unicode supported", IDC_GROUPBOX, 5, 5, 242, 90 + COMBOBOX IDC_LANGUAGE_COMBO, 14, 75, 225, 60, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | + WS_VSCROLL | WS_TABSTOP | CBS_SORT + LTEXT "This option...", IDC_STATIC, 14, 18, 223, 33 + LTEXT "Sélectionner la langue...", IDC_STATIC, 14, 55, 223, 18 + GROUPBOX "Transformation tables codepages", IDC_GROUPBOX, 5, 101, 242, 88 + /* TODO: add other components*/ +END + +IDD_LANGSOPTSPAGE DIALOGEX 0, 0, 252, 236 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Langues" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Langue de saisie du texte et services", IDC_GROUPBOX, 5, 3, 242, 52 + LTEXT "Pour voir ou modifier les langues et les méthodes de saisie de texte, cliquer sur ""Détail...""", -1, 12, 13, 230, 18 + PUSHBUTTON "Dé&tail...", IDC_DETAIL_BUTTON, 186, 34, 54, 14 + GROUPBOX "Support de langages additionnels", IDC_GROUPBOX, 5, 60, 242, 82 + /* TODO: add other components*/ +END + +IDD_NUMSOPTSSETUP DIALOGEX 0, 0, 252, 236 +STYLE DS_FIXEDSYS | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Nombres" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Exemples", IDC_GROUPBOX, 5, 7, 242, 48 + LTEXT "Positif:", -1, 11, 20, 28, 10 + EDITTEXT IDC_NUM_EDIT, 42, 18, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Négatif:", -1, 128, 20, 31, 10 + EDITTEXT IDC_NEGNUM_EDIT, 162, 18, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Positif:", -1, 11, 38, 28, 10 + EDITTEXT IDC_NUM1_EDIT, 42, 36, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Négatif:", -1, 128, 38, 31, 10 + EDITTEXT IDC_NEGNUM1_EDIT, 162, 36, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Séparateur décimal:", -1, 18, 61, 126, 9 + COMBOBOX IDC_NUMDECIMALSEP_COMBO, 147, 59, 100, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Nombre de chiffres décimaux:", -1, 18, 77, 126, 9 + COMBOBOX IDC_NUMFRACSYBMS_COMBO, 147, 75, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Séparateur de champ:", -1, 18, 93, 126, 9 + COMBOBOX IDC_NUMFIELDSEP_COMBO, 147, 91, 100, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Nombre de chiffres dans le champ:", -1, 18, 109, 126, 9 + COMBOBOX IDC_NUMDIGFIELD_COMBO, 147, 107, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Signe de nombre négatif:", -1, 18, 125, 126, 9 + COMBOBOX IDC_NUMNEGSIGN_COMBO, 147, 123, 100, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Format des nombres négatifs:", -1, 18, 141, 126, 9 + COMBOBOX IDC_NUMNEGFMT_COMBO, 147, 139, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Zéros d'en-tête:", -1, 18, 157, 126, 9 + COMBOBOX IDC_NUMLEADZERO_COMBO, 147, 155, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Séparateur d'éléments de liste :", -1, 18, 173, 126, 9 + COMBOBOX IDC_NUMELEMLISTSEP_COMBO, 147, 171, 100, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Unité de mesure:", -1, 18, 189, 126, 9 + COMBOBOX IDC_NUMUNITSSYS_COMBO, 147, 187, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Region corresponding digits:", -1, 18, 205, 126, 9 + COMBOBOX IDC_NUMREGDIG_COMBO, 147, 203, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Digit replacement:", -1, 18, 221, 126, 9 + COMBOBOX IDC_NUMDIGREPL_COMBO, 147, 219, 100, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE +END + +IDD_CURRENCYOPTSSETUP DIALOGEX 0, 0, 252, 236 +STYLE DS_FIXEDSYS | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Monnaie" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Exemples", IDC_GROUPBOX, 5, 7, 242, 40 + LTEXT "Positif:", -1, 10, 25, 30, 10 + EDITTEXT IDC_CURRENCY_EDIT, 42, 23, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Négatif:", -1, 128, 25, 31, 10 + EDITTEXT IDC_NEGCURRENCY_EDIT, 162, 23, 80, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Symbole monétaire:", -1, 20, 61, 126, 9 + COMBOBOX IDC_CURRENCYUNIT_COMBO, 148, 59, 90, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE | CBS_SORT + LTEXT "Monnaie au format négatif:", -1, 20, 78, 126, 9 + COMBOBOX IDC_POSCURRENCYSUM_COMBO, 148, 76, 90, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Monnaie au format positif:", -1, 20, 95, 126, 9 + COMBOBOX IDC_NEGCURRENCYSUM_COMBO, 148, 93, 90, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Séparateur décimal:", -1, 20, 121, 126, 9 + COMBOBOX IDC_WHOLEFRACTSEP_COMBO, 148, 119, 90, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE | CBS_SORT + LTEXT "Nombre de chiffres décimaux:", -1, 20, 137, 126, 9 + COMBOBOX IDC_FRACSYMBSNUM_COMBO, 148, 136, 90, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE | CBS_SORT + LTEXT "Séparateur de champ:", -1, 20, 166, 126, 9 + COMBOBOX IDC_FIELDSEP_COMBO, 148, 164, 90, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE | CBS_SORT + LTEXT "Nombre de chiffres dans le champ:", -1, 20, 183, 126, 9 + COMBOBOX IDC_DIGINFIELDNUM_COMBO, 148, 181, 90, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE +END + +IDD_TIMEOPTSSETUP DIALOGEX 0, 0, 252, 236 +STYLE DS_FIXEDSYS | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Heure" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Exemples", IDC_GROUPBOX, 5, 7, 242, 33 + LTEXT "Exemple:", -1, 13, 21, 52, 10 + EDITTEXT IDC_TIME_EDIT, 68, 19, 84, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + EDITTEXT IDC_UNKNOWN_EDIT, 156, 19, 84, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Format de l'heure:", -1, 10, 52, 147, 10 + COMBOBOX IDC_TIMEFMT_COMBO, 161, 50, 84, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Séparateur horaire:", -1, 10, 69, 147, 10 + COMBOBOX IDC_TIMESEP_COMBO, 161, 67, 84, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Heure avant midi (AM):", -1, 10, 86, 147, 10 + COMBOBOX IDC_TIMEAM_COMBO, 161, 84, 84, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Heure après midi (PM):", -1, 10, 104, 147, 10 + COMBOBOX IDC_TIMEPM_COMBO, 161, 102, 84, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + GROUPBOX "", IDC_GROUPBOX, 7, 132, 238, 80 + LTEXT "Description du format de l'heure\nh = heure m = minute s = seconde t = matin ou après-midi\n\nh = heure au format 12 heures\nH = heure au format 24 heures\n\nhh, mm, ss = avec des zéros\nh, m, s = sans zéros", -1, 13, 141, 226, 65 +END + +IDD_DATEOPTSSETUP DIALOGEX 0, 0, 252, 236 +STYLE DS_FIXEDSYS | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Date" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Calendrier", IDC_GROUPBOX, 5, 7, 242, 74 + LTEXT "Si l'année est saisie sur 2 chiffres, l'afficher en tant qu'année entre:", -1, 13, 18, 225, 8 + EDITTEXT IDC_FIRSTYEAR_EDIT, 13, 30, 36, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "et", -1, 55, 32, 17, 8 + EDITTEXT IDC_SECONDYEAR_EDIT, 77, 30, 36, 12, ES_LEFT | ES_NUMBER | WS_GROUP + CONTROL "",IDC_SCR_MAX_YEAR, "msctls_updown32", UDS_NOTHOUSANDS | UDS_WRAP | UDS_SETBUDDYINT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_CHILD | WS_VISIBLE, 113, 30, 10, 12 + LTEXT "Calendrier:", -1, 13, 48, 56, 10 + COMBOBOX IDC_CALTYPE_COMBO, 77, 46, 161, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | + WS_VSCROLL | WS_TABSTOP | CBS_SORT | WS_DISABLED + LTEXT "Chronology by Hijra:", -1, 13, 59, 60, 16 + COMBOBOX IDC_HIJCHRON_COMBO, 77, 64, 161, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | + WS_VSCROLL | WS_TABSTOP | CBS_SORT | WS_DISABLED + GROUPBOX "Format court", IDC_GROUPBOX, 7, 83, 238, 81 + LTEXT "Exemple:", -1, 13, 95, 63, 10 + EDITTEXT IDC_SHRTDATESAMPLE_EDIT, 77, 93, 161, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Exemple - lecture de droite à gauche:", -1, 13, 109, 60, 16 + EDITTEXT IDC_SHRTDATERTOL_EDIT, 77, 111, 161, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_DISABLED + LTEXT "Format court:", -1, 13, 131, 60, 10 + COMBOBOX IDC_SHRTDATEFMT_COMBO, 77, 129, 161, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + LTEXT "Séparateur de date:", -1, 13, 148, 113, 10 + COMBOBOX IDC_SHRTDATESEP_COMBO, 187, 146, 51, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE + GROUPBOX "Format long:", IDC_GROUPBOX, 7, 167, 238, 64 + LTEXT "Exemple:", -1, 13, 179, 61, 10 + EDITTEXT IDC_LONGDATESAMPLE_EDIT, 77, 177, 161, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Exemple - lecture de gauche à droite:", -1, 13, 193, 61, 16 + EDITTEXT IDC_LONGDATERTOL_EDIT, 77, 195, 161, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_DISABLED + LTEXT "Format long:", -1, 13, 215, 60, 10 + COMBOBOX IDC_LONGDATEFMT_COMBO, 77, 213, 161, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE +END + +STRINGTABLE +BEGIN + IDS_CPLNAME "Langage et options régionales" + IDS_CPLDESCRIPTION "Sélectionner le langage, les formats de nombres, les devises, l'heure et la date." +END Modified: trunk/reactos/dll/cpl/intl_new/intl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl_new/intl.rc?r…
============================================================================== --- trunk/reactos/dll/cpl/intl_new/intl.rc (original) +++ trunk/reactos/dll/cpl/intl_new/intl.rc Wed Jan 24 20:45:26 2007 @@ -18,3 +18,4 @@ */ #include "En.rc" +#include "Fr.rc"
17 years, 11 months
1
0
0
0
[hyperion] 25617: * _ReadBarrier, _WriteBarrier: defined as aliases for _ReadWriteBarrier. Alas * __emul, __emulu: fixed to specify instruction length suffix * __rdtsc: removed "__volatile__" attribute from the inline asm. Hyperion recommends you fix your goddamn code instead * __emul, __emulu, __rdtsc, __readmsr, __readpmc: return 64-bit values with the "=A" constraint instead of horrible kludge
by hyperion@svn.reactos.org
Author: hyperion Date: Wed Jan 24 19:53:44 2007 New Revision: 25617 URL:
http://svn.reactos.org/svn/reactos?rev=25617&view=rev
Log: * _ReadBarrier, _WriteBarrier: defined as aliases for _ReadWriteBarrier. Alas * __emul, __emulu: fixed to specify instruction length suffix * __rdtsc: removed "__volatile__" attribute from the inline asm. Hyperion recommends you fix your goddamn code instead * __emul, __emulu, __rdtsc, __readmsr, __readpmc: return 64-bit values with the "=A" constraint instead of horrible kludge Modified: trunk/reactos/include/psdk/intrin.h Modified: trunk/reactos/include/psdk/intrin.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/intrin.h?rev=…
============================================================================== --- trunk/reactos/include/psdk/intrin.h (original) +++ trunk/reactos/include/psdk/intrin.h Wed Jan 24 19:53:44 2007 @@ -85,8 +85,6 @@ /*** Atomic operations ***/ -/* TODO: _ReadBarrier */ -/* TODO: _WriteBarrier */ #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100 #define _ReadWriteBarrier() __sync_synchronize() @@ -97,6 +95,10 @@ } #define _ReadWriteBarrier() _MemoryBarrier() #endif + +/* BUGBUG: GCC only supports full barriers */ +#define _ReadBarrier _ReadWriteBarrier +#define _WriteBarrier _ReadWriteBarrier #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100 @@ -774,50 +776,16 @@ /*** 64-bit math ***/ static __inline__ __attribute__((always_inline)) long long __emul(const int a, const int b) { - unsigned long lo32; - long hi32; - - __asm__("imul %[b]" : "=a" (lo32), "=d" (hi32) : [a] "a" (a), [b] "rm" (b)); - - { - union u_ - { - long long ll; - struct s_ - { - unsigned long lo32; - long hi32; - } - s; - } - u = { s : { lo32 : lo32, hi32 : hi32 } }; - - return u.ll; - } + long long retval; + __asm__("imull %[b]" : "=A" (retval) : [a] "a" (a), [b] "rm" (b)); + return retval; } static __inline__ __attribute__((always_inline)) unsigned long long __emulu(const unsigned int a, const unsigned int b) { - unsigned long lo32; - unsigned long hi32; - - __asm__("mul %[b]" : "=a" (lo32), "=d" (hi32) : [a] "a" (a), [b] "rm" (b)); - - { - union u_ - { - unsigned long long ull; - struct s_ - { - unsigned long lo32; - unsigned long hi32; - } - s; - } - u = { s : { lo32 : lo32, hi32 : hi32 } }; - - return u.ull; - } + unsigned long long retval; + __asm__("mull %[b]" : "=A" (retval) : [a] "a" (a), [b] "rm" (b)); + return retval; } @@ -915,26 +883,9 @@ static __inline__ __attribute__((always_inline)) unsigned long long __rdtsc(void) { - unsigned long lo32; - unsigned long hi32; - - __asm__ __volatile__("rdtsc" : "=a" (lo32), "=d" (hi32)); - - { - union u_ - { - unsigned long long ull; - struct s_ - { - unsigned long lo32; - unsigned long hi32; - } - s; - } - u = { s : { lo32 : lo32, hi32 : hi32 } }; - - return u.ull; - } + unsigned long long retval; + __asm__("rdtsc" : "=A" (retval)); + return retval; } @@ -1013,26 +964,9 @@ /*** System operations ***/ static __inline__ __attribute__((always_inline)) unsigned long long __readmsr(const int reg) { - unsigned long lo32; - unsigned long hi32; - - __asm__("rdmsr" : "=a" (lo32), "=d" (hi32) : "c" (reg)); - - { - union u_ - { - unsigned long long ull; - struct s_ - { - unsigned long lo32; - unsigned long hi32; - } - s; - } - u = { s : { lo32 : lo32, hi32 : hi32 } }; - - return u.ull; - } + unsigned long long retval; + __asm__("rdmsr" : "=A" (retval) : "c" (reg)); + return retval; } static __inline__ __attribute__((always_inline)) void __writemsr(const unsigned long Register, const unsigned long long Value) @@ -1049,26 +983,9 @@ static __inline__ __attribute__((always_inline)) unsigned long long __readpmc(const int counter) { - unsigned long lo32; - unsigned long hi32; - - __asm__("rdpmc" : "=a" (lo32), "=d" (hi32) : "c" (counter)); - - { - union u_ - { - unsigned long long ull; - struct s_ - { - unsigned long lo32; - unsigned long hi32; - } - s; - } - u = { s : { lo32 : lo32, hi32 : hi32 } }; - - return u.ull; - } + unsigned long long retval; + __asm__("rdpmc" : "=A" (retval) : "c" (counter)); + return retval; } /* NOTE: an immediate value for 'a' will raise an ICE in Visual C++ */
17 years, 11 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
...
41
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Results per page:
10
25
50
100
200