Author: ros-arm-bringup
Date: Tue Jul 22 02:11:33 2008
New Revision: 34664
URL:
http://svn.reactos.org/svn/reactos?rev=34664&view=rev
Log:
- Implement MmRawDeleteVirtualMapping.
- RamdiskUnmapPages works now.
Modified:
trunk/reactos/ntoskrnl/mm/arm/stubs.c
Modified: trunk/reactos/ntoskrnl/mm/arm/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/arm/stubs.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/arm/stubs.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/arm/stubs.c [iso-8859-1] Tue Jul 22 02:11:33 2008
@@ -226,10 +226,30 @@
NTAPI
MmRawDeleteVirtualMapping(IN PVOID Address)
{
- //
- // TODO
- //
- UNIMPLEMENTED;
+ PMMPTE PointerPte, PointerPde;
+
+ //
+ // Get the PDE
+ //
+ 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