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
March 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
20 participants
287 discussions
Start a n
N
ew thread
[mbosma] 25949: Felipe Villarroel (fvillarroels(at)gmail(dot)com): Changed POSIX-like functions memset and memcpy to native API equivalents.
by mbosma@svn.reactos.org
Author: mbosma Date: Fri Mar 2 19:44:19 2007 New Revision: 25949 URL:
http://svn.reactos.org/svn/reactos?rev=25949&view=rev
Log: Felipe Villarroel (fvillarroels(at)gmail(dot)com): Changed POSIX-like functions memset and memcpy to native API equivalents. Modified: branches/cache_manager_rewrite/cc/copy.c branches/cache_manager_rewrite/cc/pin.c branches/cache_manager_rewrite/cc/view.c Modified: branches/cache_manager_rewrite/cc/copy.c URL:
http://svn.reactos.org/svn/reactos/branches/cache_manager_rewrite/cc/copy.c…
============================================================================== --- branches/cache_manager_rewrite/cc/copy.c (original) +++ branches/cache_manager_rewrite/cc/copy.c Fri Mar 2 19:44:19 2007 @@ -203,8 +203,9 @@ { CurrentLength = Length; } - memcpy (Buffer, - (PVOID) ((ULONG_PTR) Bcb->CacheView[Index]->BaseAddress + Offset.u.LowPart % CACHE_VIEW_SIZE), CurrentLength); + RtlCopyMemory(Buffer, + (PVOID) ((ULONG_PTR) Bcb->CacheView[Index]->BaseAddress + Offset.u.LowPart % CACHE_VIEW_SIZE), + CurrentLength); Buffer = (PVOID) ((ULONG_PTR) Buffer + CurrentLength); Length -= CurrentLength; Offset.QuadPart += CurrentLength; @@ -212,7 +213,7 @@ else { CurrentLength = Length > CACHE_VIEW_SIZE ? CACHE_VIEW_SIZE : Length; - memcpy (Buffer, Bcb->CacheView[Index]->BaseAddress, CurrentLength); + RtlCopyMemory(Buffer, Bcb->CacheView[Index]->BaseAddress, CurrentLength); Buffer = (PVOID) ((ULONG_PTR) Buffer + CurrentLength); Length -= CurrentLength; Offset.QuadPart += CurrentLength; @@ -355,8 +356,8 @@ { CurrentLength = Length; } - memcpy ((PVOID) ((ULONG_PTR) Bcb->CacheView[Index]->BaseAddress + Offset.u.LowPart % CACHE_VIEW_SIZE), - Buffer, CurrentLength); + RtlCopyMemory((PVOID) ((ULONG_PTR) Bcb->CacheView[Index]->BaseAddress + Offset.u.LowPart % CACHE_VIEW_SIZE), + Buffer, CurrentLength); Buffer = (PVOID) ((ULONG_PTR) Buffer + CurrentLength); Length -= CurrentLength; Offset.QuadPart += CurrentLength; @@ -364,7 +365,7 @@ else { CurrentLength = Length > CACHE_VIEW_SIZE ? CACHE_VIEW_SIZE : Length; - memcpy (Bcb->CacheView[Index]->BaseAddress, Buffer, CurrentLength); + RtlCopyMemory(Bcb->CacheView[Index]->BaseAddress, Buffer, CurrentLength); Buffer = (PVOID) ((ULONG_PTR) Buffer + CurrentLength); Length -= CurrentLength; Offset.QuadPart += CurrentLength; @@ -602,15 +603,15 @@ { CurrentLength = Length; } - memset ((PVOID) ((ULONG_PTR) Bcb->CacheView[Index]->BaseAddress + Offset.u.LowPart % CACHE_VIEW_SIZE), 0, - CurrentLength); + RtlZeroMemory((PVOID) ((ULONG_PTR) Bcb->CacheView[Index]->BaseAddress + Offset.u.LowPart % CACHE_VIEW_SIZE), + CurrentLength); Length -= CurrentLength; Offset.QuadPart += CurrentLength; } else { CurrentLength = Length > CACHE_VIEW_SIZE ? CACHE_VIEW_SIZE : Length; - memset (Bcb->CacheView[Index]->BaseAddress, 0, CurrentLength); + RtlZeroMemory(Bcb->CacheView[Index]->BaseAddress, CurrentLength); Length -= CurrentLength; Offset.QuadPart += CurrentLength; } Modified: branches/cache_manager_rewrite/cc/pin.c URL:
http://svn.reactos.org/svn/reactos/branches/cache_manager_rewrite/cc/pin.c?…
============================================================================== --- branches/cache_manager_rewrite/cc/pin.c (original) +++ branches/cache_manager_rewrite/cc/pin.c Fri Mar 2 19:44:19 2007 @@ -152,7 +152,7 @@ { KEBUGCHECK (0); } - memset (iBcb, 0, sizeof (INTERNAL_BCB)); + RtlZeroMemory(iBcb, sizeof (INTERNAL_BCB)); iBcb->Bcb = Bcb; iBcb->Index = Index; Modified: branches/cache_manager_rewrite/cc/view.c URL:
http://svn.reactos.org/svn/reactos/branches/cache_manager_rewrite/cc/view.c…
============================================================================== --- branches/cache_manager_rewrite/cc/view.c (original) +++ branches/cache_manager_rewrite/cc/view.c Fri Mar 2 19:44:19 2007 @@ -191,7 +191,7 @@ { KEBUGCHECK (0); } - memset (Bcb, 0, sizeof (BCB)); + RtlZeroMemory(Bcb, sizeof (BCB)); Bcb->FileObject = FileObject; Bcb->FileSizes = *FileSizes;
17 years, 9 months
1
0
0
0
[ion] 25948: - More MSVC fixes.
by ion@svn.reactos.org
Author: ion Date: Fri Mar 2 19:28:34 2007 New Revision: 25948 URL:
http://svn.reactos.org/svn/reactos?rev=25948&view=rev
Log: - More MSVC fixes. Modified: trunk/reactos/ntoskrnl/include/internal/i386/intrin_i.h trunk/reactos/ntoskrnl/ke/i386/cpu.c Modified: trunk/reactos/ntoskrnl/include/internal/i386/intrin_i.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/i386/intrin_i.h (original) +++ trunk/reactos/ntoskrnl/include/internal/i386/intrin_i.h Fri Mar 2 19:28:34 2007 @@ -168,28 +168,28 @@ VOID FORCEINLINE -Ke386GetInterruptDescriptorTable(OUT USHORT Descriptor) +Ke386GetInterruptDescriptorTable(OUT KDESCRIPTOR Descriptor) { __asm sidt Descriptor; } VOID FORCEINLINE -Ke386SetInterruptDescriptorTable(IN USHORT Descriptor) +Ke386SetInterruptDescriptorTable(IN KDESCRIPTOR Descriptor) { __asm lidt Descriptor; } VOID FORCEINLINE -Ke386GetGlobalDescriptorTable(OUT USHORT Descriptor) +Ke386GetGlobalDescriptorTable(OUT KDESCRIPTOR Descriptor) { __asm sgdt Descriptor; } VOID FORCEINLINE -Ke386SetGlobalDescriptorTable(IN USHORT Descriptor) +Ke386SetGlobalDescriptorTable(IN KDESCRIPTOR Descriptor) { __asm lgdt Descriptor; } Modified: trunk/reactos/ntoskrnl/ke/i386/cpu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/cpu.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/cpu.c (original) +++ trunk/reactos/ntoskrnl/ke/i386/cpu.c Fri Mar 2 19:28:34 2007 @@ -697,8 +697,8 @@ // // Restore GDT, IDT, LDT and TSS // - Ke386SetGlobalDescriptorTable(ProcessorState->SpecialRegisters.Gdtr.Base); - Ke386SetInterruptDescriptorTable(ProcessorState->SpecialRegisters.Idtr.Base); + Ke386SetGlobalDescriptorTable(ProcessorState->SpecialRegisters.Gdtr); + Ke386SetInterruptDescriptorTable(ProcessorState->SpecialRegisters.Idtr); Ke386SetTr(ProcessorState->SpecialRegisters.Tr); Ke386SetLocalDescriptorTable(ProcessorState->SpecialRegisters.Ldtr); } @@ -724,8 +724,8 @@ Ke386SetDr7(0); /* Save GDT, IDT, LDT and TSS */ - Ke386GetGlobalDescriptorTable(ProcessorState->SpecialRegisters.Gdtr.Base); - Ke386GetInterruptDescriptorTable(ProcessorState->SpecialRegisters.Idtr.Base); + Ke386GetGlobalDescriptorTable(ProcessorState->SpecialRegisters.Gdtr); + Ke386GetInterruptDescriptorTable(ProcessorState->SpecialRegisters.Idtr); Ke386GetTr(ProcessorState->SpecialRegisters.Tr); Ke386GetLocalDescriptorTable(ProcessorState->SpecialRegisters.Ldtr); }
17 years, 9 months
1
0
0
0
[ion] 25947: - Fix multiple WDK compatibilities issues. - Fix MSVC warnings and incompatibilities.
by ion@svn.reactos.org
Author: ion Date: Fri Mar 2 19:26:45 2007 New Revision: 25947 URL:
http://svn.reactos.org/svn/reactos?rev=25947&view=rev
Log: - Fix multiple WDK compatibilities issues. - Fix MSVC warnings and incompatibilities. Modified: trunk/reactos/include/ddk/winddk.h trunk/reactos/include/ndk/iotypes.h trunk/reactos/include/ndk/mmfuncs.h trunk/reactos/include/ndk/pstypes.h trunk/reactos/include/psdk/winnt.h trunk/reactos/ntoskrnl/fsrtl/fastio.c trunk/reactos/ntoskrnl/include/internal/i386/intrin_i.h trunk/reactos/ntoskrnl/include/ntoskrnl.h trunk/reactos/ntoskrnl/ke/i386/cpu.c trunk/reactos/ntoskrnl/ke/i386/kiinit.c Modified: trunk/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=2…
============================================================================== --- trunk/reactos/include/ddk/winddk.h (original) +++ trunk/reactos/include/ddk/winddk.h Fri Mar 2 19:26:45 2007 @@ -3429,7 +3429,6 @@ #define FO_RANDOM_ACCESS 0x00100000 #define FO_FILE_OPEN_CANCELLED 0x00200000 #define FO_VOLUME_OPEN 0x00400000 -#define FO_FILE_OBJECT_HAS_EXTENSION 0x00800000 #define FO_REMOTE_ORIGIN 0x01000000 typedef struct _FILE_OBJECT @@ -9281,19 +9280,6 @@ MmBuildMdlForNonPagedPool( IN OUT PMDL MemoryDescriptorList); -NTKERNELAPI -NTSTATUS -NTAPI -MmCreateSection( - OUT PVOID *SectionObject, - IN ACCESS_MASK DesiredAccess, - IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, - IN PLARGE_INTEGER MaximumSize, - IN ULONG SectionPageProtection, - IN ULONG AllocationAttributes, - IN HANDLE FileHandle OPTIONAL, - IN PFILE_OBJECT File OPTIONAL); - typedef enum _MMFLUSH_TYPE { MmFlushForDelete, MmFlushForWrite Modified: trunk/reactos/include/ndk/iotypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/iotypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/iotypes.h (original) +++ trunk/reactos/include/ndk/iotypes.h Fri Mar 2 19:26:45 2007 @@ -123,6 +123,11 @@ // #define FILE_REMOVABLE_MEDIA 0x00000001 #define FILE_REMOTE_DEVICE 0x00000010 + +// +// File Object Flags +// +#define FO_FILE_OBJECT_HAS_EXTENSION 0x00800000 // // Device Object Extension Flags Modified: trunk/reactos/include/ndk/mmfuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/mmfuncs.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/mmfuncs.h (original) +++ trunk/reactos/include/ndk/mmfuncs.h Fri Mar 2 19:26:45 2007 @@ -29,6 +29,19 @@ // // Section Functions // +NTSTATUS +NTAPI +MmCreateSection( + OUT PVOID *SectionObject, + IN ACCESS_MASK DesiredAccess, + IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, + IN PLARGE_INTEGER MaximumSize, + IN ULONG SectionPageProtection, + IN ULONG AllocationAttributes, + IN HANDLE FileHandle OPTIONAL, + IN PFILE_OBJECT File OPTIONAL +); + NTSTATUS NTAPI MmMapViewOfSection( Modified: trunk/reactos/include/ndk/pstypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/pstypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/pstypes.h (original) +++ trunk/reactos/include/ndk/pstypes.h Fri Mar 2 19:26:45 2007 @@ -114,11 +114,6 @@ #define PSP_VARIABLE_QUANTUMS 4 #define PSP_LONG_QUANTUMS 16 -// -// Number of TLS expansion slots -// -#define TLS_EXPANSION_SLOTS 64 - #ifndef NTOS_MODE_USER // @@ -152,6 +147,20 @@ #define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \ SYNCHRONIZE | \ 0xFFF) + +// +// Thread Base Priorities +// +#define THREAD_BASE_PRIORITY_LOWRT 15 +#define THREAD_BASE_PRIORITY_MAX 2 +#define THREAD_BASE_PRIORITY_MIN -2 +#define THREAD_BASE_PRIORITY_IDLE -15 + +// +// TLS Slots +// +#define TLS_MINIMUM_AVAILABLE 64 +#define TLS_EXPANSION_SLOTS 1024 #endif // Modified: trunk/reactos/include/psdk/winnt.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=2…
============================================================================== --- trunk/reactos/include/psdk/winnt.h (original) +++ trunk/reactos/include/psdk/winnt.h Fri Mar 2 19:26:45 2007 @@ -468,10 +468,6 @@ #define THREAD_DIRECT_IMPERSONATION 0x200 #endif #define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3FF) -#define THREAD_BASE_PRIORITY_LOWRT 15 -#define THREAD_BASE_PRIORITY_MAX 2 -#define THREAD_BASE_PRIORITY_MIN (-2) -#define THREAD_BASE_PRIORITY_IDLE (-15) #define EXCEPTION_NONCONTINUABLE 1 #define EXCEPTION_MAXIMUM_PARAMETERS 15 /* FIXME: Oh how I wish, I wish the w32api DDK wouldn't include winnt.h... */ @@ -481,6 +477,10 @@ #define TIMER_QUERY_STATE 0x0001 #define TIMER_MODIFY_STATE 0x0002 #define TIMER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|TIMER_QUERY_STATE|TIMER_MODIFY_STATE) +#define THREAD_BASE_PRIORITY_LOWRT 15 +#define THREAD_BASE_PRIORITY_MAX 2 +#define THREAD_BASE_PRIORITY_MIN (-2) +#define THREAD_BASE_PRIORITY_IDLE (-15) #endif /* * To prevent gcc compiler warnings, bracket these defines when initialising Modified: trunk/reactos/ntoskrnl/fsrtl/fastio.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/fastio.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/fsrtl/fastio.c (original) +++ trunk/reactos/ntoskrnl/fsrtl/fastio.c Fri Mar 2 19:26:45 2007 @@ -8,18 +8,9 @@ /* INCLUDES ******************************************************************/ -#ifdef _WINDOWS_TESTING -#include <ntifs.h> -#include "ntndk.h" -#include "fsrtl_glue.h" -#else #include <ntoskrnl.h> #define NDEBUG #include <debug.h> -#include <ntifs.h> -#include <cctypes.h> -#endif /* _WINDOWS_TESTING */ - /* PUBLIC FUNCTIONS **********************************************************/ Modified: trunk/reactos/ntoskrnl/include/internal/i386/intrin_i.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/i386/intrin_i.h (original) +++ trunk/reactos/ntoskrnl/include/internal/i386/intrin_i.h Fri Mar 2 19:26:45 2007 @@ -116,6 +116,44 @@ VOID FORCEINLINE +Ke386Wrmsr(IN ULONG Register, + IN ULONG Var1, + IN ULONG Var2) +{ + __asm mov eax, Var1; + __asm mov edx, Var2; + __asm wrmsr; +} + +ULONGLONG +FORCEINLINE +Ke386Rdmsr(IN ULONG Register, + IN ULONG Var1, + IN ULONG Var2) +{ + __asm mov eax, Var1; + __asm mov edx, Var2; + __asm rdmsr; +} + +VOID +FORCEINLINE +Ki386Cpuid(IN ULONG Operation, + OUT PULONG Var1, + OUT PULONG Var2, + OUT PULONG Var3, + OUT PULONG Var4) +{ + __asm mov eax, Operation; + __asm cpuid; + __asm mov [Var1], eax; + __asm mov [Var2], ebx; + __asm mov [Var3], ecx; + __asm mov [Var4], edx; +} + +VOID +FORCEINLINE Ke386FnInit(VOID) { __asm fninit; @@ -130,28 +168,28 @@ VOID FORCEINLINE -Ke386GetInterruptDescriptorTable(OUT KDESCRIPTOR Descriptor) +Ke386GetInterruptDescriptorTable(OUT USHORT Descriptor) { __asm sidt Descriptor; } VOID FORCEINLINE -Ke386SetInterruptDescriptorTable(IN KDESCRIPTOR Descriptor) +Ke386SetInterruptDescriptorTable(IN USHORT Descriptor) { __asm lidt Descriptor; } VOID FORCEINLINE -Ke386GetGlobalDescriptorTable(OUT KDESCRIPTOR Descriptor) +Ke386GetGlobalDescriptorTable(OUT USHORT Descriptor) { __asm sgdt Descriptor; } VOID FORCEINLINE -Ke386SetGlobalDescriptorTable(IN KDESCRIPTOR Descriptor) +Ke386SetGlobalDescriptorTable(IN USHORT Descriptor) { __asm lgdt Descriptor; } Modified: trunk/reactos/ntoskrnl/include/ntoskrnl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/ntoskrnl.…
============================================================================== --- trunk/reactos/ntoskrnl/include/ntoskrnl.h (original) +++ trunk/reactos/ntoskrnl/include/ntoskrnl.h Fri Mar 2 19:26:45 2007 @@ -36,6 +36,7 @@ #include <diskdump/diskdump.h> /* C Headers */ +#include <stdlib.h> #include <stdio.h> #include <ctype.h> #include <malloc.h> Modified: trunk/reactos/ntoskrnl/ke/i386/cpu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/cpu.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/cpu.c (original) +++ trunk/reactos/ntoskrnl/ke/i386/cpu.c Fri Mar 2 19:26:45 2007 @@ -108,7 +108,7 @@ LONGLONG RDMSR(IN ULONG Register) { - LARGE_INTEGER LargeVal; + LARGE_INTEGER LargeVal = {{0}}; Ke386Rdmsr(Register, LargeVal.HighPart, LargeVal.LowPart); return LargeVal.QuadPart; } @@ -119,7 +119,7 @@ NTAPI KiSetProcessorType(VOID) { - ULONG EFlags, NewEFlags; + ULONG EFlags = 0, NewEFlags; ULONG Reg[4]; ULONG Stepping, Type; @@ -671,7 +671,7 @@ KeFlushCurrentTb(VOID) { /* Flush the TLB by resetting CR3 */ - __writecr3((ULONGLONG)__readcr3()); + __writecr3(__readcr3()); } VOID @@ -744,10 +744,10 @@ { /* Set CS and ESP */ Ke386Wrmsr(0x174, KGDT_R0_CODE, 0); - Ke386Wrmsr(0x175, KeGetCurrentPrcb()->DpcStack, 0); + Ke386Wrmsr(0x175, (ULONG)KeGetCurrentPrcb()->DpcStack, 0); /* Set LSTAR */ - Ke386Wrmsr(0x176, KiFastCallEntry, 0); + Ke386Wrmsr(0x176, (ULONG)KiFastCallEntry, 0); return 0; } @@ -811,7 +811,7 @@ NTAPI KiI386PentiumLockErrataFixup(VOID) { - KDESCRIPTOR IdtDescriptor; + KDESCRIPTOR IdtDescriptor = {0}; PKIDTENTRY NewIdt, NewIdt2; /* Allocate memory for a new IDT */ @@ -846,7 +846,7 @@ KeFreezeExecution(IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame) { - ULONG Flags; + ULONG Flags = 0; /* Disable interrupts and get previous state */ Ke386SaveFlags(Flags); Modified: trunk/reactos/ntoskrnl/ke/i386/kiinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/kiinit.c?…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/kiinit.c (original) +++ trunk/reactos/ntoskrnl/ke/i386/kiinit.c Fri Mar 2 19:26:45 2007 @@ -606,7 +606,7 @@ IN PKIPCR *Pcr, IN PKTSS *Tss) { - KDESCRIPTOR GdtDescriptor, IdtDescriptor; + KDESCRIPTOR GdtDescriptor = {0}, IdtDescriptor; KGDTENTRY TssSelector, PcrSelector; USHORT Tr, Fs;
17 years, 9 months
1
0
0
0
[cwittich] 25946: fix mkhive on x86_64 hosts
by cwittich@svn.reactos.org
Author: cwittich Date: Fri Mar 2 18:57:34 2007 New Revision: 25946 URL:
http://svn.reactos.org/svn/reactos?rev=25946&view=rev
Log: fix mkhive on x86_64 hosts Modified: trunk/reactos/include/ddk/winddk.h trunk/reactos/include/psdk/intrin.h trunk/reactos/include/reactos/debug.h Modified: trunk/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=2…
============================================================================== --- trunk/reactos/include/ddk/winddk.h (original) +++ trunk/reactos/include/ddk/winddk.h Fri Mar 2 18:57:34 2007 @@ -5281,6 +5281,12 @@ #error Unknown compiler #endif } +#elif __x86_64__ + +typedef struct _KFLOATING_SAVE { + ULONG Dummy; +} KFLOATING_SAVE, *PKFLOATING_SAVE; + #endif /* _X86_ */ #define PAGE_SIZE 0x1000 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 Fri Mar 2 18:57:34 2007 @@ -951,7 +951,7 @@ #else /* TODO: the x64 architecture shares most of the intrinsics. It should be easy to support */ -#error Unsupported architecture +#warning Unsupported architecture #endif Modified: trunk/reactos/include/reactos/debug.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/debug.h?re…
============================================================================== --- trunk/reactos/include/reactos/debug.h (original) +++ trunk/reactos/include/reactos/debug.h Fri Mar 2 18:57:34 2007 @@ -124,6 +124,8 @@ #define ASM_BREAKPOINT "\ncall_pal bpt\n" #elif defined(_M_MIPS) #define ASM_BREAKPOINT "\nbreak\n" +#elif defined(__x86_64__) +#define ASM_BREAKPOINT "\nint $3\n" #else #error Unsupported architecture. #endif
17 years, 9 months
1
0
0
0
[ion] 25945: - Rewrite a dirty, reverse-engineered function written by dwelch (David Welch) 7.1 years ago in revision 965. We must agressively continue to hunt down such reversed code by previously tainted ReactOS developers who have thankfully left/been kicked out since then.
by ion@svn.reactos.org
Author: ion Date: Fri Mar 2 10:37:45 2007 New Revision: 25945 URL:
http://svn.reactos.org/svn/reactos?rev=25945&view=rev
Log: - Rewrite a dirty, reverse-engineered function written by dwelch (David Welch) 7.1 years ago in revision 965. We must agressively continue to hunt down such reversed code by previously tainted ReactOS developers who have thankfully left/been kicked out since then. Modified: trunk/reactos/ntoskrnl/se/token.c Modified: trunk/reactos/ntoskrnl/se/token.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/token.c?rev=25…
============================================================================== --- trunk/reactos/ntoskrnl/se/token.c (original) +++ trunk/reactos/ntoskrnl/se/token.c Fri Mar 2 10:37:45 2007 @@ -444,94 +444,77 @@ /* * @implemented */ -NTSTATUS STDCALL -SeCreateClientSecurity(IN struct _ETHREAD *Thread, - IN PSECURITY_QUALITY_OF_SERVICE Qos, - IN BOOLEAN RemoteClient, - OUT PSECURITY_CLIENT_CONTEXT ClientContext) -{ - TOKEN_TYPE TokenType; - UCHAR b; - SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; - PACCESS_TOKEN Token; - ULONG g; - PACCESS_TOKEN NewToken; - - PAGED_CODE(); - - Token = PsReferenceEffectiveToken(Thread, - &TokenType, - &b, - &ImpersonationLevel); - if (TokenType != TokenImpersonation) - { - ClientContext->DirectAccessEffectiveOnly = Qos->EffectiveOnly; - } - else - { - if (Qos->ImpersonationLevel > ImpersonationLevel) - { - if (Token != NULL) - { - ObDereferenceObject(Token); - } - return(STATUS_UNSUCCESSFUL); - } - if (ImpersonationLevel == SecurityAnonymous || - ImpersonationLevel == SecurityIdentification || - (RemoteClient != FALSE && ImpersonationLevel != SecurityDelegation)) - { - if (Token != NULL) - { - ObDereferenceObject(Token); - } - return(STATUS_UNSUCCESSFUL); - } - if (b != 0 || - Qos->EffectiveOnly != 0) - { - ClientContext->DirectAccessEffectiveOnly = TRUE; - } - else - { - ClientContext->DirectAccessEffectiveOnly = FALSE; - } - } - - if (Qos->ContextTrackingMode == 0) - { - ClientContext->DirectlyAccessClientToken = FALSE; - g = SeCopyClientToken(Token, ImpersonationLevel, 0, &NewToken); - if (g >= 0) - { -// ObDeleteCapturedInsertInfo(NewToken); - } - if (TokenType == TokenPrimary || Token != NULL) - { - ObDereferenceObject(Token); - } - if (g < 0) - { - return(g); - } - } - else - { - ClientContext->DirectlyAccessClientToken = TRUE; - if (RemoteClient != FALSE) - { -// SeGetTokenControlInformation(Token, &ClientContext->Unknown11); - } - NewToken = Token; - } - ClientContext->SecurityQos.Length = sizeof(SECURITY_QUALITY_OF_SERVICE); - ClientContext->SecurityQos.ImpersonationLevel = Qos->ImpersonationLevel; - ClientContext->SecurityQos.ContextTrackingMode = Qos->ContextTrackingMode; - ClientContext->SecurityQos.EffectiveOnly = Qos->EffectiveOnly; - ClientContext->ServerIsRemote = RemoteClient; - ClientContext->ClientToken = NewToken; - - return(STATUS_SUCCESS); +NTSTATUS +NTAPI +SeCreateClientSecurity(IN PETHREAD Thread, + IN PSECURITY_QUALITY_OF_SERVICE Qos, + IN BOOLEAN RemoteClient, + OUT PSECURITY_CLIENT_CONTEXT ClientContext) +{ + TOKEN_TYPE TokenType; + BOOLEAN ThreadEffectiveOnly; + SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; + PACCESS_TOKEN Token; + NTSTATUS Status; + PACCESS_TOKEN NewToken; + PAGED_CODE(); + + Token = PsReferenceEffectiveToken(Thread, + &TokenType, + &ThreadEffectiveOnly, + &ImpersonationLevel); + if (TokenType != TokenImpersonation) + { + ClientContext->DirectAccessEffectiveOnly = Qos->EffectiveOnly; + } + else + { + if (Qos->ImpersonationLevel > ImpersonationLevel) + { + if (Token) ObDereferenceObject(Token); + return STATUS_BAD_IMPERSONATION_LEVEL; + } + + if ((ImpersonationLevel == SecurityAnonymous) || + (ImpersonationLevel == SecurityIdentification) || + ((RemoteClient) && (ImpersonationLevel != SecurityDelegation))) + { + if (Token) ObDereferenceObject(Token); + return STATUS_BAD_IMPERSONATION_LEVEL; + } + + ClientContext->DirectAccessEffectiveOnly = ((ThreadEffectiveOnly) || + (Qos->EffectiveOnly)) ? + TRUE : FALSE; + } + + if (Qos->ContextTrackingMode == SECURITY_STATIC_TRACKING) + { + ClientContext->DirectlyAccessClientToken = FALSE; + Status = SeCopyClientToken(Token, ImpersonationLevel, 0, &NewToken); + if (!NT_SUCCESS(Status)) return Status; + } + else + { + ClientContext->DirectlyAccessClientToken = TRUE; + if (RemoteClient != FALSE) + { +#if 0 + SeGetTokenControlInformation(Token, + &ClientContext->ClientTokenControl); +#endif + } + + NewToken = Token; + } + + ClientContext->SecurityQos.Length = sizeof(SECURITY_QUALITY_OF_SERVICE); + ClientContext->SecurityQos.ImpersonationLevel = Qos->ImpersonationLevel; + ClientContext->SecurityQos.ContextTrackingMode = Qos->ContextTrackingMode; + ClientContext->SecurityQos.EffectiveOnly = Qos->EffectiveOnly; + ClientContext->ServerIsRemote = RemoteClient; + ClientContext->ClientToken = NewToken; + return STATUS_SUCCESS; } /*
17 years, 9 months
1
0
0
0
[ion] 25944: - Don't depend on LD variables anymore for Mm. - Update KrnlFun.c - Make pushlock.c compile with msvc/wdk. - Fix definition of HIGH_LEVEL_ENTRIES which was way too small (and thus always 0) which caused frees/allocates in the 3rd-level table not to work properly. MSVC statically detected this, it's unlikely we were hitting this in ROS at the moment but it would've been a bad bug to catch later, yay msvc.
by ion@svn.reactos.org
Author: ion Date: Fri Mar 2 10:23:19 2007 New Revision: 25944 URL:
http://svn.reactos.org/svn/reactos?rev=25944&view=rev
Log: - Don't depend on LD variables anymore for Mm. - Update KrnlFun.c - Make pushlock.c compile with msvc/wdk. - Fix definition of HIGH_LEVEL_ENTRIES which was way too small (and thus always 0) which caused frees/allocates in the 3rd-level table not to work properly. MSVC statically detected this, it's unlikely we were hitting this in ROS at the moment but it would've been a bad bug to catch later, yay msvc. Modified: trunk/reactos/ntoskrnl/KrnlFun.c trunk/reactos/ntoskrnl/ex/pushlock.c trunk/reactos/ntoskrnl/include/internal/ex.h trunk/reactos/ntoskrnl/io/iomgr/driver.c trunk/reactos/ntoskrnl/mm/freelist.c trunk/reactos/ntoskrnl/mm/mminit.c Modified: trunk/reactos/ntoskrnl/KrnlFun.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/KrnlFun.c?rev=259…
============================================================================== --- trunk/reactos/ntoskrnl/KrnlFun.c (original) +++ trunk/reactos/ntoskrnl/KrnlFun.c Fri Mar 2 10:23:19 2007 @@ -13,7 +13,10 @@ // // Global: // - TODO: Complete the list of bufxies -// - Fix atapi.sys or serial.sys loading one more time at each boot. +// - Fix boot on VMWare. +// - Fix weird crash on boot with 0x867-0x872 EIP. +// - Fix trap.s AMD64 VMWare "Greatlord Issue". +// - Support SSE/MMX. // /////////////////////////////////////////////////////////////////////////////// Modified: trunk/reactos/ntoskrnl/ex/pushlock.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/pushlock.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ex/pushlock.c (original) +++ trunk/reactos/ntoskrnl/ex/pushlock.c Fri Mar 2 10:23:19 2007 @@ -10,11 +10,13 @@ #include <ntoskrnl.h> #define NDEBUG -#include <internal/debug.h> +#include <debug.h> /* DATA **********************************************************************/ ULONG ExPushLockSpinCount; +#undef EX_PUSH_LOCK +#undef PEX_PUSH_LOCK /* PRIVATE FUNCTIONS *********************************************************/ @@ -439,10 +441,10 @@ FASTCALL ExfAcquirePushLockExclusive(PEX_PUSH_LOCK PushLock) { - DEFINE_WAIT_BLOCK(WaitBlock); EX_PUSH_LOCK OldValue = *PushLock, NewValue, TempValue; BOOLEAN NeedWake; ULONG i; + DEFINE_WAIT_BLOCK(WaitBlock); /* Start main loop */ for (;;) @@ -605,10 +607,10 @@ FASTCALL ExfAcquirePushLockShared(PEX_PUSH_LOCK PushLock) { - DEFINE_WAIT_BLOCK(WaitBlock); EX_PUSH_LOCK OldValue = *PushLock, NewValue; BOOLEAN NeedWake; ULONG i; + DEFINE_WAIT_BLOCK(WaitBlock); /* Start main loop */ for (;;) 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 Fri Mar 2 10:23:19 2007 @@ -92,7 +92,7 @@ // #define LOW_LEVEL_ENTRIES (PAGE_SIZE / sizeof(HANDLE_TABLE_ENTRY)) #define MID_LEVEL_ENTRIES (PAGE_SIZE / sizeof(PHANDLE_TABLE_ENTRY)) -#define HIGH_LEVEL_ENTRIES (65535 / (LOW_LEVEL_ENTRIES * MID_LEVEL_ENTRIES)) +#define HIGH_LEVEL_ENTRIES (16777216 / (LOW_LEVEL_ENTRIES * MID_LEVEL_ENTRIES)) // // Maximum index in each table level before we need another table 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 Fri Mar 2 10:23:19 2007 @@ -1305,7 +1305,7 @@ /* Null-terminate it and set it */ ServiceKeyName.Buffer[ServiceKeyName.Length / sizeof(WCHAR)] = UNICODE_NULL; - DriverObject->DriverExtension->ServiceKeyName = ServiceKeyName; + DriverObject->DriverExtension->ServiceKeyName = ServiceKeyName; /* Also store it in the Driver Object. This is a bit of a hack. */ RtlCopyMemory(&DriverObject->DriverName, Modified: trunk/reactos/ntoskrnl/mm/freelist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/freelist.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/mm/freelist.c (original) +++ trunk/reactos/ntoskrnl/mm/freelist.c Fri Mar 2 10:23:19 2007 @@ -1153,7 +1153,7 @@ ULONG Count; /* Free initial kernel memory */ - MiFreeInitMemory(); + //MiFreeInitMemory(); /* Set our priority to 0 */ KeGetCurrentThread()->BasePriority = 0; 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 Fri Mar 2 10:23:19 2007 @@ -19,6 +19,7 @@ /* * Compiler defined symbols */ +#if 0 extern unsigned int _image_base__; extern unsigned int _text_start__; extern unsigned int _text_end__; @@ -27,7 +28,7 @@ extern unsigned int _init_end__; extern unsigned int _bss_end__; - +#endif static BOOLEAN IsThisAnNtAsSystem = FALSE; MM_SYSTEMSIZE MmSystemSize = MmSmallSystem; @@ -38,13 +39,6 @@ ULONG MiNonPagedPoolLength; VOID INIT_FUNCTION NTAPI MmInitVirtualMemory(ULONG_PTR LastKernelAddress, ULONG KernelLength); - -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, MmInitVirtualMemory) -#pragma alloc_text(INIT, MmInit1) -#pragma alloc_text(INIT, MmInit2) -#pragma alloc_text(INIT, MmInit3) -#endif /* FUNCTIONS ****************************************************************/ @@ -83,7 +77,7 @@ { PVOID BaseAddress; ULONG Length; - ULONG ParamLength = KernelLength; + //ULONG ParamLength = KernelLength; NTSTATUS Status; PHYSICAL_ADDRESS BoundaryAddressMultiple; PFN_TYPE Pfn; @@ -159,7 +153,24 @@ 0, BoundaryAddressMultiple); +#if 0 + DPRINT1("LD Vars: %lx %lx %lx %lx %lx %lx. Last: %lx\n", + &_image_base__, + &_text_start__, + &_text_end__, + &_init_start__, + &_init_end__, + &_bss_end__, + LastKernelAddress); BaseAddress = (PVOID)&_image_base__; + DPRINT1("Non-LD Vars: %lx %lx %lx %lx %lx %lx. Last: %lx\n", + 0, + 0, + 0, + 0, + 0, + 0, + LastKernelAddress); Length = PAGE_ROUND_UP(((ULONG_PTR)&_text_end__)) - (ULONG_PTR)&_image_base__; ParamLength = ParamLength - Length; @@ -225,6 +236,7 @@ TRUE, 0, BoundaryAddressMultiple); +#endif BaseAddress = MiNonPagedPoolStart; MmCreateMemoryArea(MmGetKernelAddressSpace(), @@ -515,6 +527,8 @@ return TRUE; } +#if 0 + VOID static MiFreeInitMemoryPage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address, PFN_TYPE Page, SWAPENTRY SwapEntry, @@ -538,3 +552,4 @@ NULL); MmUnlockAddressSpace(MmGetKernelAddressSpace()); } +#endif
17 years, 9 months
1
0
0
0
[ion] 25943: - Fix some rtl warnings on /W3.
by ion@svn.reactos.org
Author: ion Date: Fri Mar 2 10:21:33 2007 New Revision: 25943 URL:
http://svn.reactos.org/svn/reactos?rev=25943&view=rev
Log: - Fix some rtl warnings on /W3. Modified: trunk/reactos/lib/rtl/atom.c trunk/reactos/lib/rtl/critical.c trunk/reactos/lib/rtl/debug.c trunk/reactos/lib/rtl/largeint.c trunk/reactos/lib/rtl/unicodeprefix.c Modified: trunk/reactos/lib/rtl/atom.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/atom.c?rev=25943&r…
============================================================================== --- trunk/reactos/lib/rtl/atom.c (original) +++ trunk/reactos/lib/rtl/atom.c Fri Mar 2 10:21:33 2007 @@ -366,7 +366,7 @@ Entry->ReferenceCount = 1; Entry->Flags = 0x0; - Entry->NameLength = AtomNameLen; + Entry->NameLength = (UCHAR)AtomNameLen; RtlCopyMemory(Entry->Name, AtomName, (AtomNameLen + 1) * sizeof(WCHAR)); Modified: trunk/reactos/lib/rtl/critical.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/critical.c?rev=259…
============================================================================== --- trunk/reactos/lib/rtl/critical.c (original) +++ trunk/reactos/lib/rtl/critical.c Fri Mar 2 10:21:33 2007 @@ -65,9 +65,9 @@ } DPRINT("Created Event: %p \n", hNewEvent); - if ((hEvent = _InterlockedCompareExchangePointer((PVOID*)&CriticalSection->LockSemaphore, - (PVOID)hNewEvent, - 0))) { + if ((hEvent = (HANDLE)_InterlockedCompareExchange((PLONG)&CriticalSection->LockSemaphore, + (LONG)hNewEvent, + 0))) { /* Some just created an event */ DPRINT("Closing already created event: %p\n", hNewEvent); Modified: trunk/reactos/lib/rtl/debug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/debug.c?rev=25943&…
============================================================================== --- trunk/reactos/lib/rtl/debug.c (original) +++ trunk/reactos/lib/rtl/debug.c Fri Mar 2 10:21:33 2007 @@ -111,7 +111,7 @@ } /* Update length */ - DebugString.Length += Length; + DebugString.Length += (USHORT)Length; /* First, let the debugger know as well */ if (RtlpCheckForActiveDebugger(FALSE)) @@ -270,11 +270,11 @@ STRING Input; /* Setup the input string */ - Input.MaximumLength = MaximumResponseLength; + Input.MaximumLength = (USHORT)MaximumResponseLength; Input.Buffer = Response; /* Setup the output string */ - Output.Length = strlen (Prompt); + Output.Length = strlen(Prompt); Output.Buffer = Prompt; /* Call the system service */ @@ -284,7 +284,7 @@ /* * @implemented */ -BOOLEAN +NTSTATUS NTAPI DbgQueryDebugFilterState(IN ULONG ComponentId, IN ULONG Level) Modified: trunk/reactos/lib/rtl/largeint.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/largeint.c?rev=259…
============================================================================== --- trunk/reactos/lib/rtl/largeint.c (original) +++ trunk/reactos/lib/rtl/largeint.c Fri Mar 2 10:21:33 2007 @@ -75,7 +75,7 @@ ) { if (Remainder) - *Remainder = Dividend.QuadPart % Divisor; + *Remainder = (ULONG)(Dividend.QuadPart % Divisor); return (ULONG)(Dividend.QuadPart / Divisor); } @@ -128,7 +128,7 @@ LARGE_INTEGER RC; if (Remainder) - *Remainder = Dividend.QuadPart % Divisor; + *Remainder = (ULONG)(Dividend.QuadPart % Divisor); RC.QuadPart = Dividend.QuadPart / Divisor; Modified: trunk/reactos/lib/rtl/unicodeprefix.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/unicodeprefix.c?re…
============================================================================== --- trunk/reactos/lib/rtl/unicodeprefix.c (original) +++ trunk/reactos/lib/rtl/unicodeprefix.c Fri Mar 2 10:21:33 2007 @@ -25,7 +25,6 @@ /* FUNCTIONS ***************************************************************/ -static ULONG NTAPI ComputeUnicodeNameLength(IN PUNICODE_STRING UnicodeName) @@ -44,7 +43,6 @@ return NamesFound; } -static RTL_GENERIC_COMPARE_RESULTS NTAPI CompareUnicodeStrings(IN PUNICODE_STRING Prefix, @@ -57,7 +55,6 @@ ULONG i; WCHAR FoundPrefix, FoundString; PWCHAR p, p1; - DPRINT("CompareUnicodeStrings: %wZ %wZ\n", String, Prefix); /* Handle case noticed in npfs when Prefix = '\' and name starts with '\' */ if ((PrefixLength == 1) && @@ -157,7 +154,6 @@ PUNICODE_PREFIX_TABLE_ENTRY CurrentEntry, PreviousEntry, Entry, NextEntry; PRTL_SPLAY_LINKS SplayLinks; RTL_GENERIC_COMPARE_RESULTS Result; - DPRINT("RtlFindUnicodePrefix\n"); /* Find out how many names there are */ NameCount = ComputeUnicodeNameLength(FullName); @@ -165,7 +161,7 @@ /* Find the right spot where to start looking for this entry */ PreviousEntry = (PUNICODE_PREFIX_TABLE_ENTRY)PrefixTable; CurrentEntry = PreviousEntry->NextPrefixTree; - while (CurrentEntry->NameLength > NameCount) + while (CurrentEntry->NameLength > (CSHORT)NameCount) { /* Not a match, move to the next entry */ PreviousEntry = CurrentEntry; @@ -175,21 +171,17 @@ /* Loop every entry which has valid entries */ while (CurrentEntry->NameLength) { - DPRINT("CurrentEntry->NameLength 0x%x\n", CurrentEntry->NameLength); - /* Get the splay links and loop */ SplayLinks = &CurrentEntry->Links; while (SplayLinks) { /* Get the entry */ - DPRINT("SplayLinks %p\n", SplayLinks); Entry = CONTAINING_RECORD(SplayLinks, UNICODE_PREFIX_TABLE_ENTRY, Links); /* Do the comparison */ Result = CompareUnicodeStrings(Entry->Prefix, FullName, 0); - DPRINT("Result 0x%x\n", Result); if (Result == GenericGreaterThan) { /* Prefix is greater, so restart on the left child */ @@ -208,7 +200,6 @@ * NOTE: An index of 0 means case-insensitive(ie, we'll be case * insensitive since index 0, ie, all the time) */ - DPRINT("CaseInsensitiveIndex %lx\n", CaseInsensitiveIndex); if (!CaseInsensitiveIndex) { /* @@ -242,7 +233,6 @@ } /* Return the entry */ - DPRINT("RtlFindUnicodePrefix: %p\n", Entry); return Entry; } @@ -258,13 +248,11 @@ (Result != GenericGreaterThan)) { /* This is a positive match, return it */ - DPRINT("RtlFindUnicodePrefix: %p\n", NextEntry); return NextEntry; } /* No match yet, continue looping the circular list */ NextEntry = NextEntry->CaseMatch; - DPRINT("NextEntry %p\n", NextEntry); } while (NextEntry != Entry); /* @@ -275,15 +263,13 @@ break; } - /* Splay links exausted, move to next entry */ + /* Splay links exhausted, move to next entry */ PreviousEntry = CurrentEntry; CurrentEntry = CurrentEntry->NextPrefixTree; - DPRINT("CurrentEntry %p\n", CurrentEntry); - } - - /* If we got here, nothing was found */ - DPRINT("RtlFindUnicodePrefix: %p\n", NULL); - return NULL; + } + + /* If we got here, nothing was found */ + return NULL; } /* @@ -293,7 +279,7 @@ NTAPI RtlInitializeUnicodePrefix(PUNICODE_PREFIX_TABLE PrefixTable) { - /* Setup the table */ + /* Setup the table */ PrefixTable->NameLength = 0; PrefixTable->LastNextEntry = NULL; PrefixTable->NodeTypeCode = PFX_NTC_TABLE; @@ -313,20 +299,19 @@ ULONG NameCount; RTL_GENERIC_COMPARE_RESULTS Result; PRTL_SPLAY_LINKS SplayLinks; - DPRINT("RtlInsertUnicodePrefix\n"); /* Find out how many names there are */ NameCount = ComputeUnicodeNameLength(Prefix); /* Set up the initial entry data */ - PrefixTableEntry->NameLength = NameCount; + PrefixTableEntry->NameLength = (CSHORT)NameCount; PrefixTableEntry->Prefix = Prefix; RtlInitializeSplayLinks(&PrefixTableEntry->Links); /* Find the right spot where to insert this entry */ PreviousEntry = (PUNICODE_PREFIX_TABLE_ENTRY)PrefixTable; CurrentEntry = PreviousEntry->NextPrefixTree; - while (CurrentEntry->NameLength > NameCount) + while (CurrentEntry->NameLength > (CSHORT)NameCount) { /* Not a match, move to the next entry */ PreviousEntry = CurrentEntry; @@ -334,7 +319,7 @@ } /* Check if we did find a tree by now */ - if (CurrentEntry->NameLength != NameCount) + if (CurrentEntry->NameLength != (CSHORT)NameCount) { /* We didn't, so insert a new entry in the list */ PreviousEntry->NextPrefixTree = PrefixTableEntry; @@ -345,11 +330,10 @@ PrefixTableEntry->CaseMatch = PrefixTableEntry; /* Quick return */ - DPRINT("RtlInsertUnicodePrefix TRUE\n"); return TRUE; } - /* We found a tree, so star thte search loop */ + /* We found a tree, so start the search loop */ Entry = CurrentEntry; while (TRUE) { @@ -368,7 +352,6 @@ (GenericEqual)) { /* We must fail the insert: it already exists */ - DPRINT("RtlInsertUnicodePrefix FALSE\n"); return FALSE; } @@ -461,8 +444,7 @@ Entry->NextPrefixTree = NextEntry; /* Return success */ - DPRINT("RtlInsertUnicodePrefix TRUE\n"); - return TRUE; + return TRUE; } /* @@ -475,7 +457,6 @@ { PRTL_SPLAY_LINKS SplayLinks; PUNICODE_PREFIX_TABLE_ENTRY Entry, CaseMatchEntry; - DPRINT("RtlNextUnicodePrefix\n"); /* We might need this entry 2/3rd of the time, so cache it now */ CaseMatchEntry = PrefixTable->LastNextEntry->CaseMatch; @@ -534,7 +515,6 @@ /* Save this entry as the last one returned, and return it */ PrefixTable->LastNextEntry = Entry; - DPRINT("RtlNextUnicodePrefix: %p\n", Entry); return Entry; } @@ -548,7 +528,6 @@ { PUNICODE_PREFIX_TABLE_ENTRY Entry, RefEntry, NewEntry; PRTL_SPLAY_LINKS SplayLinks; - DPRINT("RtlRemoveUnicodePrefix\n"); /* Erase the last entry */ PrefixTable->LastNextEntry = NULL;
17 years, 9 months
1
0
0
0
[ion] 25942: - Merge from KD-branch: - Remove double implementation of DebugPrint with a single correct implementation which calls DebugService, and moved DebugPrint to rtl since it can now be shared properly.
by ion@svn.reactos.org
Author: ion Date: Fri Mar 2 09:11:27 2007 New Revision: 25942 URL:
http://svn.reactos.org/svn/reactos?rev=25942&view=rev
Log: - Merge from KD-branch: - Remove double implementation of DebugPrint with a single correct implementation which calls DebugService, and moved DebugPrint to rtl since it can now be shared properly. Modified: trunk/reactos/dll/ntdll/dbg/dbgui.c trunk/reactos/lib/rtl/debug.c trunk/reactos/ntoskrnl/rtl/misc.c Modified: trunk/reactos/dll/ntdll/dbg/dbgui.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/dbg/dbgui.c?rev=…
============================================================================== --- trunk/reactos/dll/ntdll/dbg/dbgui.c (original) +++ trunk/reactos/dll/ntdll/dbg/dbgui.c Fri Mar 2 09:11:27 2007 @@ -13,28 +13,6 @@ #include <debug.h> /* FUNCTIONS *****************************************************************/ - -NTSTATUS -NTAPI -DebugService(IN ULONG Service, - IN PVOID Buffer, - IN ULONG Length, - IN PVOID Argument1, - IN PVOID Argument2); - -NTSTATUS -NTAPI -DebugPrint(IN PANSI_STRING DebugString, - IN ULONG ComponentId, - IN ULONG Level) -{ - /* Call the INT2D Service */ - return DebugService(BREAKPOINT_PRINT, - DebugString->Buffer, - DebugString->Length, - UlongToPtr(ComponentId), - UlongToPtr(Level)); -} /* * @implemented Modified: trunk/reactos/lib/rtl/debug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/debug.c?rev=25942&…
============================================================================== --- trunk/reactos/lib/rtl/debug.c (original) +++ trunk/reactos/lib/rtl/debug.c Fri Mar 2 09:11:27 2007 @@ -16,7 +16,6 @@ /* PRIVATE FUNCTIONS ********************************************************/ -#if 0 NTSTATUS NTAPI DebugPrint(IN PANSI_STRING DebugString, @@ -28,15 +27,8 @@ DebugString->Buffer, DebugString->Length, UlongToPtr(ComponentId), - UlongToPtr(Level)); -} -#else -NTSTATUS -NTAPI -DebugPrint(IN PANSI_STRING DebugString, - IN ULONG ComponentId, - IN ULONG Level); -#endif + UlongToPtr(Level)); +} NTSTATUS NTAPI Modified: trunk/reactos/ntoskrnl/rtl/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/rtl/misc.c?rev=25…
============================================================================== --- trunk/reactos/ntoskrnl/rtl/misc.c (original) +++ trunk/reactos/ntoskrnl/rtl/misc.c Fri Mar 2 09:11:27 2007 @@ -22,17 +22,6 @@ extern ULONG NtOSCSDVersion; /* FUNCTIONS *****************************************************************/ - -NTSTATUS -NTAPI -DebugPrint(IN PANSI_STRING DebugString, - IN ULONG ComponentId, - IN ULONG Level) -{ - /* Temporary hack */ - KdpPrintString(DebugString->Buffer, DebugString->Length); - return STATUS_SUCCESS; -} /* * @implemented
17 years, 9 months
1
0
0
0
[ion] 25941: - Create PDE/PTE entries for KUSER_SHARED_DATA in FreeLDR, so that MmInit1 isn't needed to access it. - This allows us to access SharedUserData much earlier in the kernel, as well as in kdcom, which means the Windows/TinyKRNL version should now work without modification.
by ion@svn.reactos.org
Author: ion Date: Fri Mar 2 09:01:07 2007 New Revision: 25941 URL:
http://svn.reactos.org/svn/reactos?rev=25941&view=rev
Log: - Create PDE/PTE entries for KUSER_SHARED_DATA in FreeLDR, so that MmInit1 isn't needed to access it. - This allows us to access SharedUserData much earlier in the kernel, as well as in kdcom, which means the Windows/TinyKRNL version should now work without modification. Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/loader.c trunk/reactos/boot/freeldr/freeldr/arch/i386/mb.S trunk/reactos/boot/freeldr/freeldr/include/reactos.h trunk/reactos/ntoskrnl/ke/i386/kiinit.c Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/loader.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/loader.c (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/loader.c Fri Mar 2 09:01:07 2007 @@ -40,9 +40,10 @@ extern PAGE_DIRECTORY_X86 startup_pagedirectory; extern PAGE_DIRECTORY_X86 lowmem_pagetable; extern PAGE_DIRECTORY_X86 kernel_pagetable; -extern ULONG_PTR hyperspace_pagetable; +extern PAGE_DIRECTORY_X86 hyperspace_pagetable; extern PAGE_DIRECTORY_X86 apic_pagetable; extern PAGE_DIRECTORY_X86 kpcr_pagetable; +extern PAGE_DIRECTORY_X86 kuser_pagetable; PVOID NTAPI @@ -183,6 +184,11 @@ PageDir->Pde[KpcrPageTableIndex].Valid = 1; PageDir->Pde[KpcrPageTableIndex].Write = 1; PageDir->Pde[KpcrPageTableIndex].PageFrameNumber = PaPtrToPfn(kpcr_pagetable); + + /* Set up the KUSER PDE */ + PageDir->Pde[KuserPageTableIndex].Valid = 1; + PageDir->Pde[KuserPageTableIndex].Write = 1; + PageDir->Pde[KuserPageTableIndex].PageFrameNumber = PaPtrToPfn(kuser_pagetable); /* Set up Low Memory PTEs */ PageDir = (PPAGE_DIRECTORY_X86)&lowmem_pagetable; @@ -221,6 +227,17 @@ PageDir->Pde[0].Valid = 1; PageDir->Pde[0].Write = 1; PageDir->Pde[0].PageFrameNumber = 1; + + /* Setup KUSER PTEs */ + PageDir = (PPAGE_DIRECTORY_X86)&kuser_pagetable; + for (i = 0; i < 1024; i++) + { + /* SEetup each entry */ + PageDir->Pde[i].Valid = 1; + PageDir->Pde[i].Write = 1; + PageDir->Pde[i].Owner = 1; + PageDir->Pde[i].PageFrameNumber = PaToPfn(KI_USER_SHARED_DATA + i * PAGE_SIZE); + } } PLOADER_MODULE Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/mb.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/mb.S (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/mb.S Fri Mar 2 09:01:07 2007 @@ -37,15 +37,8 @@ .globl _hyperspace_pagetable .globl _apic_pagetable .globl _kpcr_pagetable + .globl _kuser_pagetable - .globl _startup_pagedirectorytable_pae - .globl _startup_pagedirectory_pae - .globl _lowmem_pagetable_pae - .globl _kernel_pagetable_pae - .globl _hyperspace_pagetable_pae - .globl _apic_pagetable_pae - .globl _kpcr_pagetable_pae - .globl _PageDirectoryEnd // @@ -80,24 +73,7 @@ _kpcr_pagetable: .fill 4096, 1, 0 -_startup_pagedirectory_pae: - .fill 4 * 4096, 1, 0 +_kuser_pagetable: + .fill 4096, 1, 0 -_lowmem_pagetable_pae: - .fill 2 * 4096, 1, 0 - -_kernel_pagetable_pae: - .fill 3*4096, 1, 0 - -_hyperspace_pagetable_pae: - .fill 2*4096, 1, 0 - -_apic_pagetable_pae: - .fill 2*4096, 1, 0 - -_kpcr_pagetable_pae: - .fill 4*4096, 1, 0 - -_startup_pagedirectorytable_pae: - .fill 4096, 1, 0 _PageDirectoryEnd: Modified: trunk/reactos/boot/freeldr/freeldr/include/reactos.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/reactos.h (original) +++ trunk/reactos/boot/freeldr/freeldr/include/reactos.h Fri Mar 2 09:01:07 2007 @@ -53,6 +53,7 @@ #define HyperspacePageTableIndex (HYPERSPACE_BASE >> 22) #define KpcrPageTableIndex (KPCR_BASE >> 22) #define ApicPageTableIndex (APIC_BASE >> 22) +#define KuserPageTableIndex (KI_USER_SHARED_DATA >> 22) #define KernelEntryPoint (KernelEntry - KERNEL_BASE_PHYS) + KernelBase Modified: trunk/reactos/ntoskrnl/ke/i386/kiinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/kiinit.c?…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/kiinit.c (original) +++ trunk/reactos/ntoskrnl/ke/i386/kiinit.c Fri Mar 2 09:01:07 2007 @@ -381,7 +381,6 @@ ULONG FeatureBits; LARGE_INTEGER PageDirectory; PVOID DpcStack; - ULONG NXSupportPolicy; ULONG Vendor[3]; /* Detect and set the CPU Type */ @@ -403,19 +402,19 @@ FeatureBits = KiGetFeatureBits(); /* Set the default NX policy (opt-in) */ - NXSupportPolicy = NX_SUPPORT_POLICY_OPTIN; + SharedUserData->NXSupportPolicy = NX_SUPPORT_POLICY_OPTIN; /* Check if NPX is always on */ if (strstr(KeLoaderBlock->LoadOptions, "NOEXECUTE=ALWAYSON")) { /* Set it always on */ - NXSupportPolicy = NX_SUPPORT_POLICY_ALWAYSON; + SharedUserData->NXSupportPolicy = NX_SUPPORT_POLICY_ALWAYSON; FeatureBits |= KF_NX_ENABLED; } else if (strstr(KeLoaderBlock->LoadOptions, "NOEXECUTE=OPTOUT")) { /* Set it in opt-out mode */ - NXSupportPolicy = NX_SUPPORT_POLICY_OPTOUT; + SharedUserData->NXSupportPolicy = NX_SUPPORT_POLICY_OPTOUT; FeatureBits |= KF_NX_ENABLED; } else if ((strstr(KeLoaderBlock->LoadOptions, "NOEXECUTE=OPTIN")) || @@ -428,7 +427,7 @@ (strstr(KeLoaderBlock->LoadOptions, "EXECUTE"))) { /* Set disabled mode */ - NXSupportPolicy = NX_SUPPORT_POLICY_ALWAYSOFF; + SharedUserData->NXSupportPolicy = NX_SUPPORT_POLICY_ALWAYSOFF; FeatureBits |= KF_NX_DISABLED; } @@ -533,9 +532,6 @@ 0, 4096); - /* Set the NX Support policy */ - SharedUserData->NXSupportPolicy = (UCHAR)NXSupportPolicy; - /* Set basic CPU Features that user mode can read */ SharedUserData->ProcessorFeatures[PF_MMX_INSTRUCTIONS_AVAILABLE] = (KeFeatureBits & KF_MMX) ? TRUE: FALSE;
17 years, 9 months
1
0
0
0
[greatlrd] 25940: merges part of 25937 the changes for fixed some issue with seh by alex This solv some of the inifiloop I got with seh, but not all
by greatlrd@svn.reactos.org
Author: greatlrd Date: Fri Mar 2 03:42:34 2007 New Revision: 25940 URL:
http://svn.reactos.org/svn/reactos?rev=25940&view=rev
Log: merges part of 25937 the changes for fixed some issue with seh by alex This solv some of the inifiloop I got with seh, but not all Modified: branches/ros-branch-0_3_1/reactos/include/ndk/asm.h branches/ros-branch-0_3_1/reactos/include/ndk/ketypes.h branches/ros-branch-0_3_1/reactos/ntoskrnl/ke/except.c branches/ros-branch-0_3_1/reactos/ntoskrnl/ke/i386/exp.c branches/ros-branch-0_3_1/reactos/ntoskrnl/ke/i386/trap.s Modified: branches/ros-branch-0_3_1/reactos/include/ndk/asm.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/includ…
============================================================================== --- branches/ros-branch-0_3_1/reactos/include/ndk/asm.h (original) +++ branches/ros-branch-0_3_1/reactos/include/ndk/asm.h Fri Mar 2 03:42:34 2007 @@ -479,8 +479,10 @@ #define DR6_LEGAL 0xE00F #define DR7_LEGAL 0xFFFF0155 #define DR7_ACTIVE 0x55 +#define DR7_OVERRIDE_V 0x04 #define DR7_RESERVED_MASK 0xDC00 #define DR7_OVERRIDE_MASK 0xF0000 + // // Usermode callout frame definitions @@ -589,3 +591,4 @@ #define MAXIMUM_IDTVECTOR 0xFF #endif // !_ASM_H + Modified: branches/ros-branch-0_3_1/reactos/include/ndk/ketypes.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/includ…
============================================================================== --- branches/ros-branch-0_3_1/reactos/include/ndk/ketypes.h (original) +++ branches/ros-branch-0_3_1/reactos/include/ndk/ketypes.h Fri Mar 2 03:42:34 2007 @@ -89,6 +89,12 @@ #define KF_XMMI64 0x00010000 #define KF_NX_DISABLED 0x00400000 #define KF_NX_ENABLED 0x00800000 + +// +// Internal Exception Codes +// +#define KI_EXCEPTION_INTERNAL 0x10000000 +#define KI_EXCEPTION_ACCESS_VIOLATION (KI_EXCEPTION_INTERNAL | 0x04) // // KPCR Access for non-IA64 builds @@ -281,6 +287,17 @@ } KTHREAD_STATE, *PKTHREAD_STATE; // +// Continue Status +// +typedef enum _KCONTINUE_STATUS +{ + ContinueError = 0, + ContinueSuccess, + ContinueProcessorReselected, + ContinueNextProcessor + } KCONTINUE_STATUS; + +// // Process States // typedef enum _KPROCESS_STATE Modified: branches/ros-branch-0_3_1/reactos/ntoskrnl/ke/except.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/ntoskr…
============================================================================== --- branches/ros-branch-0_3_1/reactos/ntoskrnl/ke/except.c (original) +++ branches/ros-branch-0_3_1/reactos/ntoskrnl/ke/except.c Fri Mar 2 03:42:34 2007 @@ -144,9 +144,8 @@ } _SEH_END; - /* Make sure we didn't crash in SEH */ - if (NT_SUCCESS(Status)) - { + if (!NT_SUCCESS(Status)) return Status; + /* Convert the context record */ KeContextToTrapFrame(Context, ExceptionFrame, @@ -155,12 +154,13 @@ PreviousMode); /* Dispatch the exception */ + ExceptionRecord->ExceptionCode &= ~KI_EXCEPTION_INTERNAL; + KiDispatchException(ExceptionRecord, ExceptionFrame, TrapFrame, PreviousMode, SearchFrames); - } /* Return the status */ return Status; Modified: branches/ros-branch-0_3_1/reactos/ntoskrnl/ke/i386/exp.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/ntoskr…
============================================================================== --- branches/ros-branch-0_3_1/reactos/ntoskrnl/ke/i386/exp.c (original) +++ branches/ros-branch-0_3_1/reactos/ntoskrnl/ke/i386/exp.c Fri Mar 2 03:42:34 2007 @@ -90,7 +90,7 @@ ULONG DebugMask = KeGetCurrentThread()->DispatcherHeader.DebugActive; /* Check if debugging is enabled */ - if (DebugMask & DR_ACTIVE_MASK) + if (DebugMask & DR_MASK(DR7_OVERRIDE_V)) { /* Sanity checks */ ASSERT((DebugMask & DR_REG_MASK) != 0); @@ -133,11 +133,11 @@ Result = FALSE; /* Check the DR mask */ - NewMask &= 0x7F; + NewMask &= ~(DR_MASK(7)); if (NewMask & DR_REG_MASK) { /* Set the active mask */ - NewMask |= DR_ACTIVE_MASK; + NewMask |= DR_MASK(DR7_OVERRIDE_V); /* Set DR7 override */ *DrMask = DR7_OVERRIDE_MASK; @@ -154,8 +154,8 @@ Result = NewMask ? TRUE: FALSE; /* Update the mask to disable debugging */ - NewMask &= ~DR_ACTIVE_MASK; - NewMask |= 0x80; + NewMask &= ~(DR_MASK(DR7_OVERRIDE_V)); + NewMask |= DR_MASK(7); } /* Check if caller wants the new mask */ @@ -1046,3 +1046,4 @@ return (NTSTATUS)OldEip; } + Modified: branches/ros-branch-0_3_1/reactos/ntoskrnl/ke/i386/trap.s URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/ntoskr…
============================================================================== --- branches/ros-branch-0_3_1/reactos/ntoskrnl/ke/i386/trap.s (original) +++ branches/ros-branch-0_3_1/reactos/ntoskrnl/ke/i386/trap.s Fri Mar 2 03:42:34 2007 @@ -484,7 +484,7 @@ /* Call debug service dispatcher */ mov eax, [ebp+KTRAP_FRAME_EAX] mov ecx, [ebp+KTRAP_FRAME_ECX] - mov edx, [ebp+KTRAP_FRAME_EAX] + mov edx, [ebp+KTRAP_FRAME_EDX] /* Check for V86 mode */ test dword ptr [ebp+KTRAP_FRAME_EFLAGS], EFLAGS_V86_MASK @@ -639,7 +639,7 @@ mov [esp+EXCEPTION_RECORD_NUMBER_PARAMETERS], ecx /* Check parameter count */ - cmp eax, 0 + cmp ecx, 0 jz NoParams /* Get information */ @@ -841,7 +841,6 @@ /* Setup EIP, NTSTATUS and parameter count, then dispatch */ mov ebx, [ebp+KTRAP_FRAME_EIP] dec ebx - mov eax, STATUS_BREAKPOINT mov ecx, 3 call _CommonDispatchException
17 years, 9 months
1
0
0
0
← Newer
1
...
25
26
27
28
29
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
Results per page:
10
25
50
100
200