Author: tkreuzer Date: Sun Nov 24 16:18:50 2013 New Revision: 61090
URL: http://svn.reactos.org/svn/reactos?rev=61090&view=rev Log: [NTOSKRNL] Remove deprecated and unused functions MmDisableVirtualMapping and MmRawDeleteVirtualMapping
Modified: trunk/reactos/ntoskrnl/include/internal/mm.h trunk/reactos/ntoskrnl/mm/amd64/page.c trunk/reactos/ntoskrnl/mm/arm/page.c trunk/reactos/ntoskrnl/mm/arm/stubs.c trunk/reactos/ntoskrnl/mm/i386/page.c trunk/reactos/ntoskrnl/mm/i386/pagepae.c trunk/reactos/ntoskrnl/mm/powerpc/page.c
Modified: trunk/reactos/ntoskrnl/include/internal/mm.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/m... ============================================================================== --- trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] Sun Nov 24 16:18:50 2013 @@ -1292,24 +1292,10 @@
VOID NTAPI -MmDisableVirtualMapping( - struct _EPROCESS *Process, - PVOID Address, - BOOLEAN* WasDirty, - PPFN_NUMBER Page -); - -VOID -NTAPI MmEnableVirtualMapping( struct _EPROCESS *Process, PVOID Address ); - -VOID -NTAPI -MmRawDeleteVirtualMapping(PVOID Address); -
VOID NTAPI
Modified: trunk/reactos/ntoskrnl/mm/amd64/page.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/amd64/page.c?re... ============================================================================== --- trunk/reactos/ntoskrnl/mm/amd64/page.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/amd64/page.c [iso-8859-1] Sun Nov 24 16:18:50 2013 @@ -508,20 +508,6 @@
VOID NTAPI -MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_NUMBER Page) -{ - UNIMPLEMENTED; -} - -VOID -NTAPI -MmRawDeleteVirtualMapping(PVOID Address) -{ - UNIMPLEMENTED; -} - -VOID -NTAPI MmDeleteVirtualMapping( PEPROCESS Process, PVOID Address,
Modified: trunk/reactos/ntoskrnl/mm/arm/page.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/arm/page.c?rev=... ============================================================================== --- trunk/reactos/ntoskrnl/mm/arm/page.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/arm/page.c [iso-8859-1] Sun Nov 24 16:18:50 2013 @@ -155,24 +155,6 @@ return (PULONG)KeArmTranslationTableRegisterGet().AsUlong; }
-VOID -NTAPI -MmDisableVirtualMapping(IN PEPROCESS Process, - IN PVOID Address, - OUT PBOOLEAN WasDirty, - OUT PPFN_NUMBER Page) -{ - UNIMPLEMENTED_DBGBREAK(); -} - -VOID -NTAPI -MmEnableVirtualMapping(IN PEPROCESS Process, - IN PVOID Address) -{ - UNIMPLEMENTED_DBGBREAK(); -} - NTSTATUS NTAPI MmCreateVirtualMappingUnsafe(IN PEPROCESS Process,
Modified: trunk/reactos/ntoskrnl/mm/arm/stubs.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/arm/stubs.c?rev... ============================================================================== --- trunk/reactos/ntoskrnl/mm/arm/stubs.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/arm/stubs.c [iso-8859-1] Sun Nov 24 16:18:50 2013 @@ -390,19 +390,6 @@
VOID NTAPI -MmDisableVirtualMapping(IN PEPROCESS Process, - IN PVOID Address, - OUT PBOOLEAN WasDirty, - OUT PPFN_NUMBER Page) -{ - // - // TODO - // - UNIMPLEMENTED_DBGBREAK(); -} - -VOID -NTAPI MmEnableVirtualMapping(IN PEPROCESS Process, IN PVOID Address) { @@ -573,30 +560,6 @@ Protection, Pages, PageCount); -} - -VOID -NTAPI -MmRawDeleteVirtualMapping(IN PVOID Address) -{ - PMMPTE PointerPte; - - // - // Get the PTE - // - PointerPte = MiGetPageTableForProcess(NULL, Address, FALSE); - if ((PointerPte) && (PointerPte->u.Hard.Valid)) - { - // - // Destroy it - // - PointerPte->u.Hard.AsUlong = 0; - - // - // Flush the TLB - // - MiFlushTlb(PointerPte, Address); - } }
VOID
Modified: trunk/reactos/ntoskrnl/mm/i386/page.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/i386/page.c?rev... ============================================================================== --- trunk/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] Sun Nov 24 16:18:50 2013 @@ -146,7 +146,7 @@
/* FUNCTIONS ***************************************************************/
-BOOLEAN MmUnmapPageTable(PULONG Pt); +static BOOLEAN MmUnmapPageTable(PULONG Pt);
VOID MiFlushTlb(PULONG Pt, PVOID Address) @@ -326,7 +326,7 @@ return Pt; }
-BOOLEAN MmUnmapPageTable(PULONG Pt) +static BOOLEAN MmUnmapPageTable(PULONG Pt) { if (!IS_HYPERSPACE(Pt)) { @@ -367,69 +367,6 @@ return 0; } return(PTE_TO_PFN(Entry)); -} - -VOID -NTAPI -MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_NUMBER Page) -/* - * FUNCTION: Delete a virtual mapping - */ -{ - BOOLEAN WasValid; - ULONG Pte; - PULONG Pt; - - Pt = MmGetPageTableForProcess(Process, Address, FALSE); - if (Pt == NULL) - { - KeBugCheck(MEMORY_MANAGEMENT); - } - - /* - * Atomically disable the present bit and get the old value. - */ - do - { - Pte = *Pt; - } while (Pte != InterlockedCompareExchangePte(Pt, Pte & ~PA_PRESENT, Pte)); - - MiFlushTlb(Pt, Address); - - WasValid = (Pte & PA_PRESENT); - if (!WasValid) - { - KeBugCheck(MEMORY_MANAGEMENT); - } - - /* - * Return some information to the caller - */ - if (WasDirty != NULL) - { - *WasDirty = Pte & PA_DIRTY; - } - if (Page != NULL) - { - *Page = PTE_TO_PFN(Pte); - } -} - -VOID -NTAPI -MmRawDeleteVirtualMapping(PVOID Address) -{ - PULONG Pt; - - Pt = MmGetPageTableForProcess(NULL, Address, FALSE); - if (Pt && *Pt) - { - /* - * Set the entry to zero - */ - InterlockedExchangePte(Pt, 0); - MiFlushTlb(Pt, Address); - } }
VOID
Modified: trunk/reactos/ntoskrnl/mm/i386/pagepae.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/i386/pagepae.c?... ============================================================================== --- trunk/reactos/ntoskrnl/mm/i386/pagepae.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/i386/pagepae.c [iso-8859-1] Sun Nov 24 16:18:50 2013 @@ -810,126 +810,6 @@
VOID NTAPI -MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_NUMBER Page) -/* - * FUNCTION: Delete a virtual mapping - */ -{ - BOOLEAN WasValid; - if (Ke386Pae) - { - ULONGLONG Pte; - ULONGLONG tmpPte; - PULONGLONG Pt; - - Pt = MmGetPageTableForProcessForPAE(Process, Address, FALSE); - if (Pt == NULL) - { - ASSERT(FALSE); - } - /* - * Atomically disable the present bit and get the old value. - */ - do - { - Pte = *Pt; - tmpPte = Pte & ~PA_PRESENT; - } while (Pte != ExfInterlockedCompareExchange64UL(Pt, &tmpPte, &Pte)); - - MiFlushTlb((PULONG)Pt, Address); - WasValid = PAE_PAGE_MASK(Pte) != 0LL ? TRUE : FALSE; - if (!WasValid) - { - ASSERT(FALSE); - } - - /* - * Return some information to the caller - */ - if (WasDirty != NULL) - { - *WasDirty = Pte & PA_DIRTY ? TRUE : FALSE; - } - if (Page != NULL) - { - *Page = PAE_PTE_TO_PFN(Pte); - } - } - else - { - ULONG Pte; - PULONG Pt; - - Pt = MmGetPageTableForProcess(Process, Address, FALSE); - if (Pt == NULL) - { - ASSERT(FALSE); - } - /* - * Atomically disable the present bit and get the old value. - */ - do - { - Pte = *Pt; - } while (Pte != InterlockedCompareExchangeUL(Pt, Pte & ~PA_PRESENT, Pte)); - - MiFlushTlb(Pt, Address); - WasValid = (PAGE_MASK(Pte) != 0); - if (!WasValid) - { - ASSERT(FALSE); - } - - /* - * Return some information to the caller - */ - if (WasDirty != NULL) - { - *WasDirty = Pte & PA_DIRTY; - } - if (Page != NULL) - { - *Page = PTE_TO_PFN(Pte); - } - } -} - -VOID -NTAPI -MmRawDeleteVirtualMapping(PVOID Address) -{ - if (Ke386Pae) - { - PULONGLONG Pt; - ULONGLONG ZeroPte = 0LL; - Pt = MmGetPageTableForProcessForPAE(NULL, Address, FALSE); - if (Pt) - { - /* - * Set the entry to zero - */ - (void)ExfpInterlockedExchange64UL(Pt, &ZeroPte); - MiFlushTlb((PULONG)Pt, Address); - } - } - else - { - PULONG Pt; - - Pt = MmGetPageTableForProcess(NULL, Address, FALSE); - if (Pt && *Pt) - { - /* - * Set the entry to zero - */ - (void)InterlockedExchangeUL(Pt, 0); - MiFlushTlb(Pt, Address); - } - } -} - -VOID -NTAPI MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage, BOOLEAN* WasDirty, PPFN_NUMBER Page) /*
Modified: trunk/reactos/ntoskrnl/mm/powerpc/page.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/powerpc/page.c?... ============================================================================== --- trunk/reactos/ntoskrnl/mm/powerpc/page.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/powerpc/page.c [iso-8859-1] Sun Nov 24 16:18:50 2013 @@ -197,25 +197,6 @@ PVOID Address) { return((PFN_NUMBER)MmGetPhysicalAddressProcess(Process, Address) >> PAGE_SHIFT); -} - -VOID -NTAPI -MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_NUMBER Page) -/* - * FUNCTION: Delete a virtual mapping - */ -{ - ppc_map_info_t info = { 0 }; - info.proc = Process ? (int)Process->UniqueProcessId : 0; - info.addr = (vaddr_t)Address; - MmuUnmapPage(&info, 1); -} - -VOID -NTAPI -MmRawDeleteVirtualMapping(PVOID Address) -{ }
VOID