[BOOT] Add stubs to complete MmPaInitialize()
MmPaInitialize() is now complete Added BlpMmInitializeConstraints() and MmMdRemoveRegionFromMdlEx()
This commit is contained in:
@@ -347,9 +347,9 @@ Routine Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Mdl - the MDL to remove Descriptor from.
|
||||
Mdl - MDL to remove Descriptor from.
|
||||
|
||||
Descriptor - the descriptor to remove from Mdl.
|
||||
Descriptor - Descriptor to remove from Mdl.
|
||||
|
||||
Return Value:
|
||||
|
||||
@@ -386,6 +386,67 @@ Return Value:
|
||||
}
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
MmMdRemoveRegionFromMdlEx (
|
||||
IN PMEMORY_DESCRIPTOR_LIST Mdl,
|
||||
IN ULONGLONG FirstPage,
|
||||
IN ULONGLONG PageCount,
|
||||
IN ULONG Flags,
|
||||
OUT PMEMORY_DESCRIPTOR_LIST Unused
|
||||
)
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Removes a region from a MDL.
|
||||
|
||||
Arguments:
|
||||
|
||||
Mdl - MDL to remove the region from.
|
||||
|
||||
FirstPage - The first page in the region.
|
||||
|
||||
PageCount - The number of pages in the region.
|
||||
|
||||
Flags - MDL_OPERATION_FLAGS_*.
|
||||
|
||||
Unused - Unused.
|
||||
|
||||
Return Value:
|
||||
|
||||
None.
|
||||
|
||||
--*/
|
||||
|
||||
{
|
||||
ULONGLONG RemoveEnd, DescriptorEnd;
|
||||
PLIST_ENTRY Entry;
|
||||
PMEMORY_DESCRIPTOR Descriptor;
|
||||
MEMORY_DESCRIPTOR RemovedDescriptor;
|
||||
|
||||
(VOID)Flags;
|
||||
(VOID)Unused;
|
||||
|
||||
RemoveEnd = FirstPage + PageCount;
|
||||
Entry = Mdl->Head->Flink;
|
||||
while (Entry != Mdl->Head) {
|
||||
Descriptor = (PMEMORY_DESCRIPTOR)Entry;
|
||||
DescriptorEnd = Descriptor->FirstPage + Descriptor->PageCount;
|
||||
|
||||
RtlCopyMemory(&RemovedDescriptor, Descriptor, sizeof(MEMORY_DESCRIPTOR));
|
||||
|
||||
// if (FirstPage <= Descriptor->FirstPage && Descriptor->FirstPage < RemoveEnd) {
|
||||
// }
|
||||
}
|
||||
|
||||
//
|
||||
// TODO: Finish this function.
|
||||
//
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
MmMdFreeDescriptor (
|
||||
IN PMEMORY_DESCRIPTOR Descriptor
|
||||
|
Reference in New Issue
Block a user