diff --git a/reactos/ntoskrnl/cache/section/data.c b/reactos/ntoskrnl/cache/section/data.c index b7dc9cefa77..07ffb7d64c3 100644 --- a/reactos/ntoskrnl/cache/section/data.c +++ b/reactos/ntoskrnl/cache/section/data.c @@ -869,7 +869,7 @@ MmExtendCacheSection(PROS_SECTION_OBJECT Section, MmLockSectionSegment(Segment); Segment->RawLength.QuadPart = NewSize->QuadPart; Segment->Length.QuadPart = MAX(Segment->Length.QuadPart, - PAGE_ROUND_UP(Segment->RawLength.LowPart)); + (LONG64)PAGE_ROUND_UP(Segment->RawLength.QuadPart)); MmUnlockSectionSegment(Segment); return STATUS_SUCCESS; } diff --git a/reactos/ntoskrnl/mm/ARM3/section.c b/reactos/ntoskrnl/mm/ARM3/section.c index 82f69629a98..3692faa1e45 100644 --- a/reactos/ntoskrnl/mm/ARM3/section.c +++ b/reactos/ntoskrnl/mm/ARM3/section.c @@ -1738,12 +1738,16 @@ MiRemoveMappedPtes(IN PVOID BaseAddress, /* Was the PDE invalid */ if (PointerPde->u.Long == 0) { +#if (_MI_PAGING_LEVELS == 2) /* Find the system double-mapped PDE that describes this mapping */ SystemMapPde = &MmSystemPagePtes[((ULONG_PTR)PointerPde & (SYSTEM_PD_SIZE - 1)) / sizeof(MMPTE)]; /* Make it valid */ ASSERT(SystemMapPde->u.Hard.Valid == 1); MI_WRITE_VALID_PDE(PointerPde, *SystemMapPde); +#else + ASSERT(FALSE); +#endif } /* Dereference the PDE and the PTE */ @@ -1791,7 +1795,8 @@ MiRemoveFromSystemSpace(IN PMMSESSION Session, IN PVOID Base, OUT PCONTROL_AREA *ControlArea) { - ULONG Hash, Size, Count = 0, Entry; + ULONG Hash, Size, Count = 0; + ULONG_PTR Entry; PAGED_CODE(); /* Compute the hash for this entry and loop trying to find it */ @@ -1846,7 +1851,7 @@ MiUnmapViewInSystemSpace(IN PMMSESSION Session, /* Clear the bits for this mapping */ RtlClearBits(Session->SystemSpaceBitMap, - ((ULONG_PTR)MappedBase - (ULONG_PTR)Session->SystemSpaceViewStart) >> 16, + (ULONG)(((ULONG_PTR)MappedBase - (ULONG_PTR)Session->SystemSpaceViewStart) >> 16), Size); /* Convert the size from a bit size into the actual size */ diff --git a/reactos/ntoskrnl/mm/ARM3/virtual.c b/reactos/ntoskrnl/mm/ARM3/virtual.c index 2785093ae47..c90c1be6e25 100644 --- a/reactos/ntoskrnl/mm/ARM3/virtual.c +++ b/reactos/ntoskrnl/mm/ARM3/virtual.c @@ -3579,7 +3579,7 @@ NtAllocateVirtualMemory(IN HANDLE ProcessHandle, // PointerPte = MI_GET_PROTOTYPE_PTE_FOR_VPN(FoundVad, StartingAddress >> PAGE_SHIFT); LastPte = MI_GET_PROTOTYPE_PTE_FOR_VPN(FoundVad, EndingAddress >> PAGE_SHIFT); - QuotaCharge = LastPte - PointerPte + 1; + QuotaCharge = (ULONG)(LastPte - PointerPte + 1); KeAcquireGuardedMutexUnsafe(&MmSectionCommitMutex); // diff --git a/reactos/ntoskrnl/mm/rmap.c b/reactos/ntoskrnl/mm/rmap.c index b8b7f5e2bcc..7d1c0b15901 100644 --- a/reactos/ntoskrnl/mm/rmap.c +++ b/reactos/ntoskrnl/mm/rmap.c @@ -125,7 +125,7 @@ MmPageOutPhysicalAddress(PFN_NUMBER Page) Type = MemoryArea->Type; if (Type == MEMORY_AREA_SECTION_VIEW) { - ULONG Entry; + ULONG_PTR Entry; Offset = MemoryArea->Data.SectionData.ViewOffset.QuadPart + ((ULONG_PTR)Address - (ULONG_PTR)MemoryArea->StartingAddress); @@ -134,8 +134,8 @@ MmPageOutPhysicalAddress(PFN_NUMBER Page) /* * Get or create a pageop */ - Entry = MmGetPageEntrySectionSegment - (MemoryArea->Data.SectionData.Segment, (PLARGE_INTEGER)&Offset); + Entry = MmGetPageEntrySectionSegment(MemoryArea->Data.SectionData.Segment, + (PLARGE_INTEGER)&Offset); if (Entry && IS_SWAP_FROM_SSE(Entry) && SWAPENTRY_FROM_SSE(Entry) == MM_WAIT_ENTRY) { MmUnlockSectionSegment(MemoryArea->Data.SectionData.Segment); @@ -430,7 +430,7 @@ schema. In short, this requires the address part to be 0xffffff00 + n where n is between 0 and 255. When such an rmap exists, it specifies a segment rmap in which the process part is a pointer to a slice of a section page table, and the low 8 bits of the address represent a page index in the -page table slice. Together, this information is used by +page table slice. Together, this information is used by MmGetSectionAssociation to determine which page entry points to this page in the segment page table. diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index 03990c6c9a9..039046394ef 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -1163,7 +1163,7 @@ MiReadPage(PMEMORY_AREA MemoryArea, NTSTATUS NTAPI MiReadPage(PMEMORY_AREA MemoryArea, - ULONG SegOffset, + ULONG_PTR SegOffset, PPFN_NUMBER Page) /* * FUNCTION: Read a page for a section backed memory area. @@ -1685,7 +1685,7 @@ MmAccessFaultSectionView(PMMSUPPORT AddressSpace, */ MmLockSectionSegment(Segment); Entry = MmGetPageEntrySectionSegment(Segment, &Offset); - + /* * Wait for any other operations to complete */ @@ -2418,7 +2418,7 @@ MmAlterViewAttributes(PMMSUPPORT AddressSpace, + MemoryArea->Data.SectionData.ViewOffset.QuadPart; Entry = MmGetPageEntrySectionSegment(Segment, &Offset); /* - * An MM_WAIT_ENTRY is ok in this case... It'll just count as + * An MM_WAIT_ENTRY is ok in this case... It'll just count as * IS_SWAP_FROM_SSE and we'll do the right thing. */ Page = MmGetPfnForProcess(Process, Address);