[NTOS]: Acquire PFN lock before setting up hyperspace PTE/page.

[NTOS]: Flush TLB after setting up hyperspace.
[NTOS]: Use new MiRemoveAnyPage interface instead of MmAllocPage(MC_SYSTEM), as the first test of the new Page API/ABI.
[NTOS]: Add support for creating software PTEs.

svn path=/trunk/; revision=47150
This commit is contained in:
Sir Richard 2010-05-09 18:17:53 +00:00
parent af06182171
commit eaaf713f3d
2 changed files with 49 additions and 7 deletions

View file

@ -89,6 +89,24 @@
#define MM_DECOMMIT 0x10
#define MM_NOACCESS (MM_DECOMMIT | MM_NOCACHE)
//
// Corresponds to MMPTE_SOFTWARE.Protection
//
#ifdef _M_IX86
#define MM_PTE_SOFTWARE_PROTECTION_BITS 5
#elif _M_ARM
#define MM_PTE_SOFTWARE_PROTECTION_BITS 5
#elif _M_AMD64
#define MM_PTE_SOFTWARE_PROTECTION_BITS 5
#else
#error Define these please!
#endif
//
// Creates a software PTE with the given protection
//
#define MI_MAKE_SOFTWARE_PTE(x) ((x) << MM_PTE_SOFTWARE_PROTECTION_BITS)
//
// Special values for LoadedImports
//
@ -409,6 +427,12 @@ MmArmAccessFault(
IN PVOID TrapInformation
);
NTSTATUS
FASTCALL
MiCheckPdeForPagedPool(
IN PVOID Address
);
VOID
NTAPI
MiInitializeNonPagedPool(
@ -532,6 +556,18 @@ MiRemoveHeadList(
IN PMMPFNLIST ListHead
);
PFN_NUMBER
NTAPI
MiAllocatePfn(
IN PMMPTE PointerPte,
IN ULONG Protection
);
PFN_NUMBER
NTAPI
MiRemoveAnyPage(
IN ULONG Color
);
VOID
NTAPI