From 0e52616f5f92fc205cf385515cb90fb0268d36a0 Mon Sep 17 00:00:00 2001 From: ReactOS Portable Systems Group Date: Tue, 22 Jul 2008 07:11:33 +0000 Subject: [PATCH] - Implement MmRawDeleteVirtualMapping. - RamdiskUnmapPages works now. svn path=/trunk/; revision=34664 --- reactos/ntoskrnl/mm/arm/stubs.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/mm/arm/stubs.c b/reactos/ntoskrnl/mm/arm/stubs.c index ec482c242ff..43104958e6c 100644 --- a/reactos/ntoskrnl/mm/arm/stubs.c +++ b/reactos/ntoskrnl/mm/arm/stubs.c @@ -226,10 +226,30 @@ VOID NTAPI MmRawDeleteVirtualMapping(IN PVOID Address) { + PMMPTE PointerPte, PointerPde; + // - // TODO + // Get the PDE // - UNIMPLEMENTED; + PointerPde = MiGetPdeAddress(Address); + if (PointerPde->u.Hard.L1.Fault.Type == FaultPte) return; + + // + // Get the PTE + // + PointerPte = MiGetPteAddress(Address); + ASSERT(PointerPte->u.Hard.L2.Small.Type == SmallPte); + + // + // Destroy the PTE + // + PointerPte->u.Hard.AsUlong = 0; + ASSERT(PointerPte->u.Hard.L2.Fault.Type == FaultPte); + + // + // Flush the TLB + // + KiFlushSingleTb(TRUE, Address); } VOID