[ros-diffs] [sir_richard] 48172: [NDK]: Add all the definitions regarding VADs.

sir_richard at svn.reactos.org sir_richard at svn.reactos.org
Thu Jul 22 01:41:21 UTC 2010


Author: sir_richard
Date: Thu Jul 22 01:41:20 2010
New Revision: 48172

URL: http://svn.reactos.org/svn/reactos?rev=48172&view=rev
Log:
[NDK]: Add all the definitions regarding VADs.

Modified:
    trunk/reactos/include/ndk/mmtypes.h

Modified: trunk/reactos/include/ndk/mmtypes.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/mmtypes.h?rev=48172&r1=48171&r2=48172&view=diff
==============================================================================
--- trunk/reactos/include/ndk/mmtypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/mmtypes.h [iso-8859-1] Thu Jul 22 01:41:20 2010
@@ -170,6 +170,21 @@
     SectionBasicInformation,
     SectionImageInformation,
 } SECTION_INFORMATION_CLASS;
+
+//
+// Kinds of VADs
+//
+typedef enum _MI_VAD_TYPE
+{
+    VadNone,
+    VadDevicePhysicalMemory,
+    VadImageMap,
+    VadAwe,
+    VadWriteWatch,
+    VadLargePages,
+    VadRotatePhysical,
+    VadLargePageSection
+} MI_VAD_TYPE, *PMI_VAD_TYPE;
 
 #ifdef NTOS_MODE_USER
 
@@ -613,6 +628,113 @@
     PVOID NodeHint;
     PVOID NodeFreeHint;
 } MM_AVL_TABLE, *PMM_AVL_TABLE;
+
+//
+// Virtual Adress List used in VADs
+//
+typedef struct _MMADDRESS_LIST
+{
+    ULONG StartVpn;
+    ULONG EndVpn;
+} MMADDRESS_LIST, *PMMADDRESS_LIST;
+
+//
+// Flags used in the VAD
+//
+typedef struct _MMVAD_FLAGS
+{
+    ULONG CommitCharge:19;
+    ULONG NoChange:1;
+    ULONG VadType:3;
+    ULONG MemCommit:1;
+    ULONG Protection:5;
+    ULONG Spare:2;
+    ULONG PrivateMemory:1;
+} MMVAD_FLAGS, *PMMVAD_FLAGS;
+
+//
+// Extended flags used in the VAD
+//
+typedef struct _MMVAD_FLAGS2
+{
+    ULONG FileOffset:24;
+    ULONG SecNoChange:1;
+    ULONG OneSecured:1;
+    ULONG MultipleSecured:1;
+    ULONG ReadOnly:1;
+    ULONG LongVad:1;
+    ULONG ExtendableFile:1;
+    ULONG Inherit:1;
+    ULONG CopyOnWrite:1;
+} MMVAD_FLAGS2, *PMMVAD_FLAGS2;
+
+//
+// Virtual Address Descriptor (VAD) Structure
+//
+typedef struct _MMVAD
+{
+    union
+    {
+        LONG_PTR Balance:2;
+        struct _MMVAD *Parent;
+    } u1;
+    struct _MMVAD *LeftChild;
+    struct _MMVAD *RightChild;
+    ULONG StartingVpn;
+    ULONG EndingVpn;
+    union
+    {
+        ULONG LongFlags;
+        MMVAD_FLAGS VadFlags;
+    } u;
+    PCONTROL_AREA ControlArea;
+    PMMPTE FirstPrototypePte;
+    PMMPTE LastContiguousPte;
+    union
+    {
+        ULONG LongFlags2;
+        MMVAD_FLAGS2 VadFlags2;
+    } u2;
+} MMVAD, *PMMVAD;
+
+//
+// Long VAD used in section and private allocations
+//
+typedef struct _MMVAD_LONG 
+{
+    union
+    {
+        LONG_PTR Balance:2;
+        PMMVAD Parent;
+    } u1;
+    PMMVAD LeftChild;
+    PMMVAD RightChild;
+    ULONG StartingVpn;
+    ULONG EndingVpn;
+    union
+    {
+        ULONG LongFlags;
+        MMVAD_FLAGS VadFlags;
+    } u;
+    PCONTROL_AREA ControlArea;
+    PMMPTE FirstPrototypePte;
+    PMMPTE LastContiguousPte;
+    union
+    {
+        ULONG LongFlags2;
+        MMVAD_FLAGS2 VadFlags2;
+    } u2;
+    union
+    {
+        LIST_ENTRY List;
+        MMADDRESS_LIST Secured;
+    } u3;
+    union
+    {
+        PVOID Banked;
+        PMMEXTEND_INFO ExtendedInfo;
+    } u4;
+} MMVAD_LONG, *PMMVAD_LONG;
 
 //
 // Actual Section Object




More information about the Ros-diffs mailing list