Author: tkreuzer
Date: Sat May 16 21:30:28 2015
New Revision: 67790
URL:
http://svn.reactos.org/svn/reactos?rev=67790&view=rev
Log:
[NTOSKRNL]
Use 1 as base address parameter to MmCreateMemoryArea, when 0 is the actual base and
remove FixedAddress parameter in MmCreateMemoryArea
Modified:
trunk/reactos/ntoskrnl/cache/section/data.c
trunk/reactos/ntoskrnl/cc/view.c
trunk/reactos/ntoskrnl/include/internal/mm.h
trunk/reactos/ntoskrnl/mm/ARM3/procsup.c
trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c
trunk/reactos/ntoskrnl/mm/marea.c
trunk/reactos/ntoskrnl/mm/mminit.c
trunk/reactos/ntoskrnl/mm/section.c
Modified: trunk/reactos/ntoskrnl/cache/section/data.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/dat…
==============================================================================
--- trunk/reactos/ntoskrnl/cache/section/data.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/section/data.c [iso-8859-1] Sat May 16 21:30:28 2015
@@ -551,7 +551,6 @@
ViewSize,
Protect,
&MArea,
- FALSE,
AllocationType,
*BaseAddress ?
PAGE_SIZE : MM_ALLOCATION_GRANULARITY);
Modified: trunk/reactos/ntoskrnl/cc/view.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/view.c?rev=677…
==============================================================================
--- trunk/reactos/ntoskrnl/cc/view.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cc/view.c [iso-8859-1] Sat May 16 21:30:28 2015
@@ -595,7 +595,6 @@
VACB_MAPPING_GRANULARITY,
PAGE_READWRITE,
(PMEMORY_AREA*)&Vacb->MemoryArea,
- FALSE,
0,
PAGE_SIZE);
MmUnlockAddressSpace(MmGetKernelAddressSpace());
Modified: trunk/reactos/ntoskrnl/include/internal/mm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] Sat May 16 21:30:28 2015
@@ -487,7 +487,6 @@
SIZE_T Length,
ULONG Protection,
PMEMORY_AREA *Result,
- BOOLEAN FixedAddress,
ULONG AllocationFlags,
ULONG AllocationGranularity
);
Modified: trunk/reactos/ntoskrnl/mm/ARM3/procsup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/procsup.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] Sat May 16 21:30:28 2015
@@ -38,7 +38,6 @@
PAGE_SIZE,
PAGE_READWRITE,
&MemoryArea,
- TRUE,
0,
PAGE_SIZE);
ASSERT(NT_SUCCESS(Status));
Modified: trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c [iso-8859-1] Sat May 16 21:30:28 2015
@@ -146,13 +146,19 @@
PVOID AllocatedBase = (PVOID)(Vad->StartingVpn << PAGE_SHIFT);
Size = ((Vad->EndingVpn + 1) - Vad->StartingVpn) << PAGE_SHIFT;
+
+ if (AllocatedBase == NULL)
+ {
+ AllocatedBase = (PVOID)(ULONG_PTR)1;
+ Size -= 1;
+ }
+
Status = MmCreateMemoryArea(&Process->Vm,
MEMORY_AREA_OWNED_BY_ARM3,
&AllocatedBase,
Size,
PAGE_READWRITE,
&MemoryArea,
- TRUE,
0,
PAGE_SIZE);
ASSERT(NT_SUCCESS(Status));
Modified: trunk/reactos/ntoskrnl/mm/marea.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/marea.c?rev=67…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] Sat May 16 21:30:28 2015
@@ -923,7 +923,6 @@
ULONG_PTR Length,
ULONG Protect,
PMEMORY_AREA *Result,
- BOOLEAN FixedAddress,
ULONG AllocationFlags,
ULONG Granularity)
{
@@ -933,11 +932,11 @@
DPRINT("MmCreateMemoryArea(Type 0x%lx, BaseAddress %p, "
"*BaseAddress %p, Length %p, AllocationFlags %x, "
- "FixedAddress %x, Result %p)\n",
+ "Result %p)\n",
Type, BaseAddress, *BaseAddress, Length, AllocationFlags,
- FixedAddress, Result);
-
- if ((*BaseAddress) == 0 && !FixedAddress)
+ Result);
+
+ if (*BaseAddress == 0)
{
tmpLength = (ULONG_PTR)MM_ROUND_UP(Length, PAGE_SIZE);
*BaseAddress = MmFindGap(AddressSpace,
Modified: trunk/reactos/ntoskrnl/mm/mminit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mminit.c?rev=6…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/mminit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/mminit.c [iso-8859-1] Sat May 16 21:30:28 2015
@@ -57,7 +57,6 @@
MmBootImageSize,
PAGE_EXECUTE_READWRITE,
&MArea,
- TRUE,
0,
PAGE_SIZE);
ASSERT(Status == STATUS_SUCCESS);
@@ -72,7 +71,6 @@
PTE_TOP - PTE_BASE + 1,
PAGE_READWRITE,
&MArea,
- TRUE,
0,
PAGE_SIZE);
ASSERT(Status == STATUS_SUCCESS);
@@ -87,7 +85,6 @@
HYPER_SPACE_END - HYPER_SPACE + 1,
PAGE_READWRITE,
&MArea,
- TRUE,
0,
PAGE_SIZE);
ASSERT(Status == STATUS_SUCCESS);
@@ -102,7 +99,6 @@
(MxPfnAllocation << PAGE_SHIFT),
PAGE_READWRITE,
&MArea,
- TRUE,
0,
PAGE_SIZE);
ASSERT(Status == STATUS_SUCCESS);
@@ -117,7 +113,6 @@
MmSizeOfNonPagedPoolInBytes,
PAGE_READWRITE,
&MArea,
- TRUE,
0,
PAGE_SIZE);
ASSERT(Status == STATUS_SUCCESS);
@@ -132,7 +127,6 @@
MiNonPagedSystemSize,
PAGE_READWRITE,
&MArea,
- TRUE,
0,
PAGE_SIZE);
ASSERT(Status == STATUS_SUCCESS);
@@ -147,7 +141,6 @@
MmSystemViewSize,
PAGE_READWRITE,
&MArea,
- TRUE,
0,
PAGE_SIZE);
ASSERT(Status == STATUS_SUCCESS);
@@ -163,7 +156,6 @@
(ULONG_PTR)MmSessionBase,
PAGE_READWRITE,
&MArea,
- TRUE,
0,
PAGE_SIZE);
ASSERT(Status == STATUS_SUCCESS);
@@ -178,7 +170,6 @@
MmSizeOfPagedPoolInBytes,
PAGE_READWRITE,
&MArea,
- TRUE,
0,
PAGE_SIZE);
ASSERT(Status == STATUS_SUCCESS);
@@ -193,7 +184,6 @@
PAGE_SIZE * KeNumberProcessors,
PAGE_READWRITE,
&MArea,
- TRUE,
0,
PAGE_SIZE);
ASSERT(Status == STATUS_SUCCESS);
@@ -208,7 +198,6 @@
PAGE_SIZE,
PAGE_READWRITE,
&MArea,
- TRUE,
0,
PAGE_SIZE);
ASSERT(Status == STATUS_SUCCESS);
@@ -223,7 +212,6 @@
PAGE_SIZE,
PAGE_READWRITE,
&MArea,
- TRUE,
0,
PAGE_SIZE);
ASSERT(Status == STATUS_SUCCESS);
@@ -239,7 +227,6 @@
PAGE_SIZE * 2,
PAGE_READWRITE,
&MArea,
- TRUE,
0,
PAGE_SIZE);
ASSERT(Status == STATUS_SUCCESS);
Modified: trunk/reactos/ntoskrnl/mm/section.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Sat May 16 21:30:28 2015
@@ -3965,7 +3965,6 @@
ViewSize,
Protect,
&MArea,
- FALSE,
AllocationType,
Granularity);
if (!NT_SUCCESS(Status))