15#define MODULE_INVOLVED_IN_ARM3
19#define ASSERT_LIST_INVARIANT(x) \
21 ASSERT(((x)->Total == 0 && \
22 (x)->Flink == LIST_HEAD && \
23 (x)->Blink == LIST_HEAD) || \
25 (x)->Flink != LIST_HEAD && \
26 (x)->Blink != LIST_HEAD)); \
29#define ASSERT_LIST_INVARIANT(x)
165 OldFlink =
Entry->u1.Flink;
166 OldBlink =
Entry->u2.Blink;
177 ListHead->
Blink = OldBlink;
189 ListHead->
Flink = OldFlink;
200 OldFlink = ColorTable->
Flink;
201 if (OldFlink == OldBlink)
204 ColorTable->
Flink =
Entry->OriginalPte.u.Long;
235 ColorTable->
Blink = Pfn1;
244 Entry->OriginalPte.u.Long = 0;
274 ASSERT(Pfn->u3.e2.ReferenceCount == 0);
284 ASSERT(Pfn->u3.e1.Rom == 0);
293 ASSERT(Pfn->u3.e1.PrototypePte == 1);
299 ASSERT(Pfn->OriginalPte.u.Soft.Prototype == 0);
318 ASSERT(Pfn->u3.e1.WriteInProgress == 0);
319 ASSERT(Pfn->u3.e1.ReadInProgress == 0);
323 OldFlink = Pfn->u1.Flink;
324 OldBlink = Pfn->u2.Blink;
335 ListHead->
Blink = OldBlink;
347 ListHead->
Flink = OldFlink;
351 Pfn->OriginalPte.u.Long = 0;
354 Pfn->u1.Flink = Pfn->u2.Blink = 0;
371 USHORT OldColor, OldCache;
409 ListHead->
Blink = OldBlink;
421 ListHead->
Flink = OldFlink;
429 Pfn1->
u3.
e2.ShortFlags = 0;
622 ASSERT((PageFrameIndex != 0) &&
642 LastPage = ListHead->
Blink;
651 ListHead->
Flink = PageFrameIndex;
655 ListHead->
Blink = PageFrameIndex;
682 ColorTable->
Flink = PageFrameIndex;
695 ColorTable->
Blink = Pfn1;
704 if (ListHead->
Total >= 8)
713 Pfn1->CallSite =
NULL;
726 DPRINT(
"Inserting page: %lx into standby list !\n", PageFrameIndex);
730 ASSERT((PageFrameIndex != 0) &&
750 Flink = ListHead->
Flink;
751 ListHead->
Flink = PageFrameIndex;
762 Pfn2->
u2.
Blink = PageFrameIndex;
767 ListHead->
Blink = PageFrameIndex;
795 ASSERT((PageFrameIndex) &&
805 ListName = ListHead->ListName;
822 ASSERT(ListHead->ListName == ListName);
832 DPRINT(
"Modified page being added: %lx\n", PageFrameIndex);
837 ASSERT (ListHead->ListName == ListName);
851 Flink = ListHead->Flink;
852 ListHead->Flink = PageFrameIndex;
863 Pfn2->
u2.
Blink = PageFrameIndex;
868 ListHead->Blink = PageFrameIndex;
874 LastPage = ListHead->Blink;
883 ListHead->Flink = PageFrameIndex;
887 ListHead->Blink = PageFrameIndex;
915 Flink = ColorHead->
Flink;
922 ColorHead->
Flink = PageFrameIndex;
944 Pfn1->CallSite =
NULL;
986 if (PointerPte->u.Hard.Valid == 1)
1004 Pfn1->
u3.
e2.ReferenceCount = 1;
1029 ASSERT(PageFrameIndex != 0);
1051 ASSERT(PointerPte->u.Hard.Valid == 0);
1062 Pfn1->
u3.
e2.ReferenceCount++;
1087 ASSERT(PageFrameIndex != 0);
1116 if (PointerPde->u.Hard.Valid == 1)
1131 ContainingPageFrame);
1147 ASSERT(PageFrameIndex > 0);
1162 Pfn1->u3.e1.PageLocation,
1167 ASSERT(Pfn1->u3.e2.ReferenceCount != 0);
1170 ASSERT(Pfn1->u2.ShareCount < 0xF000000);
1171 if (!--Pfn1->u2.ShareCount)
1174 if (Pfn1->u3.e1.PrototypePte)
1177 PointerPte = Pfn1->PteAddress;
1185 PointerPte = Pfn1->PteAddress;
1187 TempPte.u.Soft.Transition = 1;
1190 TempPte.u.Soft.Protection = Pfn1->OriginalPte.u.Soft.Protection;
1201 if (Pfn1->u3.e2.ReferenceCount == 1)
1207 Pfn1->u3.e2.ReferenceCount = 0;
1208 ASSERT(Pfn1->OriginalPte.u.Soft.Prototype == 0);
1252 Pfn1->
u3.
e2.ReferenceCount == 0 ||
1253 Pfn1->u3.e2.ReferenceCount >= 2500)
1259 ASSERT(Pfn1->u3.e2.ReferenceCount != 0);
1260 ASSERT(Pfn1->u3.e2.ReferenceCount < 2500);
1265 if (Pfn1->u3.e2.ReferenceCount)
return;
1268 if (Pfn1->u2.ShareCount != 0)
1271 KeBugCheckEx(PFN_LIST_CORRUPT, 7, PageFrameIndex, Pfn1->u2.ShareCount, 0);
1286 if (Pfn1->u3.e1.Modified == 1)
1294 ASSERT(Pfn1->u3.e1.RemovalRequested == 0);
1318 Pfn1->
u3.
e2.ReferenceCount = 1;
HARDWARE_PTE_ARMV6 TempPte
HARDWARE_PDE_ARMV6 TempPde
#define NT_SUCCESS(StatCode)
#define KeSetEvent(pEvt, foo, foo2)
VOID NTAPI KeClearEvent(IN PKEVENT Event)
IN PVCB IN VBO IN ULONG OUT PBCB OUT PVOID IN BOOLEAN IN BOOLEAN Zero
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
#define InterlockedDecrement16
PFN_NUMBER MmLowestPhysicalPage
PFN_NUMBER MmHighestPhysicalPage
PFN_NUMBER MmLowMemoryThreshold
ULONG MmSecondaryColorMask
PFN_NUMBER MmMinimumFreePages
#define MI_GET_NEXT_COLOR()
#define MI_MAKE_SOFTWARE_PTE(p, x)
FORCEINLINE VOID MI_WRITE_VALID_PDE(IN PMMPDE PointerPde, IN MMPDE TempPde)
PKEVENT MiHighMemoryEvent
FORCEINLINE VOID MI_WRITE_INVALID_PTE(IN PMMPTE PointerPte, IN MMPTE InvalidPte)
NTSTATUS FASTCALL MiCheckPdeForPagedPool(IN PVOID Address)
FORCEINLINE VOID MI_WRITE_VALID_PTE(IN PMMPTE PointerPte, IN MMPTE TempPte)
KEVENT MmZeroingPageEvent
#define MI_IS_PFN_DELETED(x)
FORCEINLINE PMMPFN MI_PFN_ELEMENT(IN PFN_NUMBER Pfn)
PMMCOLOR_TABLES MmFreePagesByColor[FreePageList+1]
PFN_NUMBER MmHighMemoryThreshold
#define memcpy(s1, s2, n)
#define MiAddressToPte(x)
@ ModifiedNoWritePageList
#define MiPteToAddress(_Pte)
VOID FASTCALL KeZeroPages(IN PVOID Address, IN ULONG Size)
#define MI_SET_PROCESS2(x)
VOID NTAPI MiUnmapPageInHyperSpace(IN PEPROCESS Process, IN PVOID Address, IN KIRQL OldIrql)
VOID NTAPI MmRebalanceMemoryConsumers(VOID)
PVOID NTAPI MiMapPageInHyperSpace(IN PEPROCESS Process, IN PFN_NUMBER Page, IN PKIRQL OldIrql)
#define MI_ASSERT_PFN_LOCK_HELD()
FORCEINLINE PFN_NUMBER MiGetPfnEntryIndex(IN PMMPFN Pfn1)
PFN_NUMBER MmAvailablePages
MMPTE ValidKernelPdeLocal
PFN_NUMBER NTAPI MiRemovePageByColor(IN PFN_NUMBER PageIndex, IN ULONG Color)
PFN_NUMBER NTAPI MiRemoveZeroPage(IN ULONG Color)
MMPFNLIST MmRomPageListHead
VOID NTAPI MiUnlinkFreeOrZeroedPage(IN PMMPFN Entry)
VOID NTAPI MiZeroPhysicalPage(IN PFN_NUMBER PageFrameIndex)
MMPFNLIST MmStandbyPageListHead
VOID NTAPI MiInsertPageInFreeList(IN PFN_NUMBER PageFrameIndex)
PFN_NUMBER NTAPI MiRemoveAnyPage(IN ULONG Color)
VOID NTAPI MmDereferencePage(PFN_NUMBER Pfn)
MMPFNLIST MmModifiedPageListByColor[1]
MMPFNLIST MmModifiedPageListHead
ULONG MmTransitionSharedPages
ULONG MI_PFN_CURRENT_USAGE
VOID NTAPI MiInitializePfnAndMakePteValid(IN PFN_NUMBER PageFrameIndex, IN PMMPTE PointerPte, IN MMPTE TempPte)
MMPFNLIST MmBadPageListHead
MMPFNLIST MmZeroedPageListHead
#define ASSERT_LIST_INVARIANT(x)
NTSTATUS NTAPI MiInitializeAndChargePfn(OUT PPFN_NUMBER PageFrameIndex, IN PMMPDE PointerPde, IN PFN_NUMBER ContainingPageFrame, IN BOOLEAN SessionAllocation)
static VOID MiDecrementAvailablePages(VOID)
static VOID MiIncrementAvailablePages(VOID)
VOID NTAPI MiInitializePfnForOtherProcess(IN PFN_NUMBER PageFrameIndex, IN PVOID PteAddress, IN PFN_NUMBER PteFrame)
VOID NTAPI MiDecrementShareCount(IN PMMPFN Pfn1, IN PFN_NUMBER PageFrameIndex)
MMPFNLIST MmModifiedNoWritePageListHead
MMPFNLIST MmStandbyPageListByPriority[8]
ULONG MmTotalPagesForPagingFile
VOID NTAPI MiUnlinkPageFromList(IN PMMPFN Pfn)
CHAR MI_PFN_CURRENT_PROCESS_NAME[16]
PMMPFNLIST MmPageLocationList[]
VOID NTAPI MiInsertPageInList(IN PMMPFNLIST ListHead, IN PFN_NUMBER PageFrameIndex)
VOID NTAPI MiDecrementReferenceCount(IN PMMPFN Pfn1, IN PFN_NUMBER PageFrameIndex)
VOID NTAPI MiInitializePfn(IN PFN_NUMBER PageFrameIndex, IN PMMPTE PointerPte, IN BOOLEAN Modified)
MMPFNLIST MmFreePageListHead
VOID FASTCALL MiInsertStandbyListAtFront(IN PFN_NUMBER PageFrameIndex)
VOID NTAPI KeBugCheckEx(_In_ ULONG BugCheckCode, _In_ ULONG_PTR BugCheckParameter1, _In_ ULONG_PTR BugCheckParameter2, _In_ ULONG_PTR BugCheckParameter3, _In_ ULONG_PTR BugCheckParameter4)
base of all file and directory entries
ULONG_PTR VerifierAllocation
struct _MMPFN::@1808::@1814 e2
#define LIST_HEAD(name, type)
#define RtlZeroMemory(Destination, Length)
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
#define PsGetCurrentProcess