From a0e9802e9079b011907ae3b7c3b2685ce22130e3 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Sat, 17 Jul 2004 03:03:52 +0000 Subject: [PATCH] Added Mm Stubs svn path=/trunk/; revision=10169 --- reactos/ntoskrnl/mm/mdl.c | 104 ++++++++++++++++++++++++++++++++- reactos/ntoskrnl/mm/mm.c | 18 +++++- reactos/ntoskrnl/mm/paging.c | 14 +++++ reactos/ntoskrnl/mm/physical.c | 91 +++++++++++++++++++++++++++++ reactos/ntoskrnl/mm/pool.c | 30 +++++++++- reactos/ntoskrnl/mm/section.c | 29 ++++++++- reactos/ntoskrnl/mm/verifier.c | 62 ++++++++++++++++++++ reactos/ntoskrnl/mm/virtual.c | 16 ++++- reactos/ntoskrnl/mm/wset.c | 15 ++++- 9 files changed, 372 insertions(+), 7 deletions(-) create mode 100644 reactos/ntoskrnl/mm/physical.c create mode 100644 reactos/ntoskrnl/mm/verifier.c diff --git a/reactos/ntoskrnl/mm/mdl.c b/reactos/ntoskrnl/mm/mdl.c index c6d8a369426..f221dfcd9ef 100644 --- a/reactos/ntoskrnl/mm/mdl.c +++ b/reactos/ntoskrnl/mm/mdl.c @@ -1,4 +1,4 @@ -/* $Id: mdl.c,v 1.64 2004/06/06 07:52:22 hbirr Exp $ +/* $Id: mdl.c,v 1.65 2004/07/17 03:03:51 ion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -45,6 +45,20 @@ MDL_PARTIAL_HAS_BEEN_MAPPED mdl flagged MDL_PARTIAL has been mapped into kerne /* FUNCTIONS *****************************************************************/ +/* + * @unimplemented + */ +NTSTATUS +STDCALL +MmAdvanceMdl ( + IN PMDL Mdl, + IN ULONG NumberOfBytes + ) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + VOID INIT_FUNCTION MmInitializeMdlImplementation(VOID) { @@ -93,6 +107,7 @@ MmGetMdlPageAddress(PMDL Mdl, PVOID Offset) return((PVOID)MdlPages[((ULONG)Offset) / PAGE_SIZE]); } + /* * @implemented */ @@ -311,6 +326,23 @@ MmMapLockedPages(PMDL Mdl, KPROCESSOR_MODE AccessMode) return((char*)Base + Mdl->ByteOffset); } + +/* + * @unimplemented + */ +PVOID +STDCALL +MmMapLockedPagesWithReservedMapping ( + IN PVOID MappingAddress, + IN ULONG PoolTag, + IN PMDL MemoryDescriptorList, + IN MEMORY_CACHING_TYPE CacheType + ) +{ + UNIMPLEMENTED; + return 0; +} + /* * @implemented */ @@ -401,6 +433,20 @@ MmUnmapLockedPages(PVOID BaseAddress, PMDL Mdl) } +/* + * @unimplemented + */ +VOID +STDCALL +MmUnmapReservedMapping ( + IN PVOID BaseAddress, + IN ULONG PoolTag, + IN PMDL MemoryDescriptorList + ) +{ + UNIMPLEMENTED; +} + VOID MmBuildMdlFromPages(PMDL Mdl, PULONG Pages) @@ -419,6 +465,33 @@ MmBuildMdlFromPages(PMDL Mdl, PULONG Pages) Mdl->MdlFlags |= MDL_IO_PAGE_READ; } +/* + * @unimplemented + */ +NTSTATUS +STDCALL +MmPrefetchPages ( + IN ULONG NumberOfLists, + IN PREAD_LIST *ReadLists + ) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + +/* + * @unimplemented + */ +NTSTATUS +STDCALL +MmProtectMdlSystemAddress ( + IN PMDL MemoryDescriptorList, + IN ULONG NewProtect + ) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} /* @@ -548,6 +621,35 @@ VOID STDCALL MmProbeAndLockPages (PMDL Mdl, Mdl->MdlFlags |= MDL_PAGES_LOCKED; } +/* + * @unimplemented + */ +VOID +STDCALL +MmProbeAndLockProcessPages ( + IN OUT PMDL MemoryDescriptorList, + IN PEPROCESS Process, + IN KPROCESSOR_MODE AccessMode, + IN LOCK_OPERATION Operation + ) +{ + UNIMPLEMENTED; +} + +/* + * @unimplemented + */ +VOID +STDCALL +MmProbeAndLockSelectedPages( + IN OUT PMDL MemoryDescriptorList, + IN LARGE_INTEGER PageList[], + IN KPROCESSOR_MODE AccessMode, + IN LOCK_OPERATION Operation + ) +{ + UNIMPLEMENTED; +} /* * @implemented diff --git a/reactos/ntoskrnl/mm/mm.c b/reactos/ntoskrnl/mm/mm.c index f7cf9122d26..ee2b31af07e 100644 --- a/reactos/ntoskrnl/mm/mm.c +++ b/reactos/ntoskrnl/mm/mm.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: mm.c,v 1.74 2004/06/01 10:16:26 gdalsnes Exp $ +/* $Id: mm.c,v 1.75 2004/07/17 03:03:51 ion Exp $ * * COPYRIGHT: See COPYING in the top directory * PROJECT: ReactOS kernel @@ -44,8 +44,9 @@ PVOID EXPORTED MmUserProbeAddress = NULL; PVOID EXPORTED MmHighestUserAddress = NULL; +PBOOLEAN EXPORTED Mm64BitPhysicalAddress = FALSE; +PVOID EXPORTED MmSystemRangeStart = NULL; -PVOID MmSystemRangeStart = NULL; MM_STATS MmStats; /* FUNCTIONS ****************************************************************/ @@ -521,4 +522,17 @@ MmSetAddressRangeModified ( return (FALSE); } +/* + * @unimplemented + */ +NTKERNELAPI +PVOID +MmGetSystemRoutineAddress ( + IN PUNICODE_STRING SystemRoutineName + ) +{ + UNIMPLEMENTED; + return 0; +} + /* EOF */ diff --git a/reactos/ntoskrnl/mm/paging.c b/reactos/ntoskrnl/mm/paging.c index c6ff3a37f5f..194cd5655c0 100644 --- a/reactos/ntoskrnl/mm/paging.c +++ b/reactos/ntoskrnl/mm/paging.c @@ -17,3 +17,17 @@ /* FUNCTIONS *****************************************************************/ +/* + * @unimplemented + */ +NTSTATUS +STDCALL +MmMapUserAddressesToPage ( + IN PVOID BaseAddress, + IN SIZE_T NumberOfBytes, + IN PVOID PageAddress + ) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} diff --git a/reactos/ntoskrnl/mm/physical.c b/reactos/ntoskrnl/mm/physical.c new file mode 100644 index 00000000000..1207b2277ca --- /dev/null +++ b/reactos/ntoskrnl/mm/physical.c @@ -0,0 +1,91 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/physical.c + * PURPOSE: Physical Memory Manipulation functions + * PROGRAMMER: Alex Ionescu (alex@relsoft.net) + * UPDATE HISTORY: + * Created 16/07/04 + */ + +/* INCLUDES *****************************************************************/ + +#include + +#include + + +/* FUNCTIONS *****************************************************************/ + + +/* + * @unimplemented + */ +NTSTATUS +STDCALL +MmAddPhysicalMemory ( + IN PPHYSICAL_ADDRESS StartAddress, + IN OUT PLARGE_INTEGER NumberOfBytes + ) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + + +/* + * @unimplemented + */ +NTSTATUS +STDCALL +MmMarkPhysicalMemoryAsBad( + IN PPHYSICAL_ADDRESS StartAddress, + IN OUT PLARGE_INTEGER NumberOfBytes + ) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + + +/* + * @unimplemented + */ +NTSTATUS +STDCALL +MmMarkPhysicalMemoryAsGood( + IN PPHYSICAL_ADDRESS StartAddress, + IN OUT PLARGE_INTEGER NumberOfBytes + ) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + + +/* + * @unimplemented + */ +NTSTATUS +STDCALL +MmRemovePhysicalMemory ( + IN PPHYSICAL_ADDRESS StartAddress, + IN OUT PLARGE_INTEGER NumberOfBytes + ) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + +/* + * @unimplemented + */ +PPHYSICAL_MEMORY_RANGE +STDCALL +MmGetPhysicalMemoryRanges ( + VOID + ) +{ + UNIMPLEMENTED; + return 0; +} diff --git a/reactos/ntoskrnl/mm/pool.c b/reactos/ntoskrnl/mm/pool.c index e26bcde483d..0080bfa2567 100644 --- a/reactos/ntoskrnl/mm/pool.c +++ b/reactos/ntoskrnl/mm/pool.c @@ -1,4 +1,4 @@ -/* $Id: pool.c,v 1.29 2004/06/23 21:50:59 ion Exp $ +/* $Id: pool.c,v 1.30 2004/07/17 03:03:52 ion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -222,6 +222,34 @@ ExQueryPoolBlockSize ( return FALSE; } +/* + * @unimplemented + */ +PVOID +STDCALL +MmAllocateMappingAddress ( + IN SIZE_T NumberOfBytes, + IN ULONG PoolTag + ) +{ + UNIMPLEMENTED; + return 0; +} + + +/* + * @unimplemented + */ +VOID +STDCALL +MmFreeMappingAddress ( + IN PVOID BaseAddress, + IN ULONG PoolTag + ) +{ + UNIMPLEMENTED; +} + /* EOF */ diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index 9d8b9b32bd3..e8a4e8357b8 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: section.c,v 1.153 2004/07/10 17:01:02 hbirr Exp $ +/* $Id: section.c,v 1.154 2004/07/17 03:03:52 ion Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/section.c @@ -4113,6 +4113,21 @@ MmMapViewInSystemSpace (IN PVOID SectionObject, return Status; } +/* + * @unimplemented + */ +NTSTATUS +STDCALL +MmMapViewInSessionSpace ( + IN PVOID Section, + OUT PVOID *MappedBase, + IN OUT PSIZE_T ViewSize + ) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + /* * @implemented @@ -4132,6 +4147,18 @@ MmUnmapViewInSystemSpace (IN PVOID MappedBase) return Status; } +/* + * @unimplemented + */ +NTSTATUS +STDCALL +MmUnmapViewInSessionSpace ( + IN PVOID MappedBase + ) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} /* * @unimplemented diff --git a/reactos/ntoskrnl/mm/verifier.c b/reactos/ntoskrnl/mm/verifier.c new file mode 100644 index 00000000000..381046c1c0b --- /dev/null +++ b/reactos/ntoskrnl/mm/verifier.c @@ -0,0 +1,62 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/verifier.c + * PURPOSE: Driver Verifier functions + * PROGRAMMER: Alex Ionescu (alex@relsoft.net) + * UPDATE HISTORY: + * Created 16/07/04 + */ + +/* INCLUDES *****************************************************************/ + +#include + +#include + + +/* FUNCTIONS *****************************************************************/ + + +/* + * @unimplemented + */ +NTSTATUS +STDCALL +MmAddVerifierThunks ( + IN PVOID ThunkBuffer, + IN ULONG ThunkBufferSize + ) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + + +/* + * @unimplemented + */ + +ULONG +STDCALL +MmIsDriverVerifying ( + IN struct _DRIVER_OBJECT *DriverObject + ) +{ + UNIMPLEMENTED; + return 0; +} + + +/* + * @unimplemented + */ +NTSTATUS +STDCALL +MmIsVerifierEnabled ( + OUT PULONG VerifierFlags + ) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} \ No newline at end of file diff --git a/reactos/ntoskrnl/mm/virtual.c b/reactos/ntoskrnl/mm/virtual.c index 403ff839235..d2eae03a13b 100644 --- a/reactos/ntoskrnl/mm/virtual.c +++ b/reactos/ntoskrnl/mm/virtual.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: virtual.c,v 1.78 2004/07/10 17:01:02 hbirr Exp $ +/* $Id: virtual.c,v 1.79 2004/07/17 03:03:52 ion Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/virtual.c @@ -547,6 +547,20 @@ NtWriteVirtualMemory(IN HANDLE ProcessHandle, return(STATUS_SUCCESS); } +/* + * @unimplemented + */ + +PVOID +STDCALL +MmGetVirtualForPhysical ( + IN PHYSICAL_ADDRESS PhysicalAddress + ) +{ + UNIMPLEMENTED; + return 0; +} + /* FUNCTION: * Called from EngSecureMem (subsys\win32k\eng\mem.c) * @unimplemented diff --git a/reactos/ntoskrnl/mm/wset.c b/reactos/ntoskrnl/mm/wset.c index 69477b025b7..e522af2a641 100644 --- a/reactos/ntoskrnl/mm/wset.c +++ b/reactos/ntoskrnl/mm/wset.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: wset.c,v 1.18 2004/04/10 22:35:26 gdalsnes Exp $ +/* $Id: wset.c,v 1.19 2004/07/17 03:03:52 ion Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/wset.c @@ -68,3 +68,16 @@ MmTrimUserMemory(ULONG Target, ULONG Priority, PULONG NrFreedPages) } return(STATUS_SUCCESS); } + +/* + * @unimplemented + */ +ULONG +STDCALL +MmTrimAllSystemPagableMemory ( + IN ULONG PurgeTransitionList + ) +{ + UNIMPLEMENTED; + return 0; +}