Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert Downgrading Page.c Error Prints #1095

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions MdeModulePkg/Core/Dxe/Mem/Page.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ CoreConvertPagesEx (
}

if (Link == &gMemoryMap) {
DEBUG ((DEBUG_PAGE, "ConvertPages: failed to find range %lx - %lx\n", Start, End)); // MU_CHANGE
DEBUG ((DEBUG_ERROR | DEBUG_PAGE, "ConvertPages: failed to find range %lx - %lx\n", Start, End));
return EFI_NOT_FOUND;
}

Expand All @@ -900,8 +900,7 @@ CoreConvertPagesEx (
//
if (ChangingType && (NewType != EfiConventionalMemory)) {
if (Entry->End < End) {
// MU_CHANGE: remove this debug print since within debug print there is another allocate pages call
// DEBUG ((DEBUG_ERROR | DEBUG_PAGE, "ConvertPages: range %lx - %lx covers multiple entries\n", Start, End));
DEBUG ((DEBUG_ERROR | DEBUG_PAGE, "ConvertPages: range %lx - %lx covers multiple entries\n", Start, End));
return EFI_NOT_FOUND;
}
}
Expand Down Expand Up @@ -930,11 +929,11 @@ CoreConvertPagesEx (
// Debug code - verify conversion is allowed
//
if (!((NewType == EfiConventionalMemory) ? 1 : 0) ^ ((Entry->Type == EfiConventionalMemory) ? 1 : 0)) {
DEBUG ((DEBUG_PAGE, "ConvertPages: Incompatible memory types, ")); // MU_CHANGE
DEBUG ((DEBUG_ERROR | DEBUG_PAGE, "ConvertPages: Incompatible memory types, "));
if (Entry->Type == EfiConventionalMemory) {
DEBUG ((DEBUG_PAGE, "the pages to free have been freed\n")); // MU_CHANGE
DEBUG ((DEBUG_ERROR | DEBUG_PAGE, "the pages to free have been freed\n"));
} else {
DEBUG ((DEBUG_PAGE, "the pages to allocate have been allocated\n")); // MU_CHANGE
DEBUG ((DEBUG_ERROR | DEBUG_PAGE, "the pages to allocate have been allocated\n"));
}

return EFI_NOT_FOUND;
Expand Down Expand Up @@ -2248,7 +2247,7 @@ CoreAllocatePoolPages (
// Convert it to boot services data
//
if (Start == 0) {
DEBUG ((DEBUG_PAGE, "AllocatePoolPages: failed to allocate %d pages\n", (UINT32)NumberOfPages)); // MU_CHANGE
DEBUG ((DEBUG_ERROR | DEBUG_PAGE, "AllocatePoolPages: failed to allocate %d pages\n", (UINT32)NumberOfPages));
} else {
if (NeedGuard) {
CoreConvertPagesWithGuard (Start, NumberOfPages, PoolType);
Expand Down Expand Up @@ -2314,12 +2313,14 @@ CoreTerminateMemoryMap (
ASSERT (Entry->Type != EfiACPIReclaimMemory);
ASSERT (Entry->Type != EfiACPIMemoryNVS);
if ((Entry->Start & (RUNTIME_PAGE_ALLOCATION_GRANULARITY - 1)) != 0) {
DEBUG ((DEBUG_PAGE, "ExitBootServices: A RUNTIME memory entry is not on a proper alignment.\n")); // MU_CHANGE
DEBUG ((DEBUG_ERROR | DEBUG_PAGE, "ExitBootServices: A RUNTIME memory entry is not on a proper alignment.\n"));
Status = EFI_INVALID_PARAMETER;
goto Done;
}

if (((Entry->End + 1) & (RUNTIME_PAGE_ALLOCATION_GRANULARITY - 1)) != 0) {
DEBUG ((DEBUG_PAGE, "ExitBootServices: A RUNTIME memory entry is not on a proper alignment.\n")); // MU_CHANGE
DEBUG ((DEBUG_ERROR | DEBUG_PAGE, "ExitBootServices: A RUNTIME memory entry is not on a proper alignment.\n"));
Status = EFI_INVALID_PARAMETER;
goto Done;
}
}
Expand Down
Loading