mirror of
https://github.com/reactos/reactos.git
synced 2024-07-02 02:34:53 +00:00
[NTOSKRNL]
Use 1 as base address parameter to MmCreateMemoryArea, when 0 is the actual base and remove FixedAddress parameter in MmCreateMemoryArea svn path=/trunk/; revision=67790
This commit is contained in:
parent
d2818e587c
commit
cf491f89ab
1
reactos/ntoskrnl/cache/section/data.c
vendored
1
reactos/ntoskrnl/cache/section/data.c
vendored
|
@ -551,7 +551,6 @@ _MiMapViewOfSegment(PMMSUPPORT AddressSpace,
|
||||||
ViewSize,
|
ViewSize,
|
||||||
Protect,
|
Protect,
|
||||||
&MArea,
|
&MArea,
|
||||||
FALSE,
|
|
||||||
AllocationType,
|
AllocationType,
|
||||||
*BaseAddress ?
|
*BaseAddress ?
|
||||||
PAGE_SIZE : MM_ALLOCATION_GRANULARITY);
|
PAGE_SIZE : MM_ALLOCATION_GRANULARITY);
|
||||||
|
|
|
@ -595,7 +595,6 @@ CcRosMapVacb(
|
||||||
VACB_MAPPING_GRANULARITY,
|
VACB_MAPPING_GRANULARITY,
|
||||||
PAGE_READWRITE,
|
PAGE_READWRITE,
|
||||||
(PMEMORY_AREA*)&Vacb->MemoryArea,
|
(PMEMORY_AREA*)&Vacb->MemoryArea,
|
||||||
FALSE,
|
|
||||||
0,
|
0,
|
||||||
PAGE_SIZE);
|
PAGE_SIZE);
|
||||||
MmUnlockAddressSpace(MmGetKernelAddressSpace());
|
MmUnlockAddressSpace(MmGetKernelAddressSpace());
|
||||||
|
|
|
@ -487,7 +487,6 @@ MmCreateMemoryArea(
|
||||||
SIZE_T Length,
|
SIZE_T Length,
|
||||||
ULONG Protection,
|
ULONG Protection,
|
||||||
PMEMORY_AREA *Result,
|
PMEMORY_AREA *Result,
|
||||||
BOOLEAN FixedAddress,
|
|
||||||
ULONG AllocationFlags,
|
ULONG AllocationFlags,
|
||||||
ULONG AllocationGranularity
|
ULONG AllocationGranularity
|
||||||
);
|
);
|
||||||
|
|
|
@ -38,7 +38,6 @@ MiRosTakeOverSharedUserPage(IN PEPROCESS Process)
|
||||||
PAGE_SIZE,
|
PAGE_SIZE,
|
||||||
PAGE_READWRITE,
|
PAGE_READWRITE,
|
||||||
&MemoryArea,
|
&MemoryArea,
|
||||||
TRUE,
|
|
||||||
0,
|
0,
|
||||||
PAGE_SIZE);
|
PAGE_SIZE);
|
||||||
ASSERT(NT_SUCCESS(Status));
|
ASSERT(NT_SUCCESS(Status));
|
||||||
|
|
|
@ -146,13 +146,19 @@ MiInsertNode(IN PMM_AVL_TABLE Table,
|
||||||
PVOID AllocatedBase = (PVOID)(Vad->StartingVpn << PAGE_SHIFT);
|
PVOID AllocatedBase = (PVOID)(Vad->StartingVpn << PAGE_SHIFT);
|
||||||
|
|
||||||
Size = ((Vad->EndingVpn + 1) - 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,
|
Status = MmCreateMemoryArea(&Process->Vm,
|
||||||
MEMORY_AREA_OWNED_BY_ARM3,
|
MEMORY_AREA_OWNED_BY_ARM3,
|
||||||
&AllocatedBase,
|
&AllocatedBase,
|
||||||
Size,
|
Size,
|
||||||
PAGE_READWRITE,
|
PAGE_READWRITE,
|
||||||
&MemoryArea,
|
&MemoryArea,
|
||||||
TRUE,
|
|
||||||
0,
|
0,
|
||||||
PAGE_SIZE);
|
PAGE_SIZE);
|
||||||
ASSERT(NT_SUCCESS(Status));
|
ASSERT(NT_SUCCESS(Status));
|
||||||
|
|
|
@ -923,7 +923,6 @@ MmCreateMemoryArea(PMMSUPPORT AddressSpace,
|
||||||
ULONG_PTR Length,
|
ULONG_PTR Length,
|
||||||
ULONG Protect,
|
ULONG Protect,
|
||||||
PMEMORY_AREA *Result,
|
PMEMORY_AREA *Result,
|
||||||
BOOLEAN FixedAddress,
|
|
||||||
ULONG AllocationFlags,
|
ULONG AllocationFlags,
|
||||||
ULONG Granularity)
|
ULONG Granularity)
|
||||||
{
|
{
|
||||||
|
@ -933,11 +932,11 @@ MmCreateMemoryArea(PMMSUPPORT AddressSpace,
|
||||||
|
|
||||||
DPRINT("MmCreateMemoryArea(Type 0x%lx, BaseAddress %p, "
|
DPRINT("MmCreateMemoryArea(Type 0x%lx, BaseAddress %p, "
|
||||||
"*BaseAddress %p, Length %p, AllocationFlags %x, "
|
"*BaseAddress %p, Length %p, AllocationFlags %x, "
|
||||||
"FixedAddress %x, Result %p)\n",
|
"Result %p)\n",
|
||||||
Type, BaseAddress, *BaseAddress, Length, AllocationFlags,
|
Type, BaseAddress, *BaseAddress, Length, AllocationFlags,
|
||||||
FixedAddress, Result);
|
Result);
|
||||||
|
|
||||||
if ((*BaseAddress) == 0 && !FixedAddress)
|
if (*BaseAddress == 0)
|
||||||
{
|
{
|
||||||
tmpLength = (ULONG_PTR)MM_ROUND_UP(Length, PAGE_SIZE);
|
tmpLength = (ULONG_PTR)MM_ROUND_UP(Length, PAGE_SIZE);
|
||||||
*BaseAddress = MmFindGap(AddressSpace,
|
*BaseAddress = MmFindGap(AddressSpace,
|
||||||
|
|
|
@ -57,7 +57,6 @@ MiInitSystemMemoryAreas()
|
||||||
MmBootImageSize,
|
MmBootImageSize,
|
||||||
PAGE_EXECUTE_READWRITE,
|
PAGE_EXECUTE_READWRITE,
|
||||||
&MArea,
|
&MArea,
|
||||||
TRUE,
|
|
||||||
0,
|
0,
|
||||||
PAGE_SIZE);
|
PAGE_SIZE);
|
||||||
ASSERT(Status == STATUS_SUCCESS);
|
ASSERT(Status == STATUS_SUCCESS);
|
||||||
|
@ -72,7 +71,6 @@ MiInitSystemMemoryAreas()
|
||||||
PTE_TOP - PTE_BASE + 1,
|
PTE_TOP - PTE_BASE + 1,
|
||||||
PAGE_READWRITE,
|
PAGE_READWRITE,
|
||||||
&MArea,
|
&MArea,
|
||||||
TRUE,
|
|
||||||
0,
|
0,
|
||||||
PAGE_SIZE);
|
PAGE_SIZE);
|
||||||
ASSERT(Status == STATUS_SUCCESS);
|
ASSERT(Status == STATUS_SUCCESS);
|
||||||
|
@ -87,7 +85,6 @@ MiInitSystemMemoryAreas()
|
||||||
HYPER_SPACE_END - HYPER_SPACE + 1,
|
HYPER_SPACE_END - HYPER_SPACE + 1,
|
||||||
PAGE_READWRITE,
|
PAGE_READWRITE,
|
||||||
&MArea,
|
&MArea,
|
||||||
TRUE,
|
|
||||||
0,
|
0,
|
||||||
PAGE_SIZE);
|
PAGE_SIZE);
|
||||||
ASSERT(Status == STATUS_SUCCESS);
|
ASSERT(Status == STATUS_SUCCESS);
|
||||||
|
@ -102,7 +99,6 @@ MiInitSystemMemoryAreas()
|
||||||
(MxPfnAllocation << PAGE_SHIFT),
|
(MxPfnAllocation << PAGE_SHIFT),
|
||||||
PAGE_READWRITE,
|
PAGE_READWRITE,
|
||||||
&MArea,
|
&MArea,
|
||||||
TRUE,
|
|
||||||
0,
|
0,
|
||||||
PAGE_SIZE);
|
PAGE_SIZE);
|
||||||
ASSERT(Status == STATUS_SUCCESS);
|
ASSERT(Status == STATUS_SUCCESS);
|
||||||
|
@ -117,7 +113,6 @@ MiInitSystemMemoryAreas()
|
||||||
MmSizeOfNonPagedPoolInBytes,
|
MmSizeOfNonPagedPoolInBytes,
|
||||||
PAGE_READWRITE,
|
PAGE_READWRITE,
|
||||||
&MArea,
|
&MArea,
|
||||||
TRUE,
|
|
||||||
0,
|
0,
|
||||||
PAGE_SIZE);
|
PAGE_SIZE);
|
||||||
ASSERT(Status == STATUS_SUCCESS);
|
ASSERT(Status == STATUS_SUCCESS);
|
||||||
|
@ -132,7 +127,6 @@ MiInitSystemMemoryAreas()
|
||||||
MiNonPagedSystemSize,
|
MiNonPagedSystemSize,
|
||||||
PAGE_READWRITE,
|
PAGE_READWRITE,
|
||||||
&MArea,
|
&MArea,
|
||||||
TRUE,
|
|
||||||
0,
|
0,
|
||||||
PAGE_SIZE);
|
PAGE_SIZE);
|
||||||
ASSERT(Status == STATUS_SUCCESS);
|
ASSERT(Status == STATUS_SUCCESS);
|
||||||
|
@ -147,7 +141,6 @@ MiInitSystemMemoryAreas()
|
||||||
MmSystemViewSize,
|
MmSystemViewSize,
|
||||||
PAGE_READWRITE,
|
PAGE_READWRITE,
|
||||||
&MArea,
|
&MArea,
|
||||||
TRUE,
|
|
||||||
0,
|
0,
|
||||||
PAGE_SIZE);
|
PAGE_SIZE);
|
||||||
ASSERT(Status == STATUS_SUCCESS);
|
ASSERT(Status == STATUS_SUCCESS);
|
||||||
|
@ -163,7 +156,6 @@ MiInitSystemMemoryAreas()
|
||||||
(ULONG_PTR)MmSessionBase,
|
(ULONG_PTR)MmSessionBase,
|
||||||
PAGE_READWRITE,
|
PAGE_READWRITE,
|
||||||
&MArea,
|
&MArea,
|
||||||
TRUE,
|
|
||||||
0,
|
0,
|
||||||
PAGE_SIZE);
|
PAGE_SIZE);
|
||||||
ASSERT(Status == STATUS_SUCCESS);
|
ASSERT(Status == STATUS_SUCCESS);
|
||||||
|
@ -178,7 +170,6 @@ MiInitSystemMemoryAreas()
|
||||||
MmSizeOfPagedPoolInBytes,
|
MmSizeOfPagedPoolInBytes,
|
||||||
PAGE_READWRITE,
|
PAGE_READWRITE,
|
||||||
&MArea,
|
&MArea,
|
||||||
TRUE,
|
|
||||||
0,
|
0,
|
||||||
PAGE_SIZE);
|
PAGE_SIZE);
|
||||||
ASSERT(Status == STATUS_SUCCESS);
|
ASSERT(Status == STATUS_SUCCESS);
|
||||||
|
@ -193,7 +184,6 @@ MiInitSystemMemoryAreas()
|
||||||
PAGE_SIZE * KeNumberProcessors,
|
PAGE_SIZE * KeNumberProcessors,
|
||||||
PAGE_READWRITE,
|
PAGE_READWRITE,
|
||||||
&MArea,
|
&MArea,
|
||||||
TRUE,
|
|
||||||
0,
|
0,
|
||||||
PAGE_SIZE);
|
PAGE_SIZE);
|
||||||
ASSERT(Status == STATUS_SUCCESS);
|
ASSERT(Status == STATUS_SUCCESS);
|
||||||
|
@ -208,7 +198,6 @@ MiInitSystemMemoryAreas()
|
||||||
PAGE_SIZE,
|
PAGE_SIZE,
|
||||||
PAGE_READWRITE,
|
PAGE_READWRITE,
|
||||||
&MArea,
|
&MArea,
|
||||||
TRUE,
|
|
||||||
0,
|
0,
|
||||||
PAGE_SIZE);
|
PAGE_SIZE);
|
||||||
ASSERT(Status == STATUS_SUCCESS);
|
ASSERT(Status == STATUS_SUCCESS);
|
||||||
|
@ -223,7 +212,6 @@ MiInitSystemMemoryAreas()
|
||||||
PAGE_SIZE,
|
PAGE_SIZE,
|
||||||
PAGE_READWRITE,
|
PAGE_READWRITE,
|
||||||
&MArea,
|
&MArea,
|
||||||
TRUE,
|
|
||||||
0,
|
0,
|
||||||
PAGE_SIZE);
|
PAGE_SIZE);
|
||||||
ASSERT(Status == STATUS_SUCCESS);
|
ASSERT(Status == STATUS_SUCCESS);
|
||||||
|
@ -239,7 +227,6 @@ MiInitSystemMemoryAreas()
|
||||||
PAGE_SIZE * 2,
|
PAGE_SIZE * 2,
|
||||||
PAGE_READWRITE,
|
PAGE_READWRITE,
|
||||||
&MArea,
|
&MArea,
|
||||||
TRUE,
|
|
||||||
0,
|
0,
|
||||||
PAGE_SIZE);
|
PAGE_SIZE);
|
||||||
ASSERT(Status == STATUS_SUCCESS);
|
ASSERT(Status == STATUS_SUCCESS);
|
||||||
|
|
|
@ -3965,7 +3965,6 @@ MmMapViewOfSegment(PMMSUPPORT AddressSpace,
|
||||||
ViewSize,
|
ViewSize,
|
||||||
Protect,
|
Protect,
|
||||||
&MArea,
|
&MArea,
|
||||||
FALSE,
|
|
||||||
AllocationType,
|
AllocationType,
|
||||||
Granularity);
|
Granularity);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
|
Loading…
Reference in a new issue