[BOOT] Improve debug logging

This commit is contained in:
2024-09-01 17:54:40 -04:00
parent 43c6c75710
commit 2a19fd42de
3 changed files with 5 additions and 59 deletions

View File

@@ -317,6 +317,7 @@ Return Value:
PMEMORY_DESCRIPTOR CurrentDescriptor;
if (Mdl == NULL || Descriptor == NULL) {
DebugPrint(L"MmMdAddDescriptorToList(): Mdl and/or Descriptor are NULL\r\n");
return STATUS_INVALID_PARAMETER;
}
@@ -477,6 +478,7 @@ Return Value:
// virtual flag must be set.
//
if (Mdl->Type == MDL_TYPE_VIRTUAL) {
DebugPrint(L"MmMdFindDescriptorFromMdl(): Flags is invalid\r\n");
return NULL;
}
}
@@ -577,6 +579,7 @@ Return Value:
// virtual flag must be set.
//
if (Mdl->Type == MDL_TYPE_VIRTUAL) {
DebugPrint(L"MmMdRemoveRegionFromMdlEx(): Flags is invalid\r\n");
return STATUS_INVALID_PARAMETER;
}
}
@@ -732,7 +735,7 @@ Return Value:
// Free the descriptor from the heap.
// TODO: Use BlMmFreeHeap().
//
ConsolePrint(L"MmMdFreeDescriptor(): need BlMmFreeHeap() to free descriptor\r\n");
ConsolePrint(L"MmMdFreeDescriptor(): Heap not available\r\n");
return STATUS_NOT_IMPLEMENTED;
// return BlMmFreeHeap(Descriptor);
}

View File

@@ -139,7 +139,7 @@ Return Value:
return STATUS_NO_MEMORY;
}
Status = MmMdAddDescriptorToList(&MmMdlReservedAllocated, NewDescriptor, 0x00);
Status = MmMdAddDescriptorToList(&MmMdlReservedAllocated, NewDescriptor, 0);
if (!NT_SUCCESS(Status)) {
MmMdFreeDescriptor(NewDescriptor);
return Status;