ReactOS  r73918
largepag.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Kernel
3  * LICENSE: BSD - See COPYING.ARM in the top level directory
4  * FILE: ntoskrnl/mm/ARM3/largepag.c
5  * PURPOSE: ARM Memory Manager Large Page Support
6  * PROGRAMMERS: ReactOS Portable Systems Group
7  */
8 
9 /* INCLUDES *******************************************************************/
10 
11 #include <ntoskrnl.h>
12 #define NDEBUG
13 #include <debug.h>
14 
15 #define MODULE_INVOLVED_IN_ARM3
16 #include <mm/ARM3/miarm.h>
17 
18 /* GLOBALS ********************************************************************/
19 
28 
29 /* FUNCTIONS ******************************************************************/
30 
31 VOID
32 NTAPI
35 {
36 #if _MI_PAGING_LEVELS > 2
37  DPRINT1("MiInitializeLargePageSupport: PAE/x64 Not Implemented\n");
38  //ASSERT(FALSE);
39 #else
40  /* Initialize the large-page hyperspace PTE used for initial mapping */
41  MiLargePageHyperPte = MiReserveSystemPtes(1, SystemPteSpace);
42  ASSERT(MiLargePageHyperPte);
43  MiLargePageHyperPte->u.Long = 0;
44 
45  /* Initialize the process tracking list, and insert the system process */
46  InitializeListHead(&MmProcessList);
47  InsertTailList(&MmProcessList, &PsGetCurrentProcess()->MmProcessLinks);
48 #endif
49 }
50 
51 VOID
52 NTAPI
55 {
56  ULONG i;
57 
58  /* Scan every range */
59  for (i = 0; i < MiLargePageRangeIndex; i++)
60  {
61  UNIMPLEMENTED_DBGBREAK("No support for large pages\n");
62  }
63 }
64 
65 VOID
66 NTAPI
69 {
70  PWCHAR p, pp;
71 
72  /* Initialize the list */
73  InitializeListHead(&MiLargePageDriverList);
74 
75  /* Bail out if there's nothing */
76  if (MmLargePageDriverBufferLength == 0xFFFFFFFF) return;
77 
78  /* Loop from start to finish */
81  while (p < pp)
82  {
83  /* Skip whitespaces */
84  if ((*p == L' ') || (*p == L'\n') || (*p == L'\r') || (*p == L'\t'))
85  {
86  /* Skip the character */
87  p++;
88  continue;
89  }
90 
91  /* A star means everything */
92  if (*p == L'*')
93  {
94  /* No need to keep going */
96  break;
97  }
98 
99  DPRINT1("Large page drivers not supported\n");
100  ASSERT(FALSE);
101  }
102 }
103 
104 /* EOF */
VOID NTAPI INIT_FUNCTION MiSyncCachedRanges(VOID)
Definition: largepag.c:54
Definition: bidi.c:75
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel)?(CompletionRoutine!=NULL):TRUE)
__wchar_t WCHAR
Definition: xmlstorage.h:180
PMMPTE NTAPI MiReserveSystemPtes(IN ULONG NumberOfPtes, IN MMSYSTEM_PTE_POOL_TYPE SystemPtePoolType)
Definition: syspte.c:246
LIST_ENTRY MiLargePageDriverList
Definition: largepag.c:26
PMMPTE MiLargePageHyperPte
Definition: largepag.c:21
#define TRUE
Definition: numbers.c:17
uint16_t * PWCHAR
Definition: typedefs.h:55
#define InsertTailList(ListHead, Entry)
#define WCHAR
Definition: msvc.h:43
VOID NTAPI INIT_FUNCTION MiInitializeLargePageSupport(VOID)
Definition: largepag.c:34
GLenum GLclampf GLint i
Definition: glfuncs.h:14
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define pp
Definition: hlsl.yy.c:986
#define PsGetCurrentProcess
Definition: psfuncs.h:17
#define UNIMPLEMENTED_DBGBREAK(...)
Definition: debug.h:226
unsigned char BOOLEAN
BOOLEAN MiLargePageAllDrivers
Definition: largepag.c:27
ULONG MiLargePageRangeIndex
Definition: largepag.c:22
Definition: typedefs.h:118
ULONG_PTR Long
Definition: mmtypes.h:215
union _MMPTE::@1885 u
WCHAR MmLargePageDriverBuffer[512]
Definition: largepag.c:24
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
VOID NTAPI INIT_FUNCTION MiInitializeDriverLargePageList(VOID)
Definition: largepag.c:68
#define DPRINT1
Definition: precomp.h:8
ULONG MmLargePageDriverBufferLength
Definition: largepag.c:25
#define FALSE
Definition: numbers.c:16
unsigned int ULONG
Definition: retypes.h:1
GLfloat GLfloat p
Definition: glext.h:8902
MI_LARGE_PAGE_RANGES MiLargePageRanges[64]
Definition: largepag.c:23
LIST_ENTRY MmProcessList
Definition: largepag.c:20
#define INIT_FUNCTION
Definition: ntoskrnl.h:11