Author: cgutman
Date: Mon Mar 5 17:08:02 2012
New Revision: 56038
URL:
http://svn.reactos.org/svn/reactos?rev=56038&view=rev
Log:
[NTOSKRNL]
- Use ARM3 hyperspace mapping calls instead of the legacy RosMm API
Modified:
trunk/reactos/ntoskrnl/cache/section/io.c
trunk/reactos/ntoskrnl/cache/section/reqtools.c
Modified: trunk/reactos/ntoskrnl/cache/section/io.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/io.…
==============================================================================
--- trunk/reactos/ntoskrnl/cache/section/io.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/section/io.c [iso-8859-1] Mon Mar 5 17:08:02 2012
@@ -290,11 +290,14 @@
if (!PageBuffer) return STATUS_NO_MEMORY;
- KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
- Hyperspace = MmCreateHyperspaceMapping(Page);
+ Hyperspace = MiMapPageInHyperSpace(PsGetCurrentProcess(), Page, &OldIrql);
+ if (!Hyperspace)
+ {
+ ExFreePool(PageBuffer);
+ return STATUS_NO_MEMORY;
+ }
RtlCopyMemory(PageBuffer, Hyperspace, PAGE_SIZE);
- MmDeleteHyperspaceMapping(Hyperspace);
- KeLowerIrql(OldIrql);
+ MiUnmapPageInHyperSpace(PsGetCurrentProcess(), Hyperspace, OldIrql);
DPRINT("MiWriteBackPage(%wZ,%08x%08x,%s:%d)\n", &FileObject->FileName,
FileOffset->u.HighPart, FileOffset->u.LowPart, File, Line);
Status = MiSimpleWrite
Modified: trunk/reactos/ntoskrnl/cache/section/reqtools.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/req…
==============================================================================
--- trunk/reactos/ntoskrnl/cache/section/reqtools.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/section/reqtools.c [iso-8859-1] Mon Mar 5 17:08:02 2012
@@ -135,13 +135,16 @@
MmUnmapLockedPages (Mdl->MappedSystemVa, Mdl);
}
- OldIrql = KfRaiseIrql(DISPATCH_LEVEL);
- PageBuf = MmCreateHyperspaceMapping(*Page);
+ PageBuf = MiMapPageInHyperSpace(PsGetCurrentProcess(), *Page, &OldIrql);
+ if (!PageBuf)
+ {
+ MmReleasePageMemoryConsumer(RequiredResources->Consumer, *Page);
+ return STATUS_NO_MEMORY;
+ }
RtlZeroMemory
((PCHAR)PageBuf+RequiredResources->Amount,
PAGE_SIZE-RequiredResources->Amount);
- MmDeleteHyperspaceMapping(PageBuf);
- KfLowerIrql(OldIrql);
+ MiUnmapPageInHyperSpace(PsGetCurrentProcess(), PageBuf, OldIrql);
DPRINT("Read Status %x (Page %x)\n", Status, *Page);