Author: tkreuzer Date: Fri May 4 11:32:07 2012 New Revision: 56491
URL: http://svn.reactos.org/svn/reactos?rev=56491&view=rev Log: [NTOSKRNL] - Fix amd64 build - Fix some MSVC/amd64 warnings
Modified: trunk/reactos/ntoskrnl/cache/section/data.c trunk/reactos/ntoskrnl/mm/ARM3/section.c trunk/reactos/ntoskrnl/mm/ARM3/virtual.c trunk/reactos/ntoskrnl/mm/rmap.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/data... ============================================================================== --- trunk/reactos/ntoskrnl/cache/section/data.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/cache/section/data.c [iso-8859-1] Fri May 4 11:32:07 2012 @@ -869,7 +869,7 @@ 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; }
Modified: trunk/reactos/ntoskrnl/mm/ARM3/section.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/section.c?... ============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] Fri May 4 11:32:07 2012 @@ -1738,12 +1738,16 @@ /* 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 @@ 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 @@
/* 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 */
Modified: trunk/reactos/ntoskrnl/mm/ARM3/virtual.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/virtual.c?... ============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] Fri May 4 11:32:07 2012 @@ -3579,7 +3579,7 @@ // 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);
//
Modified: trunk/reactos/ntoskrnl/mm/rmap.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/rmap.c?rev=5649... ============================================================================== --- trunk/reactos/ntoskrnl/mm/rmap.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/rmap.c [iso-8859-1] Fri May 4 11:32:07 2012 @@ -125,7 +125,7 @@ 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 @@ /* * 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 @@ 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.
Modified: trunk/reactos/ntoskrnl/mm/section.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=5... ============================================================================== --- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Fri May 4 11:32:07 2012 @@ -1163,7 +1163,7 @@ 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 @@ */ MmLockSectionSegment(Segment); Entry = MmGetPageEntrySectionSegment(Segment, &Offset); - + /* * Wait for any other operations to complete */ @@ -2418,7 +2418,7 @@ + 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);