Merge MMerge 34969 from ros-amd64-bringup branch:
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Wed, 27 Aug 2008 22:40:17 +0000 (22:40 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Wed, 27 Aug 2008 22:40:17 +0000 (22:40 +0000)
- Fix parameter types of NtQuery/SetSystemInformation, ExInitialize(N)PagedLookasideList, KeBugCheckWithTf, IoGetstackLimits
- Use ALIGN_UP_POINTER for a pointer
- Fix pointer to ULONG cast

svn path=/trunk/; revision=35715

reactos/include/ndk/exfuncs.h
reactos/ntoskrnl/ex/lookas.c
reactos/ntoskrnl/include/internal/ke.h
reactos/ntoskrnl/io/iomgr/error.c
reactos/ntoskrnl/io/iomgr/util.c
reactos/ntoskrnl/ps/thread.c

index b3ca9a4..b4f54fb 100644 (file)
@@ -390,8 +390,8 @@ NTAPI
 NtQuerySystemInformation(
     IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
     OUT PVOID SystemInformation,
-    IN SIZE_T Length,
-    OUT PSIZE_T ResultLength
+    IN ULONG Length,
+    OUT PULONG ResultLength
 );
 
 NTSYSCALLAPI
@@ -539,7 +539,7 @@ NTAPI
 NtSetSystemInformation(
     IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
     IN PVOID SystemInformation,
-    IN SIZE_T SystemInformationLength
+    IN ULONG SystemInformationLength
 );
 
 NTSYSCALLAPI
index b733840..f32e249 100644 (file)
@@ -222,7 +222,7 @@ ExInitializeNPagedLookasideList(IN PNPAGED_LOOKASIDE_LIST Lookaside,
                                 IN PALLOCATE_FUNCTION Allocate OPTIONAL,
                                 IN PFREE_FUNCTION Free OPTIONAL,
                                 IN ULONG Flags,
-                                IN ULONG Size,
+                                IN SIZE_T Size,
                                 IN ULONG Tag,
                                 IN USHORT Depth)
 {
@@ -274,7 +274,7 @@ ExInitializePagedLookasideList(IN PPAGED_LOOKASIDE_LIST Lookaside,
                                IN PALLOCATE_FUNCTION Allocate OPTIONAL,
                                IN PFREE_FUNCTION Free OPTIONAL,
                                IN ULONG Flags,
-                               IN ULONG Size,
+                               IN SIZE_T Size,
                                IN ULONG Tag,
                                IN USHORT Depth)
 {
index 4dfb18a..c3f2880 100644 (file)
@@ -742,10 +742,10 @@ VOID
 NTAPI
 KeBugCheckWithTf(
     ULONG BugCheckCode,
-    ULONG BugCheckParameter1,
-    ULONG BugCheckParameter2,
-    ULONG BugCheckParameter3,
-    ULONG BugCheckParameter4,
+    ULONG_PTR BugCheckParameter1,
+    ULONG_PTR BugCheckParameter2,
+    ULONG_PTR BugCheckParameter3,
+    ULONG_PTR BugCheckParameter4,
     PKTRAP_FRAME Tf
 );
 
index 69c9cca..3d2065f 100644 (file)
@@ -214,10 +214,10 @@ IopLogWorker(IN PVOID Parameter)
         }
 
         /* Align the buffer */
-        StringBuffer = (PVOID)ALIGN_UP(StringBuffer, WCHAR);
+        StringBuffer = ALIGN_UP_POINTER(StringBuffer, WCHAR);
 
         /* Set the offset for the driver's name to the current buffer */
-        ErrorMessage->DriverNameOffset = (ULONG)(StringBuffer -
+        ErrorMessage->DriverNameOffset = (ULONG_PTR)(StringBuffer -
                                                  (ULONG_PTR)ErrorMessage);
 
         /* Check how much space we have left for the device string */
index 02e9712..7b9b18b 100644 (file)
@@ -48,8 +48,8 @@ IoGetInitialStack(VOID)
  */
 VOID
 NTAPI
-IoGetStackLimits(OUT PULONG LowLimit,
-                 OUT PULONG HighLimit)
+IoGetStackLimits(OUT PULONG_PTR LowLimit,
+                 OUT PULONG_PTR HighLimit)
 {
     PKPRCB Prcb = KeGetCurrentPrcb();
     ULONG_PTR DpcStack = (ULONG_PTR)(Prcb->DpcStack);
index 8d64809..6de4bfc 100644 (file)
@@ -104,7 +104,7 @@ PspUserThreadStartup(IN PKSTART_ROUTINE StartRoutine,
         Prcb = KeGetCurrentPrcb();
         NewCookie = Prcb->MmPageFaultCount ^ Prcb->InterruptTime ^
                     SystemTime.u.LowPart ^ SystemTime.u.HighPart ^
-                    (ULONG)&SystemTime;
+                    (ULONG_PTR)&SystemTime;
 
         /* Set the new cookie*/
         InterlockedCompareExchange((LONG*)&SharedUserData->Cookie,
@@ -333,6 +333,9 @@ PspCreateThread(OUT PHANDLE ThreadHandle,
 #elif defined(_M_ARM)
         Thread->StartAddress = (PVOID)ThreadContext->Pc;
         Thread->Win32StartAddress = (PVOID)ThreadContext->R0;
+#elif defined(_M_AMD64)
+        Thread->StartAddress = (PVOID)ThreadContext->Rip;
+        Thread->Win32StartAddress = (PVOID)ThreadContext->Rax;
 #else
 #error Unknown architecture
 #endif