typedef struct _MM_IMAGE_SECTION_OBJECT
{
- ULONG_PTR ImageBase;
- ULONG_PTR StackReserve;
- ULONG_PTR StackCommit;
- ULONG_PTR EntryPoint;
- USHORT Subsystem;
- USHORT ImageCharacteristics;
- USHORT MinorSubsystemVersion;
- USHORT MajorSubsystemVersion;
- USHORT Machine;
- BOOLEAN Executable;
+ SECTION_IMAGE_INFORMATION ImageInformation;
+ PVOID BasedAddress;
ULONG NrSegments;
- ULONG ImageSize;
PMM_SECTION_SEGMENT Segments;
} MM_IMAGE_SECTION_OBJECT, *PMM_IMAGE_SECTION_OBJECT;
ULONG Protect;
ULONG Flags;
BOOLEAN DeleteInProgress;
- ULONG PageOpCount;
+ ULONG Magic;
PVOID Vad;
union
{
union
{
PFN_NUMBER Flink;
- ULONG WsIndex; // SavedSwapEntry
+ ULONG WsIndex;
PKEVENT Event;
NTSTATUS ReadStatus;
SINGLE_LIST_ENTRY NextStackPfn;
+
+ // HACK for ROSPFN
+ SWAPENTRY SwapEntry;
} u1;
PMMPTE PteAddress;
union
{
struct
{
- USHORT ReferenceCount; // ReferenceCount
+ USHORT ReferenceCount;
MMPFNENTRY e1;
};
struct
union
{
MMPTE OriginalPte;
- LONG AweReferenceCount; // RmapListHead
+ LONG AweReferenceCount;
+
+ // HACK for ROSPFN
+ PMM_RMAP_ENTRY RmapListHead;
};
union
{
IN PEPROCESS Process
);
+ULONG
+NTAPI
+MmGetSessionIdEx(
+ IN PEPROCESS Process
+);
+
/* marea.c *******************************************************************/
NTSTATUS
PMEMORY_AREA *Result,
BOOLEAN FixedAddress,
ULONG AllocationFlags,
- PHYSICAL_ADDRESS BoundaryAddressMultiple OPTIONAL
+ ULONG AllocationGranularity
);
PMEMORY_AREA
ULONG Consumer,
ULONG Protection);
+VOID
+NTAPI
+MiRosCheckMemoryAreas(
+ PMMSUPPORT AddressSpace);
+
+VOID
+NTAPI
+MiCheckAllProcessMemoryAreas(VOID);
+
/* npool.c *******************************************************************/
VOID
NTAPI
MmInitGlobalKernelPageDirectory(VOID);
-VOID
-NTAPI
-MmDisableVirtualMapping(
- struct _EPROCESS *Process,
- PVOID Address,
- BOOLEAN* WasDirty,
- PPFN_NUMBER Page
-);
-
VOID
NTAPI
MmEnableVirtualMapping(
PVOID Address
);
-VOID
-NTAPI
-MmRawDeleteVirtualMapping(PVOID Address);
-
-
VOID
NTAPI
MmGetPageFileMapping(
/* section.c *****************************************************************/
+VOID
+NTAPI
+MmGetImageInformation(
+ OUT PSECTION_IMAGE_INFORMATION ImageInformation
+);
+
PFILE_OBJECT
NTAPI
MmGetFileObjectForSection(
{
return MmKernelAddressSpace;
}
+
+
+/* expool.c ******************************************************************/
+
+VOID
+NTAPI
+ExpCheckPoolAllocation(
+ PVOID P,
+ POOL_TYPE PoolType,
+ ULONG Tag);
+
+
+/* session.c *****************************************************************/
+
+_IRQL_requires_max_(APC_LEVEL)
+NTSTATUS
+NTAPI
+MmAttachSession(
+ _Inout_ PVOID SessionEntry,
+ _Out_ PKAPC_STATE ApcState);
+
+_IRQL_requires_max_(APC_LEVEL)
+VOID
+NTAPI
+MmDetachSession(
+ _Inout_ PVOID SessionEntry,
+ _Out_ PKAPC_STATE ApcState);
+
+VOID
+NTAPI
+MmQuitNextSession(
+ _Inout_ PVOID SessionEntry);
+
+PVOID
+NTAPI
+MmGetSessionById(
+ _In_ ULONG SessionId);
+
+_IRQL_requires_max_(APC_LEVEL)
+VOID
+NTAPI
+MmSetSessionLocaleId(
+ _In_ LCID LocaleId);