[NTOSKRNL]

- Fix amd64 build
- Fix some MSVC/amd64 warnings

svn path=/trunk/; revision=56491
This commit is contained in:
Timo Kreuzer 2012-05-04 11:32:07 +00:00
parent f6abb6c7ac
commit 5c32d6c764
5 changed files with 16 additions and 11 deletions

View file

@ -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;
}

View file

@ -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 */

View file

@ -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);
//

View file

@ -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);

View file

@ -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.