Author: fireball
Date: Thu Jan 17 02:19:01 2008
New Revision: 31835
URL:
http://svn.reactos.org/svn/reactos?rev=31835&view=rev
Log:
- Sync NDK changes.
Modified:
trunk/reactos/include/ndk/arch/mmtypes.h
trunk/reactos/include/ndk/asm.h
trunk/reactos/include/ndk/cmtypes.h
trunk/reactos/include/ndk/extypes.h
trunk/reactos/include/ndk/iotypes.h
trunk/reactos/include/ndk/ketypes.h
trunk/reactos/include/ndk/mmtypes.h
trunk/reactos/include/ndk/rtlfuncs.h
trunk/reactos/include/ndk/rtltypes.h
trunk/reactos/include/ndk/umfuncs.h
trunk/reactos/include/psdk/winnt.h
trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S
trunk/reactos/ntoskrnl/ke/i386/trap.s
Modified: trunk/reactos/include/ndk/arch/mmtypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/arch/mmtypes.h…
==============================================================================
--- trunk/reactos/include/ndk/arch/mmtypes.h (original)
+++ trunk/reactos/include/ndk/arch/mmtypes.h Thu Jan 17 02:19:01 2008
@@ -22,7 +22,7 @@
//
// Include the right file for this architecture.
//
-#ifdef _M_IX86
+#if defined(_M_IX86) || defined(_M_AMD64)
#include <i386/mmtypes.h>
#elif defined(_M_PPC)
#include <powerpc/mmtypes.h>
Modified: trunk/reactos/include/ndk/asm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/asm.h?rev=3183…
==============================================================================
--- trunk/reactos/include/ndk/asm.h (original)
+++ trunk/reactos/include/ndk/asm.h Thu Jan 17 02:19:01 2008
@@ -108,7 +108,7 @@
#define KTHREAD_PENDING_USER_APC 0x28 + 0x16
#define KTHREAD_PENDING_KERNEL_APC 0x28 + 0x15
#define KTHREAD_CONTEXT_SWITCHES 0x48
-#define KTHREAD_STATE 0x4C
+#define KTHREAD_STATE_ 0x4C
#define KTHREAD_NPX_STATE 0x4D
#define KTHREAD_WAIT_IRQL 0x4E
#define KTHREAD_NEXT_PROCESSOR 0x40
@@ -615,3 +615,4 @@
+
Modified: trunk/reactos/include/ndk/cmtypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/cmtypes.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/cmtypes.h (original)
+++ trunk/reactos/include/ndk/cmtypes.h Thu Jan 17 02:19:01 2008
@@ -227,6 +227,12 @@
WCHAR Class[1];
} KEY_FULL_INFORMATION, *PKEY_FULL_INFORMATION;
+typedef struct _KEY_NAME_INFORMATION
+{
+ WCHAR Name[1];
+} KEY_NAME_INFORMATION, *PKEY_NAME_INFORMATION;
+
+
typedef struct _KEY_NODE_INFORMATION
{
LARGE_INTEGER LastWriteTime;
@@ -519,3 +525,4 @@
#endif // _CMTYPES_H
+
Modified: trunk/reactos/include/ndk/extypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/extypes.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/extypes.h (original)
+++ trunk/reactos/include/ndk/extypes.h Thu Jan 17 02:19:01 2008
@@ -737,9 +737,9 @@
ULONG LowestPhysicalPageNumber;
ULONG HighestPhysicalPageNumber;
ULONG AllocationGranularity;
- ULONG MinimumUserModeAddress;
- ULONG MaximumUserModeAddress;
- KAFFINITY ActiveProcessorsAffinityMask;
+ ULONG_PTR MinimumUserModeAddress;
+ ULONG_PTR MaximumUserModeAddress;
+ ULONG_PTR ActiveProcessorsAffinityMask;
CCHAR NumberOfProcessors;
} SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
@@ -1454,5 +1454,20 @@
ULONG TableBufferLength;
UCHAR TableBuffer[1];
} SYSTEM_FIRMWARE_TABLE_INFORMATION, *PSYSTEM_FIRMWARE_TABLE_INFORMATION;
+
+//
+// Class 81
+//
+typedef struct _SYSTEM_MEMORY_LIST_INFORMATION
+{
+ SIZE_T ZeroPageCount;
+ SIZE_T FreePageCount;
+ SIZE_T ModifiedPageCount;
+ SIZE_T ModifiedNoWritePageCount;
+ SIZE_T BadPageCount;
+ SIZE_T PageCountByPriority[8];
+ SIZE_T RepurposedPagesByPriority[8];
+} SYSTEM_MEMORY_LIST_INFORMATION, *PSYSTEM_MEMORY_LIST_INFORMATION;
+
#endif
#endif
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 Thu Jan 17 02:19:01 2008
@@ -15,7 +15,6 @@
Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
--*/
-
#ifndef _IOTYPES_H
#define _IOTYPES_H
@@ -354,6 +353,19 @@
#ifdef NTOS_MODE_USER
//
+// I/O Status Block
+//
+typedef struct _IO_STATUS_BLOCK
+{
+ union
+ {
+ NTSTATUS Status;
+ PVOID Pointer;
+ };
+ ULONG_PTR Information;
+} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
+
+//
// File Information structures for NtQueryInformationFile
//
typedef struct _FILE_BASIC_INFORMATION
@@ -560,6 +572,13 @@
WCHAR FileName[1];
} FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION;
+typedef struct _FILE_IO_COMPLETION_INFORMATION
+{
+ PVOID KeyContext;
+ PVOID ApcContext;
+ IO_STATUS_BLOCK IoStatusBlock;
+} FILE_IO_COMPLETION_INFORMATION, *PFILE_IO_COMPLETION_INFORMATION;
+
//
// File System Information structures for NtQueryInformationFile
//
@@ -628,19 +647,6 @@
ULONG MessageLength;
CHAR Data[1];
} FILE_PIPE_PEEK_BUFFER, *PFILE_PIPE_PEEK_BUFFER;
-
-//
-// I/O Status Block
-//
-typedef struct _IO_STATUS_BLOCK
-{
- union
- {
- NTSTATUS Status;
- PVOID Pointer;
- };
- ULONG_PTR Information;
-} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
//
// I/O Error Log Structures
Modified: trunk/reactos/include/ndk/ketypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/ketypes.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/ketypes.h (original)
+++ trunk/reactos/include/ndk/ketypes.h Thu Jan 17 02:19:01 2008
@@ -289,9 +289,42 @@
Transition,
DeferredReady,
#if (NTDDI_VERSION >= NTDDI_WS03)
- GateWait,
+ GateWait
#endif
} KTHREAD_STATE, *PKTHREAD_STATE;
+
+//
+// Kernel Object Types
+//
+typedef enum _KOBJECTS
+{
+ EventNotificationObject = 0,
+ EventSynchronizationObject = 1,
+ MutantObject = 2,
+ ProcessObject = 3,
+ QueueObject = 4,
+ SemaphoreObject = 5,
+ ThreadObject = 6,
+ GateObject = 7,
+ TimerNotificationObject = 8,
+ TimerSynchronizationObject = 9,
+ Spare2Object = 10,
+ Spare3Object = 11,
+ Spare4Object = 12,
+ Spare5Object = 13,
+ Spare6Object = 14,
+ Spare7Object = 15,
+ Spare8Object = 16,
+ Spare9Object = 17,
+ ApcObject = 18,
+ DpcObject = 19,
+ DeviceQueueObject = 20,
+ EventPairObject = 21,
+ InterruptObject = 22,
+ ProfileObject = 23,
+ ThreadedDpcObject = 24,
+ MaximumKernelObject = 25
+} KOBJECTS;
//
// Adjust reasons
@@ -668,39 +701,6 @@
} KEXECUTE_OPTIONS, *PKEXECUTE_OPTIONS;
//
-// Kernel Object Types
-//
-typedef enum _KOBJECTS
-{
- EventNotificationObject = 0,
- EventSynchronizationObject = 1,
- MutantObject = 2,
- ProcessObject = 3,
- QueueObject = 4,
- SemaphoreObject = 5,
- ThreadObject = 6,
- GateObject = 7,
- TimerNotificationObject = 8,
- TimerSynchronizationObject = 9,
- Spare2Object = 10,
- Spare3Object = 11,
- Spare4Object = 12,
- Spare5Object = 13,
- Spare6Object = 14,
- Spare7Object = 15,
- Spare8Object = 16,
- Spare9Object = 17,
- ApcObject = 18,
- DpcObject = 19,
- DeviceQueueObject = 20,
- EventPairObject = 21,
- InterruptObject = 22,
- ProfileObject = 23,
- ThreadedDpcObject = 24,
- MaximumKernelObject = 25
-} KOBJECTS;
-
-//
// Kernel Thread (KTHREAD)
//
typedef struct _KTHREAD
@@ -709,6 +709,7 @@
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
ULONGLONG CycleTime;
ULONG HighCycleTime;
+ ULONGLONG QuantumTarget;
#else
LIST_ENTRY MutantListHead;
#endif
@@ -741,8 +742,26 @@
PKWAIT_BLOCK WaitBlockList;
PKGATE GateObject;
};
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ union
+ {
+ struct
+ {
+ ULONG KernelStackResident:1;
+ ULONG ReadyTransition:1;
+ ULONG ProcessReadyQueue:1;
+ ULONG WaitNext:1;
+ ULONG SystemAffinityActive:1;
+ ULONG Alertable:1;
+ ULONG GdiFlushActive:1;
+ ULONG Reserved:25;
+ };
+ LONG MiscFlags;
+ };
+#else
BOOLEAN Alertable;
BOOLEAN WaitNext;
+#endif
UCHAR WaitReason;
SCHAR Priority;
BOOLEAN EnableStackSwap;
@@ -796,7 +815,11 @@
struct
{
UCHAR WaitBlockFill0[23];
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ UCHAR IdealProcessor;
+#else
BOOLEAN SystemAffinityActive;
+#endif
};
struct
{
@@ -822,31 +845,22 @@
PVOID CallbackStack;
PVOID ServiceTable;
UCHAR ApcStateIndex;
+#if (NTDDI_VERSION < NTDDI_LONGHORN)
UCHAR IdealProcessor;
+#endif
BOOLEAN Preempted;
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
BOOLEAN CalloutActive;
#else
BOOLEAN ProcessReadyQueue;
-#endif
BOOLEAN KernelStackResident;
+#endif
SCHAR BasePriority;
SCHAR PriorityDecrement;
CHAR Saturation;
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
ULONG SystemCallNumber;
- union
- {
- struct
- {
- ULONG Reserved0:1;
- ULONG ReadyTransition:1;
- ULONG ProcessReadyQueue:1;
- ULONG Reserved2:1;
- ULONG Reserved3:28;
- };
- LONG MiscFlags;
- };
+ ULONG Spare2;
#endif
KAFFINITY UserAffinity;
struct _KPROCESS *Process;
Modified: trunk/reactos/include/ndk/mmtypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/mmtypes.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/mmtypes.h (original)
+++ trunk/reactos/include/ndk/mmtypes.h Thu Jan 17 02:19:01 2008
@@ -46,6 +46,22 @@
//
#define TAG(A, B, C, D) \
(ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
+
+//
+// PFN Identity Uses
+//
+#define MMPFNUSE_PROCESSPRIVATE 0
+#define MMPFNUSE_FILE 1
+#define MMPFNUSE_PAGEFILEMAPPED 2
+#define MMPFNUSE_PAGETABLE 3
+#define MMPFNUSE_PAGEDPOOL 4
+#define MMPFNUSE_NONPAGEDPOOL 5
+#define MMPFNUSE_SYSTEMPTE 6
+#define MMPFNUSE_SESSIONPRIVATE 7
+#define MMPFNUSE_METAFILE 8
+#define MMPFNUSE_AWEPAGE 9
+#define MMPFNUSE_DRIVERLOCKPAGE 10
+#define MMPFNUSE_KERNELSTACK 11
#ifndef NTOS_MODE_USER
@@ -106,6 +122,21 @@
#endif
//
+// Memory Manager Page Lists
+//
+typedef enum _MMLISTS
+{
+ ZeroedPageList = 0,
+ FreePageList = 1,
+ StandbyPageList = 2,
+ ModifiedPageList = 3,
+ ModifiedNoWritePageList = 4,
+ BadPageList = 5,
+ ActiveAndValid = 6,
+ TransitionPage = 7
+} MMLISTS;
+
+//
// Per Processor Non Paged Lookaside List IDs
//
typedef enum _PP_NPAGED_LOOKASIDE_NUMBER
@@ -176,6 +207,68 @@
SIZE_T PrivateUsage;
} VM_COUNTERS_EX, *PVM_COUNTERS_EX;
#endif
+
+//
+// Sub-Information Types for PFN Identity
+//
+typedef struct _MEMORY_FRAME_INFORMATION
+{
+ ULONGLONG UseDescription:4;
+ ULONGLONG ListDescription:3;
+ ULONGLONG Reserved0:1;
+ ULONGLONG Pinned:1;
+ ULONGLONG DontUse:48;
+ ULONGLONG Priority:3;
+ ULONGLONG Reserved:4;
+} MEMORY_FRAME_INFORMATION, *PMEMORY_FRAME_INFORMATION;
+
+typedef struct _FILEOFFSET_INFORMATION
+{
+ ULONGLONG DontUse:9;
+ ULONGLONG Offset:48;
+ ULONGLONG Reserved:7;
+} FILEOFFSET_INFORMATION, *PFILEOFFSET_INFORMATION;
+
+typedef struct _PAGEDIR_INFORMATION
+{
+ ULONGLONG DontUse:9;
+ ULONGLONG PageDirectoryBase:48;
+ ULONGLONG Reserved:7;
+} PAGEDIR_INFORMATION, *PPAGEDIR_INFORMATION;
+
+typedef struct _UNIQUE_PROCESS_INFORMATION
+{
+ ULONGLONG DontUse:9;
+ ULONGLONG UniqueProcessKey:48;
+ ULONGLONG Reserved:7;
+} UNIQUE_PROCESS_INFORMATION, *PUNIQUE_PROCESS_INFORMATION;
+
+//
+// PFN Identity Data Structure
+//
+typedef struct _MMPFN_IDENTITY
+{
+ union
+ {
+ MEMORY_FRAME_INFORMATION e1;
+ FILEOFFSET_INFORMATION e2;
+ PAGEDIR_INFORMATION e3;
+ UNIQUE_PROCESS_INFORMATION e4;
+ } u1;
+ SIZE_T PageFrameIndex;
+ union
+ {
+ struct
+ {
+ ULONG Image:1;
+ ULONG Mismatch:1;
+ } e1;
+ PVOID FileObject;
+ PVOID UniqueFileObjectKey;
+ PVOID ProtoPteAddress;
+ PVOID VirtualAddress;
+ } u2;
+} MMPFN_IDENTITY, *PMMPFN_IDENTITY;
//
// List of Working Sets
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 Thu Jan 17 02:19:01 2008
@@ -2416,6 +2416,21 @@
IN ULONG NumberToSet
);
+NTSYSAPI
+VOID
+NTAPI
+RtlSetAllBits(
+ PRTL_BITMAP BitMapHeader
+);
+
+NTSYSAPI
+BOOLEAN
+NTAPI
+RtlTestBit(
+ PRTL_BITMAP BitMapHeader,
+ ULONG BitNumber
+);
+
//
// Timer Functions
//
Modified: trunk/reactos/include/ndk/rtltypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtltypes.h?rev…
==============================================================================
--- trunk/reactos/include/ndk/rtltypes.h (original)
+++ trunk/reactos/include/ndk/rtltypes.h Thu Jan 17 02:19:01 2008
@@ -224,6 +224,11 @@
//
#define RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE 1
#define RTL_DUPLICATE_UNICODE_STRING_ALLOCATE_NULL_STRING 2
+
+//
+// RtlFindCharInUnicodeString Flags
+//
+#define RTL_FIND_CHAR_IN_UNICODE_STRING_CASE_INSENSITIVE 4
//
// Codepages
Modified: trunk/reactos/include/ndk/umfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/umfuncs.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/umfuncs.h (original)
+++ trunk/reactos/include/ndk/umfuncs.h Thu Jan 17 02:19:01 2008
@@ -247,13 +247,6 @@
IN PULONG LoadFlags OPTIONAL,
IN PUNICODE_STRING Name,
OUT PVOID *BaseAddress OPTIONAL
-);
-
-PVOID
-NTAPI
-RtlPcToFileHeader(
- IN PVOID PcValue,
- PVOID* BaseOfImage
);
PIMAGE_BASE_RELOCATION
Modified: trunk/reactos/include/psdk/winnt.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=3…
==============================================================================
--- trunk/reactos/include/psdk/winnt.h (original)
+++ trunk/reactos/include/psdk/winnt.h Thu Jan 17 02:19:01 2008
@@ -2901,6 +2901,14 @@
#endif
NTSYSAPI
+PVOID
+NTAPI
+RtlPcToFileHeader(
+ IN PVOID PcValue,
+ PVOID* BaseOfImage
+);
+
+NTSYSAPI
VOID
NTAPI
RtlUnwind (
Modified: trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/ctxswitch…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S (original)
+++ trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S Thu Jan 17 02:19:01 2008
@@ -727,7 +727,7 @@
mov [ebx+KPCR_CURRENT_THREAD], esi
/* Set the thread as running */
- mov byte ptr [esi+KTHREAD_STATE], Running
+ mov byte ptr [esi+KTHREAD_STATE_], Running
#ifdef CONFIG_SMP
/* Disable the idle scheduler and release the PRCB lock */
@@ -752,7 +752,7 @@
/* Clear the next thread, and put the thready as ready after lock release */
and dword ptr [ebx+KPCR_PRCB_NEXT_THREAD], 0
and dword ptr [ebx+KPCR_PRCB_PRCB_LOCK], 0
- and byte ptr [edi+KTHREAD_STATE], Ready
+ and byte ptr [edi+KTHREAD_STATE_], Ready
jmp MainLoop
NoNextThread:
Modified: trunk/reactos/ntoskrnl/ke/i386/trap.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/trap.s?re…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/trap.s (original)
+++ trunk/reactos/ntoskrnl/ke/i386/trap.s Thu Jan 17 02:19:01 2008
@@ -2387,7 +2387,7 @@
/* Set us as the current running thread */
mov [ebx+KPCR_CURRENT_THREAD], esi
- mov byte ptr [esi+KTHREAD_STATE], Running
+ mov byte ptr [esi+KTHREAD_STATE_], Running
mov byte ptr [edi+KTHREAD_WAIT_REASON], WrDispatchInt
/* Put thread in ECX and get the PRCB in EDX */