mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 07:46:29 +00:00
[NTOSKRNL]
Fix a number of warnings from VS /analyze svn path=/trunk/; revision=58319
This commit is contained in:
parent
a087bbe982
commit
987bf80da1
11 changed files with 115 additions and 125 deletions
74
reactos/ntoskrnl/cache/section/data.c
vendored
74
reactos/ntoskrnl/cache/section/data.c
vendored
|
@ -131,9 +131,9 @@ MiZeroFillSection(PVOID Address, PLARGE_INTEGER FileOffsetPtr, ULONG Length)
|
||||||
LARGE_INTEGER FileOffset = *FileOffsetPtr, End, FirstMapped;
|
LARGE_INTEGER FileOffset = *FileOffsetPtr, End, FirstMapped;
|
||||||
KIRQL OldIrql;
|
KIRQL OldIrql;
|
||||||
|
|
||||||
DPRINT("MiZeroFillSection(Address %x,Offset %x,Length %x)\n",
|
DPRINT("MiZeroFillSection(Address %p, Offset 0x%I64x,Length 0x%lx)\n",
|
||||||
Address,
|
Address,
|
||||||
FileOffset.LowPart,
|
FileOffset.QuadPart,
|
||||||
Length);
|
Length);
|
||||||
|
|
||||||
AddressSpace = MmGetKernelAddressSpace();
|
AddressSpace = MmGetKernelAddressSpace();
|
||||||
|
@ -224,10 +224,10 @@ _MiFlushMappedSection(PVOID BaseAddress,
|
||||||
PPFN_NUMBER Pages;
|
PPFN_NUMBER Pages;
|
||||||
KIRQL OldIrql;
|
KIRQL OldIrql;
|
||||||
|
|
||||||
DPRINT("MiFlushMappedSection(%x,%08x,%x,%d,%s:%d)\n",
|
DPRINT("MiFlushMappedSection(%p,%I64x,%I64x,%u,%s:%d)\n",
|
||||||
BaseAddress,
|
BaseAddress,
|
||||||
BaseOffset->LowPart,
|
BaseOffset->QuadPart,
|
||||||
FileSize,
|
FileSize ? FileSize->QuadPart : 0,
|
||||||
WriteData,
|
WriteData,
|
||||||
File,
|
File,
|
||||||
Line);
|
Line);
|
||||||
|
@ -508,7 +508,7 @@ MmCreateCacheSection(PROS_SECTION_OBJECT *SectionObject,
|
||||||
return STATUS_NO_MEMORY;
|
return STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("Zeroing %x\n", Segment);
|
DPRINT("Zeroing %p\n", Segment);
|
||||||
RtlZeroMemory(Segment, sizeof(MM_SECTION_SEGMENT));
|
RtlZeroMemory(Segment, sizeof(MM_SECTION_SEGMENT));
|
||||||
ExInitializeFastMutex(&Segment->Lock);
|
ExInitializeFastMutex(&Segment->Lock);
|
||||||
|
|
||||||
|
@ -555,7 +555,7 @@ MmCreateCacheSection(PROS_SECTION_OBJECT *SectionObject,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KeReleaseSpinLock(&FileObject->IrpListLock, OldIrql);
|
KeReleaseSpinLock(&FileObject->IrpListLock, OldIrql);
|
||||||
DPRINTC("Free Segment %x\n", Segment);
|
DPRINTC("Free Segment %p\n", Segment);
|
||||||
ExFreePoolWithTag(Segment, TAG_MM_SECTION_SEGMENT);
|
ExFreePoolWithTag(Segment, TAG_MM_SECTION_SEGMENT);
|
||||||
|
|
||||||
DPRINT("Filling out Segment info (previous data section)\n");
|
DPRINT("Filling out Segment info (previous data section)\n");
|
||||||
|
@ -583,16 +583,13 @@ MmCreateCacheSection(PROS_SECTION_OBJECT *SectionObject,
|
||||||
Section->MaximumSize.QuadPart = MaximumSize.QuadPart;
|
Section->MaximumSize.QuadPart = MaximumSize.QuadPart;
|
||||||
|
|
||||||
/* Extend file if section is longer */
|
/* Extend file if section is longer */
|
||||||
DPRINT("MaximumSize %08x%08x ValidDataLength %08x%08x\n",
|
DPRINT("MaximumSize %I64x ValidDataLength %I64x\n",
|
||||||
MaximumSize.u.HighPart,
|
MaximumSize.QuadPart,
|
||||||
MaximumSize.u.LowPart,
|
FileSizes.ValidDataLength.QuadPart);
|
||||||
FileSizes.ValidDataLength.u.HighPart,
|
|
||||||
FileSizes.ValidDataLength.u.LowPart);
|
|
||||||
if (MaximumSize.QuadPart > FileSizes.ValidDataLength.QuadPart)
|
if (MaximumSize.QuadPart > FileSizes.ValidDataLength.QuadPart)
|
||||||
{
|
{
|
||||||
DPRINT("Changing file size to %08x%08x, segment %x\n",
|
DPRINT("Changing file size to %I64x, segment %p\n",
|
||||||
MaximumSize.u.HighPart,
|
MaximumSize.QuadPart,
|
||||||
MaximumSize.u.LowPart,
|
|
||||||
Segment);
|
Segment);
|
||||||
|
|
||||||
Status = IoSetInformation(FileObject,
|
Status = IoSetInformation(FileObject,
|
||||||
|
@ -609,7 +606,7 @@ MmCreateCacheSection(PROS_SECTION_OBJECT *SectionObject,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINTC("Segment %x created (%x)\n", Segment, Segment->Flags);
|
DPRINTC("Segment %p created (%x)\n", Segment, Segment->Flags);
|
||||||
|
|
||||||
*SectionObject = Section;
|
*SectionObject = Section;
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
|
@ -645,7 +642,7 @@ _MiMapViewOfSegment(PMMSUPPORT AddressSpace,
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("Mapping between 0x%.8X and 0x%.8X failed (%X).\n",
|
DPRINT("Mapping between 0x%p and 0x%p failed (%X).\n",
|
||||||
(*BaseAddress),
|
(*BaseAddress),
|
||||||
(char*)(*BaseAddress) + ViewSize,
|
(char*)(*BaseAddress) + ViewSize,
|
||||||
Status);
|
Status);
|
||||||
|
@ -653,11 +650,11 @@ _MiMapViewOfSegment(PMMSUPPORT AddressSpace,
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINTC("MiMapViewOfSegment %x %x %x %x %x %wZ %s:%d\n",
|
DPRINTC("MiMapViewOfSegment %p %p %p %I64x %Ix %wZ %s:%d\n",
|
||||||
MmGetAddressSpaceOwner(AddressSpace),
|
MmGetAddressSpaceOwner(AddressSpace),
|
||||||
*BaseAddress,
|
*BaseAddress,
|
||||||
Segment,
|
Segment,
|
||||||
ViewOffset ? ViewOffset->LowPart : 0,
|
ViewOffset ? ViewOffset->QuadPart : 0,
|
||||||
ViewSize,
|
ViewSize,
|
||||||
Segment->FileObject ? &Segment->FileObject->FileName : NULL,
|
Segment->FileObject ? &Segment->FileObject->FileName : NULL,
|
||||||
file,
|
file,
|
||||||
|
@ -680,7 +677,7 @@ _MiMapViewOfSegment(PMMSUPPORT AddressSpace,
|
||||||
0,
|
0,
|
||||||
Protect);
|
Protect);
|
||||||
|
|
||||||
DPRINTC("MiMapViewOfSegment(P %x, A %x, T %x)\n",
|
DPRINTC("MiMapViewOfSegment(P %p, A %p, T %x)\n",
|
||||||
MmGetAddressSpaceOwner(AddressSpace),
|
MmGetAddressSpaceOwner(AddressSpace),
|
||||||
*BaseAddress,
|
*BaseAddress,
|
||||||
MArea->Type);
|
MArea->Type);
|
||||||
|
@ -704,10 +701,9 @@ MiFreeSegmentPage(PMM_SECTION_SEGMENT Segment,
|
||||||
PFILE_OBJECT FileObject = Segment->FileObject;
|
PFILE_OBJECT FileObject = Segment->FileObject;
|
||||||
|
|
||||||
Entry = MmGetPageEntrySectionSegment(Segment, FileOffset);
|
Entry = MmGetPageEntrySectionSegment(Segment, FileOffset);
|
||||||
DPRINTC("MiFreeSegmentPage(%x:%08x%08x -> Entry %x\n",
|
DPRINTC("MiFreeSegmentPage(%p:%I64x -> Entry %Ix\n",
|
||||||
Segment,
|
Segment,
|
||||||
FileOffset->HighPart,
|
FileOffset->QuadPart,
|
||||||
FileOffset->LowPart,
|
|
||||||
Entry);
|
Entry);
|
||||||
|
|
||||||
if (Entry && !IS_SWAP_FROM_SSE(Entry))
|
if (Entry && !IS_SWAP_FROM_SSE(Entry))
|
||||||
|
@ -716,17 +712,16 @@ MiFreeSegmentPage(PMM_SECTION_SEGMENT Segment,
|
||||||
PFN_NUMBER OldPage = PFN_FROM_SSE(Entry);
|
PFN_NUMBER OldPage = PFN_FROM_SSE(Entry);
|
||||||
if (IS_DIRTY_SSE(Entry) && FileObject)
|
if (IS_DIRTY_SSE(Entry) && FileObject)
|
||||||
{
|
{
|
||||||
DPRINT("MiWriteBackPage(%x,%wZ,%08x%08x)\n",
|
DPRINT("MiWriteBackPage(%p,%wZ,%I64x)\n",
|
||||||
Segment,
|
Segment,
|
||||||
&FileObject->FileName,
|
&FileObject->FileName,
|
||||||
FileOffset->u.HighPart,
|
FileOffset->QuadPart);
|
||||||
FileOffset->u.LowPart);
|
|
||||||
|
|
||||||
MiWriteBackPage(FileObject, FileOffset, PAGE_SIZE, OldPage);
|
MiWriteBackPage(FileObject, FileOffset, PAGE_SIZE, OldPage);
|
||||||
}
|
}
|
||||||
DPRINTC("Free page %x (off %x from %x) (ref ct %d, ent %x, dirty? %s)\n",
|
DPRINTC("Free page %Ix (off %I64x from %p) (ref ct %lu, ent %Ix, dirty? %s)\n",
|
||||||
OldPage,
|
OldPage,
|
||||||
FileOffset->LowPart,
|
FileOffset->QuadPart,
|
||||||
Segment,
|
Segment,
|
||||||
MmGetReferenceCountPage(OldPage),
|
MmGetReferenceCountPage(OldPage),
|
||||||
Entry,
|
Entry,
|
||||||
|
@ -759,7 +754,7 @@ MmFreeCacheSectionPage(PVOID Context,
|
||||||
PMM_SECTION_SEGMENT Segment;
|
PMM_SECTION_SEGMENT Segment;
|
||||||
LARGE_INTEGER Offset;
|
LARGE_INTEGER Offset;
|
||||||
|
|
||||||
DPRINT("MmFreeSectionPage(%x,%x,%x,%x,%d)\n",
|
DPRINT("MmFreeSectionPage(%p,%p,%Ix,%Ix,%u)\n",
|
||||||
MmGetAddressSpaceOwner(ContextData[0]),
|
MmGetAddressSpaceOwner(ContextData[0]),
|
||||||
Address,
|
Address,
|
||||||
Page,
|
Page,
|
||||||
|
@ -777,12 +772,12 @@ MmFreeCacheSectionPage(PVOID Context,
|
||||||
|
|
||||||
if (Page != 0 && PFN_FROM_SSE(Entry) == Page && Dirty)
|
if (Page != 0 && PFN_FROM_SSE(Entry) == Page && Dirty)
|
||||||
{
|
{
|
||||||
DPRINT("Freeing section page %x:%x -> %x\n", Segment, Offset.LowPart, Entry);
|
DPRINT("Freeing section page %p:%I64x -> %Ix\n", Segment, Offset.QuadPart, Entry);
|
||||||
MmSetPageEntrySectionSegment(Segment, &Offset, DIRTY_SSE(Entry));
|
MmSetPageEntrySectionSegment(Segment, &Offset, DIRTY_SSE(Entry));
|
||||||
}
|
}
|
||||||
if (Page)
|
if (Page)
|
||||||
{
|
{
|
||||||
DPRINT("Removing page %x:%x -> %x\n", Segment, Offset.LowPart, Entry);
|
DPRINT("Removing page %p:%I64x -> %x\n", Segment, Offset.QuadPart, Entry);
|
||||||
MmSetSavedSwapEntryPage(Page, 0);
|
MmSetSavedSwapEntryPage(Page, 0);
|
||||||
MmDeleteRmap(Page, Process, Address);
|
MmDeleteRmap(Page, Process, Address);
|
||||||
MmDeleteVirtualMapping(Process, Address, FALSE, NULL, NULL);
|
MmDeleteVirtualMapping(Process, Address, FALSE, NULL, NULL);
|
||||||
|
@ -819,7 +814,7 @@ MmUnmapViewOfCacheSegment(PMMSUPPORT AddressSpace,
|
||||||
Context[0] = AddressSpace;
|
Context[0] = AddressSpace;
|
||||||
Context[1] = Segment;
|
Context[1] = Segment;
|
||||||
|
|
||||||
DPRINT("MmFreeMemoryArea(%x,%x)\n",
|
DPRINT("MmFreeMemoryArea(%p,%p)\n",
|
||||||
MmGetAddressSpaceOwner(AddressSpace),
|
MmGetAddressSpaceOwner(AddressSpace),
|
||||||
MemoryArea->StartingAddress);
|
MemoryArea->StartingAddress);
|
||||||
|
|
||||||
|
@ -827,7 +822,7 @@ MmUnmapViewOfCacheSegment(PMMSUPPORT AddressSpace,
|
||||||
|
|
||||||
MmUnlockSectionSegment(Segment);
|
MmUnlockSectionSegment(Segment);
|
||||||
|
|
||||||
DPRINTC("MiUnmapViewOfSegment %x %x %x\n",
|
DPRINTC("MiUnmapViewOfSegment %p %p %p\n",
|
||||||
MmGetAddressSpaceOwner(AddressSpace),
|
MmGetAddressSpaceOwner(AddressSpace),
|
||||||
BaseAddress,
|
BaseAddress,
|
||||||
Segment);
|
Segment);
|
||||||
|
@ -843,15 +838,15 @@ MmExtendCacheSection(PROS_SECTION_OBJECT Section,
|
||||||
{
|
{
|
||||||
LARGE_INTEGER OldSize;
|
LARGE_INTEGER OldSize;
|
||||||
PMM_SECTION_SEGMENT Segment = Section->Segment;
|
PMM_SECTION_SEGMENT Segment = Section->Segment;
|
||||||
DPRINT("Extend Segment %x\n", Segment);
|
DPRINT("Extend Segment %p\n", Segment);
|
||||||
|
|
||||||
MmLockSectionSegment(Segment);
|
MmLockSectionSegment(Segment);
|
||||||
OldSize.QuadPart = Segment->RawLength.QuadPart;
|
OldSize.QuadPart = Segment->RawLength.QuadPart;
|
||||||
MmUnlockSectionSegment(Segment);
|
MmUnlockSectionSegment(Segment);
|
||||||
|
|
||||||
DPRINT("OldSize %08x%08x NewSize %08x%08x\n",
|
DPRINT("OldSize 0x%I64x NewSize 0x%I64x\n",
|
||||||
OldSize.u.HighPart, OldSize.u.LowPart,
|
OldSize.QuadPart,
|
||||||
NewSize->u.HighPart, NewSize->u.LowPart);
|
NewSize->QuadPart);
|
||||||
|
|
||||||
if (ExtendFile && OldSize.QuadPart < NewSize->QuadPart)
|
if (ExtendFile && OldSize.QuadPart < NewSize->QuadPart)
|
||||||
{
|
{
|
||||||
|
@ -883,9 +878,8 @@ MmMapCacheViewInSystemSpaceAtOffset(IN PMM_SECTION_SEGMENT Segment,
|
||||||
PMMSUPPORT AddressSpace;
|
PMMSUPPORT AddressSpace;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
DPRINT("MmMapViewInSystemSpaceAtOffset() called offset %08x%08x\n",
|
DPRINT("MmMapViewInSystemSpaceAtOffset() called offset 0x%I64x\n",
|
||||||
FileOffset->HighPart,
|
FileOffset->QuadPart);
|
||||||
FileOffset->LowPart);
|
|
||||||
|
|
||||||
AddressSpace = MmGetKernelAddressSpace();
|
AddressSpace = MmGetKernelAddressSpace();
|
||||||
|
|
||||||
|
|
58
reactos/ntoskrnl/cache/section/fault.c
vendored
58
reactos/ntoskrnl/cache/section/fault.c
vendored
|
@ -189,7 +189,7 @@ MmNotPresentFaultCachePage (
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT("Set %x in address space @ %x\n", Required->Page[0], Address);
|
DPRINT("Set %x in address space @ %p\n", Required->Page[0], Address);
|
||||||
Status = MmCreateVirtualMapping(Process,
|
Status = MmCreateVirtualMapping(Process,
|
||||||
Address,
|
Address,
|
||||||
Attributes,
|
Attributes,
|
||||||
|
@ -332,7 +332,7 @@ MiCowCacheSectionPage (
|
||||||
LARGE_INTEGER Offset;
|
LARGE_INTEGER Offset;
|
||||||
PEPROCESS Process = MmGetAddressSpaceOwner(AddressSpace);
|
PEPROCESS Process = MmGetAddressSpaceOwner(AddressSpace);
|
||||||
|
|
||||||
DPRINT("MmAccessFaultSectionView(%x, %x, %x, %x)\n",
|
DPRINT("MmAccessFaultSectionView(%p, %p, %p, %u)\n",
|
||||||
AddressSpace,
|
AddressSpace,
|
||||||
MemoryArea,
|
MemoryArea,
|
||||||
Address,
|
Address,
|
||||||
|
@ -358,11 +358,11 @@ MiCowCacheSectionPage (
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
ULONG_PTR Entry;
|
ULONG_PTR Entry;
|
||||||
DPRINTC("setting non-cow page %x %x:%x offset %x (%x) to writable\n",
|
DPRINTC("setting non-cow page %p %p:%p offset %I64x (%Ix) to writable\n",
|
||||||
Segment,
|
Segment,
|
||||||
Process,
|
Process,
|
||||||
PAddress,
|
PAddress,
|
||||||
Offset.u.LowPart,
|
Offset.QuadPart,
|
||||||
MmGetPfnForProcess(Process, Address));
|
MmGetPfnForProcess(Process, Address));
|
||||||
if (Segment->FileObject)
|
if (Segment->FileObject)
|
||||||
{
|
{
|
||||||
|
@ -450,7 +450,7 @@ MiCowCacheSectionPage (
|
||||||
MmReleasePageMemoryConsumer(MC_CACHE, OldPage);
|
MmReleasePageMemoryConsumer(MC_CACHE, OldPage);
|
||||||
MmUnlockSectionSegment(Segment);
|
MmUnlockSectionSegment(Segment);
|
||||||
|
|
||||||
DPRINT("Address 0x%.8X\n", Address);
|
DPRINT("Address 0x%p\n", Address);
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -539,11 +539,11 @@ MmpSectionAccessFaultInner(KPROCESSOR_MODE Mode,
|
||||||
|
|
||||||
RtlZeroMemory(&Context, sizeof(WORK_QUEUE_WITH_CONTEXT));
|
RtlZeroMemory(&Context, sizeof(WORK_QUEUE_WITH_CONTEXT));
|
||||||
|
|
||||||
DPRINT("MmAccessFault(Mode %d, Address %x)\n", Mode, Address);
|
DPRINT("MmAccessFault(Mode %d, Address %Ix)\n", Mode, Address);
|
||||||
|
|
||||||
if (KeGetCurrentIrql() >= DISPATCH_LEVEL)
|
if (KeGetCurrentIrql() >= DISPATCH_LEVEL)
|
||||||
{
|
{
|
||||||
DPRINT1("Page fault at high IRQL was %d\n", KeGetCurrentIrql());
|
DPRINT1("Page fault at high IRQL was %u\n", KeGetCurrentIrql());
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -553,7 +553,7 @@ MmpSectionAccessFaultInner(KPROCESSOR_MODE Mode,
|
||||||
/* Check permissions */
|
/* Check permissions */
|
||||||
if (Mode != KernelMode)
|
if (Mode != KernelMode)
|
||||||
{
|
{
|
||||||
DPRINT("MmAccessFault(Mode %d, Address %x)\n", Mode, Address);
|
DPRINT("MmAccessFault(Mode %d, Address %Ix)\n", Mode, Address);
|
||||||
return STATUS_ACCESS_VIOLATION;
|
return STATUS_ACCESS_VIOLATION;
|
||||||
}
|
}
|
||||||
AddressSpace = MmGetKernelAddressSpace();
|
AddressSpace = MmGetKernelAddressSpace();
|
||||||
|
@ -578,11 +578,11 @@ MmpSectionAccessFaultInner(KPROCESSOR_MODE Mode,
|
||||||
{
|
{
|
||||||
MmUnlockAddressSpace(AddressSpace);
|
MmUnlockAddressSpace(AddressSpace);
|
||||||
}
|
}
|
||||||
DPRINT("Address: %x\n", Address);
|
DPRINT("Address: %Ix\n", Address);
|
||||||
return STATUS_ACCESS_VIOLATION;
|
return STATUS_ACCESS_VIOLATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("Type %x (%x -> %x)\n",
|
DPRINT("Type %x (%p -> %p)\n",
|
||||||
MemoryArea->Type,
|
MemoryArea->Type,
|
||||||
MemoryArea->StartingAddress,
|
MemoryArea->StartingAddress,
|
||||||
MemoryArea->EndingAddress);
|
MemoryArea->EndingAddress);
|
||||||
|
@ -605,9 +605,9 @@ MmpSectionAccessFaultInner(KPROCESSOR_MODE Mode,
|
||||||
if (Status == STATUS_SUCCESS + 1)
|
if (Status == STATUS_SUCCESS + 1)
|
||||||
{
|
{
|
||||||
/* Wait page ... */
|
/* Wait page ... */
|
||||||
DPRINT("Waiting for %x\n", Address);
|
DPRINT("Waiting for %Ix\n", Address);
|
||||||
MiWaitForPageEvent(MmGetAddressSpaceOwner(AddressSpace), Address);
|
MiWaitForPageEvent(MmGetAddressSpaceOwner(AddressSpace), Address);
|
||||||
DPRINT("Restarting fault %x\n", Address);
|
DPRINT("Restarting fault %Ix\n", Address);
|
||||||
Status = STATUS_MM_RESTART_OPERATION;
|
Status = STATUS_MM_RESTART_OPERATION;
|
||||||
}
|
}
|
||||||
else if (Status == STATUS_MM_RESTART_OPERATION)
|
else if (Status == STATUS_MM_RESTART_OPERATION)
|
||||||
|
@ -619,7 +619,7 @@ MmpSectionAccessFaultInner(KPROCESSOR_MODE Mode,
|
||||||
{
|
{
|
||||||
if (Thread->ActiveFaultCount > 0)
|
if (Thread->ActiveFaultCount > 0)
|
||||||
{
|
{
|
||||||
DPRINT("Already fault handling ... going to work item (%x)\n",
|
DPRINT("Already fault handling ... going to work item (%Ix)\n",
|
||||||
Address);
|
Address);
|
||||||
Context.AddressSpace = AddressSpace;
|
Context.AddressSpace = AddressSpace;
|
||||||
Context.MemoryArea = MemoryArea;
|
Context.MemoryArea = MemoryArea;
|
||||||
|
@ -657,8 +657,8 @@ MmpSectionAccessFaultInner(KPROCESSOR_MODE Mode,
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status) && MemoryArea->Type == 1)
|
if (!NT_SUCCESS(Status) && MemoryArea->Type == 1)
|
||||||
{
|
{
|
||||||
DPRINT1("Completed page fault handling %x %x\n", Address, Status);
|
DPRINT1("Completed page fault handling %Ix %x\n", Address, Status);
|
||||||
DPRINT1("Type %x (%x -> %x)\n",
|
DPRINT1("Type %x (%p -> %p)\n",
|
||||||
MemoryArea->Type,
|
MemoryArea->Type,
|
||||||
MemoryArea->StartingAddress,
|
MemoryArea->StartingAddress,
|
||||||
MemoryArea->EndingAddress);
|
MemoryArea->EndingAddress);
|
||||||
|
@ -693,13 +693,13 @@ MmAccessFaultCacheSection(KPROCESSOR_MODE Mode,
|
||||||
PMMSUPPORT AddressSpace;
|
PMMSUPPORT AddressSpace;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
DPRINT("MmpAccessFault(Mode %d, Address %x)\n", Mode, Address);
|
DPRINT("MmpAccessFault(Mode %d, Address %Ix)\n", Mode, Address);
|
||||||
|
|
||||||
Thread = PsGetCurrentThread();
|
Thread = PsGetCurrentThread();
|
||||||
|
|
||||||
if (KeGetCurrentIrql() >= DISPATCH_LEVEL)
|
if (KeGetCurrentIrql() >= DISPATCH_LEVEL)
|
||||||
{
|
{
|
||||||
DPRINT1("Page fault at high IRQL %d, address %x\n",
|
DPRINT1("Page fault at high IRQL %u, address %Ix\n",
|
||||||
KeGetCurrentIrql(),
|
KeGetCurrentIrql(),
|
||||||
Address);
|
Address);
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
|
@ -711,7 +711,7 @@ MmAccessFaultCacheSection(KPROCESSOR_MODE Mode,
|
||||||
/* Check permissions */
|
/* Check permissions */
|
||||||
if (Mode != KernelMode)
|
if (Mode != KernelMode)
|
||||||
{
|
{
|
||||||
DPRINT1("Address: %x:%x\n", PsGetCurrentProcess(), Address);
|
DPRINT1("Address: %p:%Ix\n", PsGetCurrentProcess(), Address);
|
||||||
return STATUS_ACCESS_VIOLATION;
|
return STATUS_ACCESS_VIOLATION;
|
||||||
}
|
}
|
||||||
AddressSpace = MmGetKernelAddressSpace();
|
AddressSpace = MmGetKernelAddressSpace();
|
||||||
|
@ -780,13 +780,13 @@ MmNotPresentFaultCacheSectionInner(KPROCESSOR_MODE Mode,
|
||||||
{
|
{
|
||||||
DPRINT1("No memory area\n");
|
DPRINT1("No memory area\n");
|
||||||
}
|
}
|
||||||
DPRINT1("Process %x, Address %x\n",
|
DPRINT1("Process %p, Address %Ix\n",
|
||||||
MmGetAddressSpaceOwner(AddressSpace),
|
MmGetAddressSpaceOwner(AddressSpace),
|
||||||
Address);
|
Address);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINTC("Type %x (%x -> %x -> %x) in %x\n",
|
DPRINTC("Type %x (%p -> %08Ix -> %p) in %p\n",
|
||||||
MemoryArea->Type,
|
MemoryArea->Type,
|
||||||
MemoryArea->StartingAddress,
|
MemoryArea->StartingAddress,
|
||||||
Address,
|
Address,
|
||||||
|
@ -816,9 +816,9 @@ MmNotPresentFaultCacheSectionInner(KPROCESSOR_MODE Mode,
|
||||||
else if (Status == STATUS_SUCCESS + 1)
|
else if (Status == STATUS_SUCCESS + 1)
|
||||||
{
|
{
|
||||||
/* Wait page ... */
|
/* Wait page ... */
|
||||||
DPRINT("Waiting for %x\n", Address);
|
DPRINT("Waiting for %Ix\n", Address);
|
||||||
MiWaitForPageEvent(MmGetAddressSpaceOwner(AddressSpace), Address);
|
MiWaitForPageEvent(MmGetAddressSpaceOwner(AddressSpace), Address);
|
||||||
DPRINT("Done waiting for %x\n", Address);
|
DPRINT("Done waiting for %Ix\n", Address);
|
||||||
Status = STATUS_MM_RESTART_OPERATION;
|
Status = STATUS_MM_RESTART_OPERATION;
|
||||||
}
|
}
|
||||||
else if (Status == STATUS_MM_RESTART_OPERATION)
|
else if (Status == STATUS_MM_RESTART_OPERATION)
|
||||||
|
@ -831,7 +831,7 @@ MmNotPresentFaultCacheSectionInner(KPROCESSOR_MODE Mode,
|
||||||
{
|
{
|
||||||
if (Thread->ActiveFaultCount > 2)
|
if (Thread->ActiveFaultCount > 2)
|
||||||
{
|
{
|
||||||
DPRINTC("Already fault handling ... going to work item (%x)\n", Address);
|
DPRINTC("Already fault handling ... going to work item (%Ix)\n", Address);
|
||||||
Context.AddressSpace = AddressSpace;
|
Context.AddressSpace = AddressSpace;
|
||||||
Context.MemoryArea = MemoryArea;
|
Context.MemoryArea = MemoryArea;
|
||||||
Context.Required = &Resources;
|
Context.Required = &Resources;
|
||||||
|
@ -850,13 +850,13 @@ MmNotPresentFaultCacheSectionInner(KPROCESSOR_MODE Mode,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT("DoAcquisition %x\n", Resources.DoAcquisition);
|
DPRINT("DoAcquisition %p\n", Resources.DoAcquisition);
|
||||||
|
|
||||||
Status = Resources.DoAcquisition(AddressSpace,
|
Status = Resources.DoAcquisition(AddressSpace,
|
||||||
MemoryArea,
|
MemoryArea,
|
||||||
&Resources);
|
&Resources);
|
||||||
|
|
||||||
DPRINT("DoAcquisition %x -> %x\n",
|
DPRINT("DoAcquisition %p -> %x\n",
|
||||||
Resources.DoAcquisition,
|
Resources.DoAcquisition,
|
||||||
Status);
|
Status);
|
||||||
}
|
}
|
||||||
|
@ -878,7 +878,7 @@ MmNotPresentFaultCacheSectionInner(KPROCESSOR_MODE Mode,
|
||||||
}
|
}
|
||||||
while (Status == STATUS_MM_RESTART_OPERATION);
|
while (Status == STATUS_MM_RESTART_OPERATION);
|
||||||
|
|
||||||
DPRINTC("Completed page fault handling: %x:%x %x\n",
|
DPRINTC("Completed page fault handling: %p:%Ix %x\n",
|
||||||
MmGetAddressSpaceOwner(AddressSpace),
|
MmGetAddressSpaceOwner(AddressSpace),
|
||||||
Address,
|
Address,
|
||||||
Status);
|
Status);
|
||||||
|
@ -913,13 +913,13 @@ MmNotPresentFaultCacheSection(KPROCESSOR_MODE Mode,
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
Address &= ~(PAGE_SIZE - 1);
|
Address &= ~(PAGE_SIZE - 1);
|
||||||
DPRINT("MmNotPresentFault(Mode %d, Address %x)\n", Mode, Address);
|
DPRINT("MmNotPresentFault(Mode %d, Address %Ix)\n", Mode, Address);
|
||||||
|
|
||||||
Thread = PsGetCurrentThread();
|
Thread = PsGetCurrentThread();
|
||||||
|
|
||||||
if (KeGetCurrentIrql() >= DISPATCH_LEVEL)
|
if (KeGetCurrentIrql() >= DISPATCH_LEVEL)
|
||||||
{
|
{
|
||||||
DPRINT1("Page fault at high IRQL %d, address %x\n",
|
DPRINT1("Page fault at high IRQL %u, address %Ix\n",
|
||||||
KeGetCurrentIrql(),
|
KeGetCurrentIrql(),
|
||||||
Address);
|
Address);
|
||||||
|
|
||||||
|
@ -953,7 +953,7 @@ MmNotPresentFaultCacheSection(KPROCESSOR_MODE Mode,
|
||||||
|
|
||||||
ASSERT(Status != STATUS_UNSUCCESSFUL);
|
ASSERT(Status != STATUS_UNSUCCESSFUL);
|
||||||
ASSERT(Status != STATUS_INVALID_PARAMETER);
|
ASSERT(Status != STATUS_INVALID_PARAMETER);
|
||||||
DPRINT("MmAccessFault %x:%x -> %x\n",
|
DPRINT("MmAccessFault %p:%Ix -> %x\n",
|
||||||
MmGetAddressSpaceOwner(AddressSpace),
|
MmGetAddressSpaceOwner(AddressSpace),
|
||||||
Address,
|
Address,
|
||||||
Status);
|
Status);
|
||||||
|
|
6
reactos/ntoskrnl/cache/section/io.c
vendored
6
reactos/ntoskrnl/cache/section/io.c
vendored
|
@ -135,7 +135,7 @@ MiSimpleRead(PFILE_OBJECT FileObject,
|
||||||
|
|
||||||
ASSERT(DeviceObject);
|
ASSERT(DeviceObject);
|
||||||
|
|
||||||
DPRINT("PAGING READ: FileObject %p <%wZ> Offset %08x%08x Length %d\n",
|
DPRINT("PAGING READ: FileObject %p <%wZ> Offset %08x%08x Length %ul\n",
|
||||||
FileObject,
|
FileObject,
|
||||||
&FileObject->FileName,
|
&FileObject->FileName,
|
||||||
FileOffset->HighPart,
|
FileOffset->HighPart,
|
||||||
|
@ -222,10 +222,10 @@ _MiSimpleWrite(PFILE_OBJECT FileObject,
|
||||||
DeviceObject = MmGetDeviceObjectForFile(FileObject);
|
DeviceObject = MmGetDeviceObjectForFile(FileObject);
|
||||||
ASSERT(DeviceObject);
|
ASSERT(DeviceObject);
|
||||||
|
|
||||||
DPRINT("PAGING WRITE: FileObject %x <%wZ> Offset %x Length %d (%s:%d)\n",
|
DPRINT("PAGING WRITE: FileObject %p <%wZ> Offset 0x%I64x Length %lu (%s:%d)\n",
|
||||||
FileObject,
|
FileObject,
|
||||||
&FileObject->FileName,
|
&FileObject->FileName,
|
||||||
FileOffset->LowPart,
|
FileOffset->QuadPart,
|
||||||
Length,
|
Length,
|
||||||
File,
|
File,
|
||||||
Line);
|
Line);
|
||||||
|
|
4
reactos/ntoskrnl/cache/section/newmm.h
vendored
4
reactos/ntoskrnl/cache/section/newmm.h
vendored
|
@ -36,12 +36,12 @@
|
||||||
#define SEC_CACHE (0x20000000)
|
#define SEC_CACHE (0x20000000)
|
||||||
|
|
||||||
#define MiWaitForPageEvent(Process,Address) do { \
|
#define MiWaitForPageEvent(Process,Address) do { \
|
||||||
DPRINT("MiWaitForPageEvent %x:%x #\n", Process, Address); \
|
DPRINT("MiWaitForPageEvent %p:%Ix #\n", Process, Address); \
|
||||||
KeWaitForSingleObject(&MmWaitPageEvent, 0, KernelMode, FALSE, NULL); \
|
KeWaitForSingleObject(&MmWaitPageEvent, 0, KernelMode, FALSE, NULL); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
#define MiSetPageEvent(Process,Address) do { \
|
#define MiSetPageEvent(Process,Address) do { \
|
||||||
DPRINT("MiSetPageEvent %x:%x #\n",Process, Address); \
|
DPRINT("MiSetPageEvent %p:%p #\n",Process, (PVOID)(Address)); \
|
||||||
KeSetEvent(&MmWaitPageEvent, IO_NO_INCREMENT, FALSE); \
|
KeSetEvent(&MmWaitPageEvent, IO_NO_INCREMENT, FALSE); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
|
|
7
reactos/ntoskrnl/cache/section/reqtools.c
vendored
7
reactos/ntoskrnl/cache/section/reqtools.c
vendored
|
@ -145,11 +145,10 @@ MiReadFilePage(PMMSUPPORT AddressSpace,
|
||||||
PMDL Mdl = (PMDL)MdlBase;
|
PMDL Mdl = (PMDL)MdlBase;
|
||||||
KIRQL OldIrql;
|
KIRQL OldIrql;
|
||||||
|
|
||||||
DPRINTC("Pulling page %08x%08x from %wZ to %x\n",
|
DPRINTC("Pulling page %I64x from %wZ to %Ix\n",
|
||||||
FileOffset->u.HighPart,
|
FileOffset->QuadPart,
|
||||||
FileOffset->u.LowPart,
|
|
||||||
&FileObject->FileName,
|
&FileObject->FileName,
|
||||||
Page);
|
*Page);
|
||||||
|
|
||||||
Status = MmRequestPageMemoryConsumer(RequiredResources->Consumer,
|
Status = MmRequestPageMemoryConsumer(RequiredResources->Consumer,
|
||||||
TRUE,
|
TRUE,
|
||||||
|
|
19
reactos/ntoskrnl/cache/section/sptab.c
vendored
19
reactos/ntoskrnl/cache/section/sptab.c
vendored
|
@ -123,10 +123,9 @@ MiSectionPageTableGet(PRTL_GENERIC_TABLE Table,
|
||||||
ENTRIES_PER_ELEMENT * PAGE_SIZE);
|
ENTRIES_PER_ELEMENT * PAGE_SIZE);
|
||||||
PageTable = RtlLookupElementGenericTable(Table, &SearchFileOffset);
|
PageTable = RtlLookupElementGenericTable(Table, &SearchFileOffset);
|
||||||
|
|
||||||
DPRINT("MiSectionPageTableGet(%08x,%08x%08x)\n",
|
DPRINT("MiSectionPageTableGet(%p,%I64x)\n",
|
||||||
Table,
|
Table,
|
||||||
FileOffset->HighPart,
|
FileOffset->QuadPart);
|
||||||
FileOffset->LowPart);
|
|
||||||
|
|
||||||
return PageTable;
|
return PageTable;
|
||||||
}
|
}
|
||||||
|
@ -154,10 +153,9 @@ MiSectionPageTableGetOrAllocate(PRTL_GENERIC_TABLE Table,
|
||||||
sizeof(SectionZeroPageTable),
|
sizeof(SectionZeroPageTable),
|
||||||
NULL);
|
NULL);
|
||||||
if (!PageTableSlice) return NULL;
|
if (!PageTableSlice) return NULL;
|
||||||
DPRINT("Allocate page table %x (%08x%08x)\n",
|
DPRINT("Allocate page table %p (%I64x)\n",
|
||||||
PageTableSlice,
|
PageTableSlice,
|
||||||
PageTableSlice->FileOffset.u.HighPart,
|
PageTableSlice->FileOffset.QuadPart);
|
||||||
PageTableSlice->FileOffset.u.LowPart);
|
|
||||||
}
|
}
|
||||||
return PageTableSlice;
|
return PageTableSlice;
|
||||||
}
|
}
|
||||||
|
@ -283,11 +281,10 @@ MmFreePageTablesSectionSegment(PMM_SECTION_SEGMENT Segment,
|
||||||
PCACHE_SECTION_PAGE_TABLE Element;
|
PCACHE_SECTION_PAGE_TABLE Element;
|
||||||
DPRINT("MiFreePageTablesSectionSegment(%p)\n", &Segment->PageTable);
|
DPRINT("MiFreePageTablesSectionSegment(%p)\n", &Segment->PageTable);
|
||||||
while ((Element = RtlGetElementGenericTable(&Segment->PageTable, 0))) {
|
while ((Element = RtlGetElementGenericTable(&Segment->PageTable, 0))) {
|
||||||
DPRINT("Delete table for <%wZ> %x -> %08x%08x\n",
|
DPRINT("Delete table for <%wZ> %p -> %I64x\n",
|
||||||
Segment->FileObject ? &Segment->FileObject->FileName : NULL,
|
Segment->FileObject ? &Segment->FileObject->FileName : NULL,
|
||||||
Segment,
|
Segment,
|
||||||
Element->FileOffset.u.HighPart,
|
Element->FileOffset.QuadPart);
|
||||||
Element->FileOffset.u.LowPart);
|
|
||||||
if (FreePage)
|
if (FreePage)
|
||||||
{
|
{
|
||||||
ULONG i;
|
ULONG i;
|
||||||
|
@ -299,10 +296,10 @@ MmFreePageTablesSectionSegment(PMM_SECTION_SEGMENT Segment,
|
||||||
Entry = Element->PageEntries[i];
|
Entry = Element->PageEntries[i];
|
||||||
if (Entry && !IS_SWAP_FROM_SSE(Entry))
|
if (Entry && !IS_SWAP_FROM_SSE(Entry))
|
||||||
{
|
{
|
||||||
DPRINT("Freeing page %x:%x @ %x\n",
|
DPRINT("Freeing page %p:%Ix @ %I64x\n",
|
||||||
Segment,
|
Segment,
|
||||||
Entry,
|
Entry,
|
||||||
Offset.LowPart);
|
Offset.QuadPart);
|
||||||
|
|
||||||
FreePage(Segment, &Offset);
|
FreePage(Segment, &Offset);
|
||||||
}
|
}
|
||||||
|
|
|
@ -337,16 +337,16 @@ CcCopyRead (
|
||||||
PCACHE_SEGMENT current;
|
PCACHE_SEGMENT current;
|
||||||
|
|
||||||
DPRINT("CcCopyRead(FileObject 0x%p, FileOffset %I64x, "
|
DPRINT("CcCopyRead(FileObject 0x%p, FileOffset %I64x, "
|
||||||
"Length %d, Wait %d, Buffer 0x%p, IoStatus 0x%p)\n",
|
"Length %lu, Wait %u, Buffer 0x%p, IoStatus 0x%p)\n",
|
||||||
FileObject, FileOffset->QuadPart, Length, Wait,
|
FileObject, FileOffset->QuadPart, Length, Wait,
|
||||||
Buffer, IoStatus);
|
Buffer, IoStatus);
|
||||||
|
|
||||||
Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
|
Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
|
||||||
ReadOffset = (ULONG)FileOffset->QuadPart;
|
ReadOffset = (ULONG)FileOffset->QuadPart;
|
||||||
|
|
||||||
DPRINT("AllocationSize %d, FileSize %d\n",
|
DPRINT("AllocationSize %I64d, FileSize %I64d\n",
|
||||||
(ULONG)Bcb->AllocationSize.QuadPart,
|
Bcb->AllocationSize.QuadPart,
|
||||||
(ULONG)Bcb->FileSize.QuadPart);
|
Bcb->FileSize.QuadPart);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check for the nowait case that all the cache segments that would
|
* Check for the nowait case that all the cache segments that would
|
||||||
|
@ -456,7 +456,7 @@ CcCopyWrite (
|
||||||
BOOLEAN Valid;
|
BOOLEAN Valid;
|
||||||
|
|
||||||
DPRINT("CcCopyWrite(FileObject 0x%p, FileOffset %I64x, "
|
DPRINT("CcCopyWrite(FileObject 0x%p, FileOffset %I64x, "
|
||||||
"Length %d, Wait %d, Buffer 0x%p)\n",
|
"Length %lu, Wait %u, Buffer 0x%p)\n",
|
||||||
FileObject, FileOffset->QuadPart, Length, Wait, Buffer);
|
FileObject, FileOffset->QuadPart, Length, Wait, Buffer);
|
||||||
|
|
||||||
Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
|
Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
|
||||||
|
@ -626,7 +626,7 @@ CcZeroData (
|
||||||
KEVENT Event;
|
KEVENT Event;
|
||||||
|
|
||||||
DPRINT("CcZeroData(FileObject 0x%p, StartOffset %I64x, EndOffset %I64x, "
|
DPRINT("CcZeroData(FileObject 0x%p, StartOffset %I64x, EndOffset %I64x, "
|
||||||
"Wait %d)\n", FileObject, StartOffset->QuadPart, EndOffset->QuadPart,
|
"Wait %u)\n", FileObject, StartOffset->QuadPart, EndOffset->QuadPart,
|
||||||
Wait);
|
Wait);
|
||||||
|
|
||||||
Length = EndOffset->u.LowPart - StartOffset->u.LowPart;
|
Length = EndOffset->u.LowPart - StartOffset->u.LowPart;
|
||||||
|
|
|
@ -136,10 +136,10 @@ CcSetFileSizes (
|
||||||
|
|
||||||
DPRINT("CcSetFileSizes(FileObject 0x%p, FileSizes 0x%p)\n",
|
DPRINT("CcSetFileSizes(FileObject 0x%p, FileSizes 0x%p)\n",
|
||||||
FileObject, FileSizes);
|
FileObject, FileSizes);
|
||||||
DPRINT("AllocationSize %d, FileSize %d, ValidDataLength %d\n",
|
DPRINT("AllocationSize %I64d, FileSize %I64d, ValidDataLength %I64d\n",
|
||||||
(ULONG)FileSizes->AllocationSize.QuadPart,
|
FileSizes->AllocationSize.QuadPart,
|
||||||
(ULONG)FileSizes->FileSize.QuadPart,
|
FileSizes->FileSize.QuadPart,
|
||||||
(ULONG)FileSizes->ValidDataLength.QuadPart);
|
FileSizes->ValidDataLength.QuadPart);
|
||||||
|
|
||||||
Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
|
Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ CcMapData (
|
||||||
PINTERNAL_BCB iBcb;
|
PINTERNAL_BCB iBcb;
|
||||||
ULONG ROffset;
|
ULONG ROffset;
|
||||||
|
|
||||||
DPRINT("CcMapData(FileObject 0x%p, FileOffset %I64x, Length %d, Flags %d,"
|
DPRINT("CcMapData(FileObject 0x%p, FileOffset %I64x, Length %lu, Flags 0x%lx,"
|
||||||
" pBcb 0x%p, pBuffer 0x%p)\n", FileObject, FileOffset->QuadPart,
|
" pBcb 0x%p, pBuffer 0x%p)\n", FileObject, FileOffset->QuadPart,
|
||||||
Length, Flags, pBcb, pBuffer);
|
Length, Flags, pBcb, pBuffer);
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ static void CcRosCacheSegmentIncRefCount_ ( PCACHE_SEGMENT cs, const char* file,
|
||||||
++cs->ReferenceCount;
|
++cs->ReferenceCount;
|
||||||
if ( cs->Bcb->Trace )
|
if ( cs->Bcb->Trace )
|
||||||
{
|
{
|
||||||
DbgPrint("(%s:%i) CacheSegment %p ++RefCount=%d, Dirty %d, PageOut %d\n",
|
DbgPrint("(%s:%i) CacheSegment %p ++RefCount=%lu, Dirty %u, PageOut %lu\n",
|
||||||
file, line, cs, cs->ReferenceCount, cs->Dirty, cs->PageOut );
|
file, line, cs, cs->ReferenceCount, cs->Dirty, cs->PageOut );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ static void CcRosCacheSegmentDecRefCount_ ( PCACHE_SEGMENT cs, const char* file,
|
||||||
--cs->ReferenceCount;
|
--cs->ReferenceCount;
|
||||||
if ( cs->Bcb->Trace )
|
if ( cs->Bcb->Trace )
|
||||||
{
|
{
|
||||||
DbgPrint("(%s:%i) CacheSegment %p --RefCount=%d, Dirty %d, PageOut %d\n",
|
DbgPrint("(%s:%i) CacheSegment %p --RefCount=%lu, Dirty %u, PageOut %lu\n",
|
||||||
file, line, cs, cs->ReferenceCount, cs->Dirty, cs->PageOut );
|
file, line, cs, cs->ReferenceCount, cs->Dirty, cs->PageOut );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -131,7 +131,7 @@ CcRosTraceCacheMap (
|
||||||
current = CONTAINING_RECORD(current_entry, CACHE_SEGMENT, BcbSegmentListEntry);
|
current = CONTAINING_RECORD(current_entry, CACHE_SEGMENT, BcbSegmentListEntry);
|
||||||
current_entry = current_entry->Flink;
|
current_entry = current_entry->Flink;
|
||||||
|
|
||||||
DPRINT1(" CacheSegment 0x%p enabled, RefCount %d, Dirty %d, PageOut %d\n",
|
DPRINT1(" CacheSegment 0x%p enabled, RefCount %lu, Dirty %u, PageOut %lu\n",
|
||||||
current, current->ReferenceCount, current->Dirty, current->PageOut );
|
current, current->ReferenceCount, current->Dirty, current->PageOut );
|
||||||
}
|
}
|
||||||
KeReleaseSpinLock(&Bcb->BcbLock, oldirql);
|
KeReleaseSpinLock(&Bcb->BcbLock, oldirql);
|
||||||
|
@ -188,7 +188,7 @@ CcRosFlushDirtyPages (
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
LARGE_INTEGER ZeroTimeout;
|
LARGE_INTEGER ZeroTimeout;
|
||||||
|
|
||||||
DPRINT("CcRosFlushDirtyPages(Target %d)\n", Target);
|
DPRINT("CcRosFlushDirtyPages(Target %lu)\n", Target);
|
||||||
|
|
||||||
(*Count) = 0;
|
(*Count) = 0;
|
||||||
ZeroTimeout.QuadPart = 0;
|
ZeroTimeout.QuadPart = 0;
|
||||||
|
@ -300,7 +300,7 @@ CcRosTrimCache (
|
||||||
ULONG i;
|
ULONG i;
|
||||||
BOOLEAN FlushedPages = FALSE;
|
BOOLEAN FlushedPages = FALSE;
|
||||||
|
|
||||||
DPRINT("CcRosTrimCache(Target %d)\n", Target);
|
DPRINT("CcRosTrimCache(Target %lu)\n", Target);
|
||||||
|
|
||||||
InitializeListHead(&FreeList);
|
InitializeListHead(&FreeList);
|
||||||
|
|
||||||
|
@ -381,7 +381,7 @@ retry:
|
||||||
if (PagesFreed != 0)
|
if (PagesFreed != 0)
|
||||||
{
|
{
|
||||||
/* Try again after flushing dirty pages */
|
/* Try again after flushing dirty pages */
|
||||||
DPRINT("Flushed %d dirty cache pages to disk\n", PagesFreed);
|
DPRINT("Flushed %lu dirty cache pages to disk\n", PagesFreed);
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -394,7 +394,7 @@ retry:
|
||||||
CcRosInternalFreeCacheSegment(current);
|
CcRosInternalFreeCacheSegment(current);
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("Evicted %d cache pages\n", (*NrFreed));
|
DPRINT("Evicted %lu cache pages\n", (*NrFreed));
|
||||||
|
|
||||||
return(STATUS_SUCCESS);
|
return(STATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
|
@ -413,7 +413,7 @@ CcRosReleaseCacheSegment (
|
||||||
|
|
||||||
ASSERT(Bcb);
|
ASSERT(Bcb);
|
||||||
|
|
||||||
DPRINT("CcReleaseCacheSegment(Bcb 0x%p, CacheSeg 0x%p, Valid %d)\n",
|
DPRINT("CcReleaseCacheSegment(Bcb 0x%p, CacheSeg 0x%p, Valid %u)\n",
|
||||||
Bcb, CacheSeg, Valid);
|
Bcb, CacheSeg, Valid);
|
||||||
|
|
||||||
KeAcquireGuardedMutex(&ViewLock);
|
KeAcquireGuardedMutex(&ViewLock);
|
||||||
|
@ -464,7 +464,7 @@ CcRosLookupCacheSegment (
|
||||||
|
|
||||||
ASSERT(Bcb);
|
ASSERT(Bcb);
|
||||||
|
|
||||||
DPRINT("CcRosLookupCacheSegment(Bcb -x%p, FileOffset %d)\n", Bcb, FileOffset);
|
DPRINT("CcRosLookupCacheSegment(Bcb -x%p, FileOffset %lu)\n", Bcb, FileOffset);
|
||||||
|
|
||||||
KeAcquireGuardedMutex(&ViewLock);
|
KeAcquireGuardedMutex(&ViewLock);
|
||||||
KeAcquireSpinLock(&Bcb->BcbLock, &oldIrql);
|
KeAcquireSpinLock(&Bcb->BcbLock, &oldIrql);
|
||||||
|
@ -507,7 +507,7 @@ CcRosMarkDirtyCacheSegment (
|
||||||
|
|
||||||
ASSERT(Bcb);
|
ASSERT(Bcb);
|
||||||
|
|
||||||
DPRINT("CcRosMarkDirtyCacheSegment(Bcb 0x%p, FileOffset %d)\n", Bcb, FileOffset);
|
DPRINT("CcRosMarkDirtyCacheSegment(Bcb 0x%p, FileOffset %lu)\n", Bcb, FileOffset);
|
||||||
|
|
||||||
CacheSeg = CcRosLookupCacheSegment(Bcb, FileOffset);
|
CacheSeg = CcRosLookupCacheSegment(Bcb, FileOffset);
|
||||||
if (CacheSeg == NULL)
|
if (CacheSeg == NULL)
|
||||||
|
@ -554,7 +554,7 @@ CcRosUnmapCacheSegment (
|
||||||
|
|
||||||
ASSERT(Bcb);
|
ASSERT(Bcb);
|
||||||
|
|
||||||
DPRINT("CcRosUnmapCacheSegment(Bcb 0x%p, FileOffset %d, NowDirty %d)\n",
|
DPRINT("CcRosUnmapCacheSegment(Bcb 0x%p, FileOffset %lu, NowDirty %u)\n",
|
||||||
Bcb, FileOffset, NowDirty);
|
Bcb, FileOffset, NowDirty);
|
||||||
|
|
||||||
CacheSeg = CcRosLookupCacheSegment(Bcb, FileOffset);
|
CacheSeg = CcRosLookupCacheSegment(Bcb, FileOffset);
|
||||||
|
@ -1045,7 +1045,7 @@ CcFlushCache (
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
KIRQL oldIrql;
|
KIRQL oldIrql;
|
||||||
|
|
||||||
DPRINT("CcFlushCache(SectionObjectPointers 0x%p, FileOffset 0x%p, Length %d, IoStatus 0x%p)\n",
|
DPRINT("CcFlushCache(SectionObjectPointers 0x%p, FileOffset 0x%p, Length %lu, IoStatus 0x%p)\n",
|
||||||
SectionObjectPointers, FileOffset, Length, IoStatus);
|
SectionObjectPointers, FileOffset, Length, IoStatus);
|
||||||
|
|
||||||
if (SectionObjectPointers && SectionObjectPointers->SharedCacheMap)
|
if (SectionObjectPointers && SectionObjectPointers->SharedCacheMap)
|
||||||
|
@ -1333,7 +1333,7 @@ CcRosInitializeFileCache (
|
||||||
PBCB Bcb;
|
PBCB Bcb;
|
||||||
|
|
||||||
Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
|
Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
|
||||||
DPRINT("CcRosInitializeFileCache(FileObject 0x%p, Bcb 0x%p, CacheSegmentSize %d)\n",
|
DPRINT("CcRosInitializeFileCache(FileObject 0x%p, Bcb 0x%p, CacheSegmentSize %lu)\n",
|
||||||
FileObject, Bcb, CacheSegmentSize);
|
FileObject, Bcb, CacheSegmentSize);
|
||||||
|
|
||||||
KeAcquireGuardedMutex(&ViewLock);
|
KeAcquireGuardedMutex(&ViewLock);
|
||||||
|
|
|
@ -94,7 +94,7 @@ BootImageFadeIn(VOID)
|
||||||
ClrUsed = sizeof(_MainPalette) / sizeof(_MainPalette[0]);
|
ClrUsed = sizeof(_MainPalette) / sizeof(_MainPalette[0]);
|
||||||
RtlZeroMemory(PaletteBitmap, sizeof(BITMAPINFOHEADER));
|
RtlZeroMemory(PaletteBitmap, sizeof(BITMAPINFOHEADER));
|
||||||
PaletteBitmap->biSize = sizeof(BITMAPINFOHEADER);
|
PaletteBitmap->biSize = sizeof(BITMAPINFOHEADER);
|
||||||
PaletteBitmap->biBitCount = 4;
|
PaletteBitmap->biBitCount = 4;
|
||||||
PaletteBitmap->biClrUsed = ClrUsed;
|
PaletteBitmap->biClrUsed = ClrUsed;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -104,12 +104,12 @@ BootImageFadeIn(VOID)
|
||||||
{
|
{
|
||||||
for (Index = 0; Index < ClrUsed; Index++)
|
for (Index = 0; Index < ClrUsed; Index++)
|
||||||
{
|
{
|
||||||
Palette[Index].rgbRed =
|
Palette[Index].rgbRed = (UCHAR)
|
||||||
_MainPalette[Index].rgbRed * Iteration / PALETTE_FADE_STEPS;
|
(_MainPalette[Index].rgbRed * Iteration / PALETTE_FADE_STEPS);
|
||||||
Palette[Index].rgbGreen =
|
Palette[Index].rgbGreen = (UCHAR)
|
||||||
_MainPalette[Index].rgbGreen * Iteration / PALETTE_FADE_STEPS;
|
(_MainPalette[Index].rgbGreen * Iteration / PALETTE_FADE_STEPS);
|
||||||
Palette[Index].rgbBlue =
|
Palette[Index].rgbBlue = (UCHAR)
|
||||||
_MainPalette[Index].rgbBlue * Iteration / PALETTE_FADE_STEPS;
|
(_MainPalette[Index].rgbBlue * Iteration / PALETTE_FADE_STEPS);
|
||||||
}
|
}
|
||||||
|
|
||||||
VidBitBlt(PaletteBitmapBuffer, 0, 0);
|
VidBitBlt(PaletteBitmapBuffer, 0, 0);
|
||||||
|
@ -221,7 +221,7 @@ InbvDriverInitialize(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
||||||
{
|
{
|
||||||
/* Now reset the display, but only if there's a custom boot logo */
|
/* Now reset the display, but only if there's a custom boot logo */
|
||||||
VidResetDisplay(CustomLogo);
|
VidResetDisplay(CustomLogo);
|
||||||
|
|
||||||
/* Find bitmap resources in the kernel */
|
/* Find bitmap resources in the kernel */
|
||||||
ResourceCount = min(IDB_CLUSTER_SERVER, Count);
|
ResourceCount = min(IDB_CLUSTER_SERVER, Count);
|
||||||
for (i = 1; i <= Count; i++)
|
for (i = 1; i <= Count; i++)
|
||||||
|
@ -709,7 +709,7 @@ DisplayBootBitmap(IN BOOLEAN TextMode)
|
||||||
InbvSetTextColor(15);
|
InbvSetTextColor(15);
|
||||||
InbvSolidColorFill(0, 0, 639, 479, 7);
|
InbvSolidColorFill(0, 0, 639, 479, 7);
|
||||||
InbvSolidColorFill(0, 421, 639, 479, 1);
|
InbvSolidColorFill(0, 421, 639, 479, 1);
|
||||||
|
|
||||||
/* Get resources */
|
/* Get resources */
|
||||||
Header = InbvGetResourceAddress(IDB_LOGO_HEADER);
|
Header = InbvGetResourceAddress(IDB_LOGO_HEADER);
|
||||||
Band = InbvGetResourceAddress(IDB_LOGO_BAND);
|
Band = InbvGetResourceAddress(IDB_LOGO_BAND);
|
||||||
|
@ -768,7 +768,7 @@ DisplayBootBitmap(IN BOOLEAN TextMode)
|
||||||
/* Normal edition */
|
/* Normal edition */
|
||||||
Text = InbvGetResourceAddress(IDB_SERVER_LOGO);
|
Text = InbvGetResourceAddress(IDB_SERVER_LOGO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Server product, display appropriate status bar color */
|
/* Server product, display appropriate status bar color */
|
||||||
InbvGetResourceAddress(IDB_BAR_SERVER);
|
InbvGetResourceAddress(IDB_BAR_SERVER);
|
||||||
}
|
}
|
||||||
|
@ -805,7 +805,7 @@ DisplayBootBitmap(IN BOOLEAN TextMode)
|
||||||
InbvScreenToBufferBlt(Buffer, 413, 237, 7, 7, 8);
|
InbvScreenToBufferBlt(Buffer, 413, 237, 7, 7, 8);
|
||||||
InbvSolidColorFill(418, 230, 454, 256, 0);
|
InbvSolidColorFill(418, 230, 454, 256, 0);
|
||||||
InbvBufferToScreenBlt(Buffer, 413, 237, 7, 7, 8);
|
InbvBufferToScreenBlt(Buffer, 413, 237, 7, 7, 8);
|
||||||
|
|
||||||
/* In setup mode, you haven't selected a SKU yet */
|
/* In setup mode, you haven't selected a SKU yet */
|
||||||
if (ExpInTextModeSetup) Text = NULL;
|
if (ExpInTextModeSetup) Text = NULL;
|
||||||
}
|
}
|
||||||
|
@ -851,7 +851,7 @@ DisplayFilter(PCHAR *String)
|
||||||
{
|
{
|
||||||
/* Remove the filter */
|
/* Remove the filter */
|
||||||
InbvInstallDisplayStringFilter(NULL);
|
InbvInstallDisplayStringFilter(NULL);
|
||||||
|
|
||||||
DotHack = FALSE;
|
DotHack = FALSE;
|
||||||
|
|
||||||
/* Draw text screen */
|
/* Draw text screen */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue