-#ifndef __INCLUDE_INTERNAL_MM_H
-#define __INCLUDE_INTERNAL_MM_H
+#pragma once
#include <internal/arch/mm.h>
/* Number of list heads to use */
#define MI_FREE_POOL_LISTS 4
-#define MI_HYPERSPACE_PTES (256 - 1)
-#define MI_ZERO_PTES (32)
-#define MI_MAPPING_RANGE_START (ULONG_PTR)HYPER_SPACE
-#define MI_MAPPING_RANGE_END (MI_MAPPING_RANGE_START + \
- MI_HYPERSPACE_PTES * PAGE_SIZE)
-#define MI_ZERO_PTE (PMMPTE)(MI_MAPPING_RANGE_END + \
- PAGE_SIZE)
/* Signature of free pool blocks */
#define MM_FREE_POOL_TAG 'lprF'
-#define PAGE_TO_SECTION_PAGE_DIRECTORY_OFFSET(x) \
- ((x) / (4*1024*1024))
-
-#define PAGE_TO_SECTION_PAGE_TABLE_OFFSET(x) \
- ((((x)) % (4*1024*1024)) / (4*1024))
-
-#define NR_SECTION_PAGE_TABLES 1024
-#define NR_SECTION_PAGE_ENTRIES 1024
-
-#define TEB_BASE 0x7FFDE000
-
/* Although Microsoft says this isn't hardcoded anymore,
they won't be able to change it. Stuff depends on it */
#define MM_VIRTMEM_GRANULARITY (64 * 1024)
*/
#define MM_POOL_ALIGNMENT 8
-/*
- * Maximum size of the kmalloc area (this is totally arbitary)
- */
-#define MM_KERNEL_MAP_SIZE (16*1024*1024)
-#define MM_KERNEL_MAP_BASE (0xf0c00000)
-
-/*
- * FIXME - different architectures have different cache line sizes...
- */
-#define MM_CACHE_LINE_SIZE 32
-
#define MM_ROUND_UP(x,s) \
((PVOID)(((ULONG_PTR)(x)+(s)-1) & ~((ULONG_PTR)(s)-1)))
} u4;
} MMPFN, *PMMPFN;
-extern PMMPFN MmPfnDatabase;
+extern PMMPFN MmPfnDatabase[2];
typedef struct _MMPFNLIST
{
/* freelist.c **********************************************************/
-#define ASSERT_PFN(x) ASSERT((x)->u3.e1.CacheAttribute != 0)
-
FORCEINLINE
PMMPFN
MiGetPfnEntry(IN PFN_NUMBER Pfn)
if ((MiPfnBitMap.Buffer) && !(RtlTestBit(&MiPfnBitMap, Pfn))) return NULL;
/* Get the entry */
- Page = &MmPfnDatabase[Pfn];
-
- /* Make sure it's valid */
- ASSERT_PFN(Page);
+ Page = &MmPfnDatabase[0][Pfn];
/* Return it */
return Page;
//
// This will return the Page Frame Number (PFN) from the MMPFN
//
- return Pfn1 - MmPfnDatabase;
+ return Pfn1 - MmPfnDatabase[0];
}
PFN_NUMBER
PFN_NUMBER
NTAPI
MmAllocPage(
- ULONG Consumer,
- SWAPENTRY SavedSwapEntry
+ ULONG Consumer
);
LONG
{
return MmKernelAddressSpace;
}
-
-#endif