mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[NTOS] Fix 64 bit warnings
This commit is contained in:
parent
9078c335f7
commit
2dade10d54
12 changed files with 26 additions and 24 deletions
2
ntoskrnl/cache/section/swapout.c
vendored
2
ntoskrnl/cache/section/swapout.c
vendored
|
@ -254,7 +254,7 @@ MmFinalizeSectionPageOut(PMM_SECTION_SEGMENT Segment,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note: Writing may evict the segment... Nothing is guaranteed from here down */
|
/* Note: Writing may evict the segment... Nothing is guaranteed from here down */
|
||||||
MiSetPageEvent(Segment, FileOffset->LowPart);
|
MiSetPageEvent(Segment, (ULONG_PTR)FileOffset->QuadPart);
|
||||||
|
|
||||||
DPRINT("Status %x\n", Status);
|
DPRINT("Status %x\n", Status);
|
||||||
return Status;
|
return Status;
|
||||||
|
|
|
@ -184,8 +184,8 @@ ExInterlockedRemoveHeadList(
|
||||||
/* Remove the first entry from the list head */
|
/* Remove the first entry from the list head */
|
||||||
ListEntry = RemoveHeadList(ListHead);
|
ListEntry = RemoveHeadList(ListHead);
|
||||||
#if DBG
|
#if DBG
|
||||||
ListEntry->Flink = (PLIST_ENTRY)0xBADDD0FF;
|
ListEntry->Flink = (PLIST_ENTRY)(ULONG_PTR)0xBADDD0FFBADDD0FFULL;
|
||||||
ListEntry->Blink = (PLIST_ENTRY)0xBADDD0FF;
|
ListEntry->Blink = (PLIST_ENTRY)(ULONG_PTR)0xBADDD0FFBADDD0FFULL;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ ExInterlockedPopEntryList(
|
||||||
ListEntry = PopEntryList(ListHead);
|
ListEntry = PopEntryList(ListHead);
|
||||||
#if DBG
|
#if DBG
|
||||||
if (ListEntry)
|
if (ListEntry)
|
||||||
ListEntry->Next = (PSINGLE_LIST_ENTRY)0xBADDD0FF;
|
ListEntry->Next = (PSINGLE_LIST_ENTRY)(ULONG_PTR)0xBADDD0FFBADDD0FFULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Release the spinlock and restore interrupts */
|
/* Release the spinlock and restore interrupts */
|
||||||
|
@ -418,7 +418,7 @@ ExfInterlockedPopEntryList(
|
||||||
ListEntry = PopEntryList(ListHead);
|
ListEntry = PopEntryList(ListHead);
|
||||||
#if DBG
|
#if DBG
|
||||||
if (ListEntry)
|
if (ListEntry)
|
||||||
ListEntry->Next = (PSINGLE_LIST_ENTRY)0xBADDD0FF;
|
ListEntry->Next = (PSINGLE_LIST_ENTRY)(ULONG_PTR)0xBADDD0FFBADDD0FFULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Release the spinlock and restore interrupts */
|
/* Release the spinlock and restore interrupts */
|
||||||
|
|
|
@ -176,7 +176,7 @@ xHalGetInterruptTranslator(IN INTERFACE_TYPE ParentInterfaceType,
|
||||||
Translator->Size = sizeof(TRANSLATOR_INTERFACE);
|
Translator->Size = sizeof(TRANSLATOR_INTERFACE);
|
||||||
Translator->Version = HAL_IRQ_TRANSLATOR_VERSION;
|
Translator->Version = HAL_IRQ_TRANSLATOR_VERSION;
|
||||||
/* In case caller set interface to undefined, faulty it to ISA */
|
/* In case caller set interface to undefined, faulty it to ISA */
|
||||||
Translator->Context = (PVOID)((BridgeInterfaceType == InterfaceTypeUndefined) ? Isa : BridgeInterfaceType);
|
Translator->Context = UlongToPtr((BridgeInterfaceType == InterfaceTypeUndefined) ? Isa : BridgeInterfaceType);
|
||||||
Translator->InterfaceReference = FstubTranslatorNull;
|
Translator->InterfaceReference = FstubTranslatorNull;
|
||||||
Translator->InterfaceDereference = FstubTranslatorNull;
|
Translator->InterfaceDereference = FstubTranslatorNull;
|
||||||
Translator->TranslateResources = FstubTranslateResource;
|
Translator->TranslateResources = FstubTranslateResource;
|
||||||
|
|
|
@ -63,7 +63,7 @@ PiInitCacheGroupInformation(VOID)
|
||||||
|
|
||||||
/* Bogus data */
|
/* Bogus data */
|
||||||
PiInitGroupOrderTableCount = 0;
|
PiInitGroupOrderTableCount = 0;
|
||||||
PiInitGroupOrderTable = (PVOID)0xBABEB00B;
|
PiInitGroupOrderTable = (PVOID)(ULONG_PTR)0xBABEB00BBABEB00BULL;
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ MiFindContiguousPages(IN PFN_NUMBER LowestPfn,
|
||||||
Pfn1->u3.e1.EndOfAllocation = 0;
|
Pfn1->u3.e1.EndOfAllocation = 0;
|
||||||
Pfn1->u3.e1.PrototypePte = 0;
|
Pfn1->u3.e1.PrototypePte = 0;
|
||||||
Pfn1->u4.VerifierAllocation = 0;
|
Pfn1->u4.VerifierAllocation = 0;
|
||||||
Pfn1->PteAddress = (PVOID)0xBAADF00D;
|
Pfn1->PteAddress = (PVOID)(ULONG_PTR)0xBAADF00DBAADF00DULL;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check if this is the last PFN, otherwise go on
|
// Check if this is the last PFN, otherwise go on
|
||||||
|
|
|
@ -1194,7 +1194,7 @@ MmProbeAndLockPages(IN PMDL Mdl,
|
||||||
Address = MiPteToAddress(PointerPte);
|
Address = MiPteToAddress(PointerPte);
|
||||||
|
|
||||||
//HACK: Pass a placeholder TrapInformation so the fault handler knows we're unlocked
|
//HACK: Pass a placeholder TrapInformation so the fault handler knows we're unlocked
|
||||||
Status = MmAccessFault(FALSE, Address, KernelMode, (PVOID)0xBADBADA3);
|
Status = MmAccessFault(FALSE, Address, KernelMode, (PVOID)(ULONG_PTR)0xBADBADA3BADBADA3ULL);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
@ -1263,7 +1263,7 @@ MmProbeAndLockPages(IN PMDL Mdl,
|
||||||
//
|
//
|
||||||
|
|
||||||
//HACK: Pass a placeholder TrapInformation so the fault handler knows we're unlocked
|
//HACK: Pass a placeholder TrapInformation so the fault handler knows we're unlocked
|
||||||
Status = MmAccessFault(TRUE, Address, KernelMode, (PVOID)0xBADBADA3);
|
Status = MmAccessFault(TRUE, Address, KernelMode, (PVOID)(ULONG_PTR)0xBADBADA3BADBADA3ULL);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
|
|
@ -855,10 +855,10 @@ MiInitializeWorkingSetList(IN PEPROCESS CurrentProcess)
|
||||||
MmWorkingSetList->HashTable = NULL;
|
MmWorkingSetList->HashTable = NULL;
|
||||||
MmWorkingSetList->HashTableSize = 0;
|
MmWorkingSetList->HashTableSize = 0;
|
||||||
MmWorkingSetList->NumberOfImageWaiters = 0;
|
MmWorkingSetList->NumberOfImageWaiters = 0;
|
||||||
MmWorkingSetList->Wsle = (PVOID)0xDEADBABE;
|
MmWorkingSetList->Wsle = (PVOID)(ULONG_PTR)0xDEADBABEDEADBABEULL;
|
||||||
MmWorkingSetList->VadBitMapHint = 1;
|
MmWorkingSetList->VadBitMapHint = 1;
|
||||||
MmWorkingSetList->HashTableStart = (PVOID)0xBADAB00B;
|
MmWorkingSetList->HashTableStart = (PVOID)(ULONG_PTR)0xBADAB00BBADAB00BULL;
|
||||||
MmWorkingSetList->HighestPermittedHashAddress = (PVOID)0xCAFEBABE;
|
MmWorkingSetList->HighestPermittedHashAddress = (PVOID)(ULONG_PTR)0xCAFEBABECAFEBABEULL;
|
||||||
MmWorkingSetList->FirstFree = 1;
|
MmWorkingSetList->FirstFree = 1;
|
||||||
MmWorkingSetList->FirstDynamic = 2;
|
MmWorkingSetList->FirstDynamic = 2;
|
||||||
MmWorkingSetList->NextSlot = 3;
|
MmWorkingSetList->NextSlot = 3;
|
||||||
|
|
|
@ -1370,7 +1370,7 @@ MiMapViewOfDataSection(IN PCONTROL_AREA ControlArea,
|
||||||
}
|
}
|
||||||
|
|
||||||
RtlZeroMemory(Vad, sizeof(MMVAD_LONG));
|
RtlZeroMemory(Vad, sizeof(MMVAD_LONG));
|
||||||
Vad->u4.Banked = (PVOID)0xDEADBABE;
|
Vad->u4.Banked = (PVOID)(ULONG_PTR)0xDEADBABEDEADBABEULL;
|
||||||
|
|
||||||
/* Write all the data required in the VAD for handling a fault */
|
/* Write all the data required in the VAD for handling a fault */
|
||||||
Vad->ControlArea = ControlArea;
|
Vad->ControlArea = ControlArea;
|
||||||
|
|
|
@ -172,7 +172,7 @@ MiInsertNode(IN PMM_AVL_TABLE Table,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* This is a section VAD. Store the MAREA here for now */
|
/* This is a section VAD. Store the MAREA here for now */
|
||||||
ASSERT(Vad->u4.Banked == (PVOID)0xDEADBABE);
|
ASSERT(Vad->u4.Banked == (PVOID)(ULONG_PTR)0xDEADBABEDEADBABEULL);
|
||||||
Vad->u4.Banked = (PVOID)MemoryArea;
|
Vad->u4.Banked = (PVOID)MemoryArea;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -399,7 +399,7 @@ MiRemoveNode(IN PMMADDRESS_NODE Node,
|
||||||
if (MemoryArea)
|
if (MemoryArea)
|
||||||
{
|
{
|
||||||
/* Make sure we have not already freed it */
|
/* Make sure we have not already freed it */
|
||||||
ASSERT(MemoryArea != (PVOID)0xDEADBAB1);
|
ASSERT(MemoryArea != (PVOID)(ULONG_PTR)0xDEADBAB1DEADBAB1ULL);
|
||||||
|
|
||||||
/* Get the process */
|
/* Get the process */
|
||||||
Process = CONTAINING_RECORD(Table, EPROCESS, VadRoot);
|
Process = CONTAINING_RECORD(Table, EPROCESS, VadRoot);
|
||||||
|
@ -415,12 +415,12 @@ MiRemoveNode(IN PMMADDRESS_NODE Node,
|
||||||
if (Vad->ControlArea == NULL)
|
if (Vad->ControlArea == NULL)
|
||||||
{
|
{
|
||||||
/* Delete the pointer to it */
|
/* Delete the pointer to it */
|
||||||
Vad->FirstPrototypePte = (PVOID)0xDEADBAB1;
|
Vad->FirstPrototypePte = (PVOID)(ULONG_PTR)0xDEADBAB1DEADBAB1ULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Delete the pointer to it */
|
/* Delete the pointer to it */
|
||||||
Vad->u4.Banked = (PVOID)0xDEADBAB1;
|
Vad->u4.Banked = (PVOID)(ULONG_PTR)0xDEADBAB1DEADBAB1ULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3350,7 +3350,7 @@ MiLockVirtualMemory(
|
||||||
CurrentVa = MiPteToAddress(PointerPte);
|
CurrentVa = MiPteToAddress(PointerPte);
|
||||||
|
|
||||||
//HACK: Pass a placeholder TrapInformation so the fault handler knows we're unlocked
|
//HACK: Pass a placeholder TrapInformation so the fault handler knows we're unlocked
|
||||||
TempStatus = MmAccessFault(TRUE, CurrentVa, KernelMode, (PVOID)0xBADBADA3);
|
TempStatus = MmAccessFault(TRUE, CurrentVa, KernelMode, (PVOID)(ULONG_PTR)0xBADBADA3BADBADA3ULL);
|
||||||
if (!NT_SUCCESS(TempStatus))
|
if (!NT_SUCCESS(TempStatus))
|
||||||
{
|
{
|
||||||
// This should only happen, when remote backing storage is not accessible
|
// This should only happen, when remote backing storage is not accessible
|
||||||
|
|
|
@ -570,8 +570,10 @@ NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
MmDeleteProcessAddressSpace(PEPROCESS Process)
|
MmDeleteProcessAddressSpace(PEPROCESS Process)
|
||||||
{
|
{
|
||||||
|
#ifndef _M_AMD64
|
||||||
KIRQL OldIrql;
|
KIRQL OldIrql;
|
||||||
PVOID Address;
|
PVOID Address;
|
||||||
|
#endif
|
||||||
|
|
||||||
DPRINT("MmDeleteProcessAddressSpace(Process %p (%s))\n", Process,
|
DPRINT("MmDeleteProcessAddressSpace(Process %p (%s))\n", Process,
|
||||||
Process->ImageFileName);
|
Process->ImageFileName);
|
||||||
|
|
|
@ -137,7 +137,7 @@ ObpDeallocateObject(IN PVOID Object)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Catch invalid access */
|
/* Catch invalid access */
|
||||||
Header->Type = (POBJECT_TYPE)0xBAADB0B0;
|
Header->Type = (POBJECT_TYPE)(ULONG_PTR)0xBAADB0B0BAADB0B0ULL;
|
||||||
|
|
||||||
/* Free the object using the same allocation tag */
|
/* Free the object using the same allocation tag */
|
||||||
ExFreePoolWithTag(HeaderLocation, ObjectType->Key);
|
ExFreePoolWithTag(HeaderLocation, ObjectType->Key);
|
||||||
|
@ -1215,14 +1215,14 @@ ObCreateObjectType(IN PUNICODE_STRING TypeName,
|
||||||
else if ((TypeName->Length == 8) && !(wcscmp(TypeName->Buffer, L"File")))
|
else if ((TypeName->Length == 8) && !(wcscmp(TypeName->Buffer, L"File")))
|
||||||
{
|
{
|
||||||
/* Wait on the File Object's event directly */
|
/* Wait on the File Object's event directly */
|
||||||
LocalObjectType->DefaultObject = (PVOID)FIELD_OFFSET(FILE_OBJECT,
|
LocalObjectType->DefaultObject = UlongToPtr(FIELD_OFFSET(FILE_OBJECT,
|
||||||
Event);
|
Event));
|
||||||
}
|
}
|
||||||
else if ((TypeName->Length == 24) && !(wcscmp(TypeName->Buffer, L"WaitablePort")))
|
else if ((TypeName->Length == 24) && !(wcscmp(TypeName->Buffer, L"WaitablePort")))
|
||||||
{
|
{
|
||||||
/* Wait on the LPC Port's object directly */
|
/* Wait on the LPC Port's object directly */
|
||||||
LocalObjectType->DefaultObject = (PVOID)FIELD_OFFSET(LPCP_PORT_OBJECT,
|
LocalObjectType->DefaultObject = UlongToPtr(FIELD_OFFSET(LPCP_PORT_OBJECT,
|
||||||
WaitEvent);
|
WaitEvent));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue