ReactOS 0.4.16-dev-250-g3ecd236
page.c File Reference
#include <ntoskrnl.h>
#include <debug.h>
#include <mm/ARM3/miarm.h>
Include dependency graph for page.c:

Go to the source code of this file.

Macros

#define NDEBUG
 
#define MODULE_INVOLVED_IN_ARM3
 

Functions

VOID NTAPI MiFlushTlb (IN PMMPTE PointerPte, IN PVOID Address)
 
BOOLEAN NTAPI MmCreateProcessAddressSpace (IN ULONG MinWs, IN PEPROCESS Process, IN PULONG DirectoryTableBase)
 
NTSTATUS NTAPI MmCreateVirtualMappingUnsafe (IN PEPROCESS Process, IN PVOID Address, IN ULONG Protection, IN PPFN_NUMBER Pages, IN ULONG PageCount)
 
NTSTATUS NTAPI MmCreateVirtualMapping (IN PEPROCESS Process, IN PVOID Address, IN ULONG Protection, IN PPFN_NUMBER Pages, IN ULONG PageCount)
 
VOID NTAPI MmRawDeleteVirtualMapping (IN PVOID Address)
 
VOID NTAPI MmDeleteVirtualMapping (IN PEPROCESS Process, IN PVOID Address, OUT PBOOLEAN WasDirty, OUT PPFN_NUMBER Page)
 
VOID NTAPI MmDeletePageFileMapping (IN PEPROCESS Process, IN PVOID Address, IN SWAPENTRY *SwapEntry)
 
NTSTATUS NTAPI MmCreatePageFileMapping (IN PEPROCESS Process, IN PVOID Address, IN SWAPENTRY SwapEntry)
 
PFN_NUMBER NTAPI MmGetPfnForProcess (IN PEPROCESS Process, IN PVOID Address)
 
BOOLEAN NTAPI MmIsDirtyPage (IN PEPROCESS Process, IN PVOID Address)
 
VOID NTAPI MmSetCleanPage (IN PEPROCESS Process, IN PVOID Address)
 
VOID NTAPI MmSetDirtyPage (IN PEPROCESS Process, IN PVOID Address)
 
BOOLEAN NTAPI MmIsPagePresent (IN PEPROCESS Process, IN PVOID Address)
 
BOOLEAN NTAPI MmIsPageSwapEntry (IN PEPROCESS Process, IN PVOID Address)
 
ULONG NTAPI MmGetPageProtect (IN PEPROCESS Process, IN PVOID Address)
 
VOID NTAPI MmSetPageProtect (IN PEPROCESS Process, IN PVOID Address, IN ULONG Protection)
 
VOID NTAPI MmInitGlobalKernelPageDirectory (VOID)
 
VOID NTAPI MmGetPageFileMapping (PEPROCESS Process, PVOID Address, SWAPENTRY *SwapEntry)
 
BOOLEAN NTAPI MmIsDisabledPage (PEPROCESS Process, PVOID Address)
 
VOID NTAPI MiInitializeSessionSpaceLayout (VOID)
 

Variables

const ULONG MmProtectToPteMask [32]
 
const ULONG MmProtectToValue [32]
 
ULONG MmGlobalKernelPageDirectory [4096]
 
MMPDE ValidKernelPde = {.u.Hard.Valid = 1}
 
MMPTE ValidKernelPte = {.u.Hard.Valid = 1, .u.Hard.Sbo = 1}
 
MMPDE DemandZeroPde = {.u.Long = (MM_READWRITE << MM_PTE_SOFTWARE_PROTECTION_BITS)}
 
MMPTE DemandZeroPte = {.u.Long = (MM_READWRITE << MM_PTE_SOFTWARE_PROTECTION_BITS)}
 
MMPTE PrototypePte = {.u.Long = (MM_READWRITE << MM_PTE_SOFTWARE_PROTECTION_BITS) | PTE_PROTOTYPE | (MI_PTE_LOOKUP_NEEDED << PAGE_SHIFT)}
 
MMPTE ValidKernelPteLocal = {{0}}
 
MMPDE ValidKernelPdeLocal = {{0}}
 
MMPTE MmDecommittedPte = {{0}}
 

Macro Definition Documentation

◆ MODULE_INVOLVED_IN_ARM3

#define MODULE_INVOLVED_IN_ARM3

Definition at line 15 of file page.c.

◆ NDEBUG

#define NDEBUG

Definition at line 12 of file page.c.

Function Documentation

◆ MiFlushTlb()

VOID NTAPI MiFlushTlb ( IN PMMPTE  PointerPte,
IN PVOID  Address 
)

Definition at line 128 of file page.c.

130{
132}
#define UNIMPLEMENTED_DBGBREAK(...)
Definition: debug.h:57

◆ MiInitializeSessionSpaceLayout()

VOID NTAPI MiInitializeSessionSpaceLayout ( VOID  )

Definition at line 318 of file page.c.

319{
320 ASSERT(FALSE);
321}
#define FALSE
Definition: types.h:117
#define ASSERT(a)
Definition: mode.c:44

◆ MmCreatePageFileMapping()

NTSTATUS NTAPI MmCreatePageFileMapping ( IN PEPROCESS  Process,
IN PVOID  Address,
IN SWAPENTRY  SwapEntry 
)

Definition at line 196 of file page.c.

199{
202}
#define STATUS_NOT_IMPLEMENTED
Definition: d3dkmdt.h:42

◆ MmCreateProcessAddressSpace()

BOOLEAN NTAPI MmCreateProcessAddressSpace ( IN ULONG  MinWs,
IN PEPROCESS  Process,
IN PULONG  DirectoryTableBase 
)

Definition at line 136 of file page.c.

139{
141 return FALSE;
142}

◆ MmCreateVirtualMapping()

NTSTATUS NTAPI MmCreateVirtualMapping ( IN PEPROCESS  Process,
IN PVOID  Address,
IN ULONG  Protection,
IN PPFN_NUMBER  Pages,
IN ULONG  PageCount 
)

Definition at line 158 of file page.c.

163{
165 return STATUS_SUCCESS;
166}
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ MmCreateVirtualMappingUnsafe()

NTSTATUS NTAPI MmCreateVirtualMappingUnsafe ( IN PEPROCESS  Process,
IN PVOID  Address,
IN ULONG  Protection,
IN PPFN_NUMBER  Pages,
IN ULONG  PageCount 
)

Definition at line 146 of file page.c.

151{
153 return STATUS_SUCCESS;
154}

Referenced by MmCreateVirtualMapping().

◆ MmDeletePageFileMapping()

VOID NTAPI MmDeletePageFileMapping ( IN PEPROCESS  Process,
IN PVOID  Address,
IN SWAPENTRY SwapEntry 
)

Definition at line 187 of file page.c.

190{
192}

◆ MmDeleteVirtualMapping()

VOID NTAPI MmDeleteVirtualMapping ( IN PEPROCESS  Process,
IN PVOID  Address,
OUT PBOOLEAN  WasDirty,
OUT PPFN_NUMBER  Page 
)

◆ MmGetPageFileMapping()

VOID NTAPI MmGetPageFileMapping ( PEPROCESS  Process,
PVOID  Address,
SWAPENTRY SwapEntry 
)

Definition at line 299 of file page.c.

303{
304 ASSERT(FALSE);
305}

◆ MmGetPageProtect()

ULONG NTAPI MmGetPageProtect ( IN PEPROCESS  Process,
IN PVOID  Address 
)

Definition at line 258 of file page.c.

260{
261 /* We don't enforce any protection on the pages -- they are all RWX */
262 return PAGE_READWRITE;
263}
#define PAGE_READWRITE
Definition: nt_native.h:1304

◆ MmGetPfnForProcess()

PFN_NUMBER NTAPI MmGetPfnForProcess ( IN PEPROCESS  Process,
IN PVOID  Address 
)

Definition at line 206 of file page.c.

208{
210 return 0;
211}

◆ MmInitGlobalKernelPageDirectory()

VOID NTAPI MmInitGlobalKernelPageDirectory ( VOID  )

Definition at line 277 of file page.c.

278{
279 ULONG i;
280 PULONG CurrentPageDirectory = (PULONG)PDE_BASE;
281
282 /* Loop the 2GB of address space which belong to the kernel */
283 for (i = MiGetPdeOffset(MmSystemRangeStart); i < 2048; i++)
284 {
285 /* Check if we have an entry for this already */
286 if ((i != MiGetPdeOffset(PTE_BASE)) &&
289 (CurrentPageDirectory[i]))
290 {
291 /* We don't, link it in our global page directory */
292 MmGlobalKernelPageDirectory[i] = CurrentPageDirectory[i];
293 }
294 }
295}
#define PDE_BASE
Definition: winldr.c:21
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define PTE_BASE
Definition: mmx86.c:14
#define HYPER_SPACE
Definition: mm.h:14
#define MiGetPdeOffset(x)
Definition: mm.h:195
#define MmSystemRangeStart
Definition: mm.h:32
ULONG MmGlobalKernelPageDirectory[4096]
Definition: page.c:107
uint32_t * PULONG
Definition: typedefs.h:59
uint32_t ULONG
Definition: typedefs.h:59

◆ MmIsDirtyPage()

BOOLEAN NTAPI MmIsDirtyPage ( IN PEPROCESS  Process,
IN PVOID  Address 
)

Definition at line 215 of file page.c.

217{
219 return FALSE;
220}

◆ MmIsDisabledPage()

BOOLEAN NTAPI MmIsDisabledPage ( PEPROCESS  Process,
PVOID  Address 
)

Definition at line 309 of file page.c.

310{
311 ASSERT(FALSE);
312 return FALSE;
313}

◆ MmIsPagePresent()

BOOLEAN NTAPI MmIsPagePresent ( IN PEPROCESS  Process,
IN PVOID  Address 
)

Definition at line 240 of file page.c.

242{
244 return FALSE;
245}

◆ MmIsPageSwapEntry()

BOOLEAN NTAPI MmIsPageSwapEntry ( IN PEPROCESS  Process,
IN PVOID  Address 
)

Definition at line 249 of file page.c.

251{
253 return FALSE;
254}

◆ MmRawDeleteVirtualMapping()

VOID NTAPI MmRawDeleteVirtualMapping ( IN PVOID  Address)

Definition at line 170 of file page.c.

171{
173}

◆ MmSetCleanPage()

VOID NTAPI MmSetCleanPage ( IN PEPROCESS  Process,
IN PVOID  Address 
)

Definition at line 224 of file page.c.

226{
228}

◆ MmSetDirtyPage()

VOID NTAPI MmSetDirtyPage ( IN PEPROCESS  Process,
IN PVOID  Address 
)

Definition at line 232 of file page.c.

234{
236}

◆ MmSetPageProtect()

VOID NTAPI MmSetPageProtect ( IN PEPROCESS  Process,
IN PVOID  Address,
IN ULONG  Protection 
)

Definition at line 267 of file page.c.

270{
271 /* We don't enforce any protection on the pages -- they are all RWX */
272 return;
273}

Variable Documentation

◆ DemandZeroPde

Definition at line 114 of file page.c.

◆ DemandZeroPte

Definition at line 115 of file page.c.

◆ MmDecommittedPte

MMPTE MmDecommittedPte = {{0}}

Definition at line 122 of file page.c.

◆ MmGlobalKernelPageDirectory

ULONG MmGlobalKernelPageDirectory[4096]

Definition at line 107 of file page.c.

Referenced by MmInitGlobalKernelPageDirectory().

◆ MmProtectToPteMask

const ULONG MmProtectToPteMask[32]

Definition at line 22 of file page.c.

Referenced by MiDispatchFault(), MiResolveTransitionFault(), and MmSetPageProtect().

◆ MmProtectToValue

◆ PrototypePte

Definition at line 118 of file page.c.

◆ ValidKernelPde

MMPDE ValidKernelPde = {.u.Hard.Valid = 1}

Definition at line 110 of file page.c.

◆ ValidKernelPdeLocal

MMPDE ValidKernelPdeLocal = {{0}}

Definition at line 121 of file page.c.

◆ ValidKernelPte

MMPTE ValidKernelPte = {.u.Hard.Valid = 1, .u.Hard.Sbo = 1}

Definition at line 111 of file page.c.

◆ ValidKernelPteLocal

MMPTE ValidKernelPteLocal = {{0}}

Definition at line 120 of file page.c.