Skip to content

Commit

Permalink
Update SetUefiImageMemoryAttributes() Verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
TaylorBeebe authored and os-d committed Jun 25, 2024
1 parent 97e65ba commit 1ffd459
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,18 @@ SetUefiImageMemoryAttributes (
ASSERT_EFI_ERROR (Status);

FinalAttributes = (Descriptor.Attributes & EFI_CACHE_ATTRIBUTE_MASK) | (Attributes & EFI_MEMORY_ATTRIBUTE_MASK);

DEBUG ((DEBUG_INFO, "SetUefiImageMemoryAttributes - 0x%016lx - 0x%016lx (0x%016lx)\n", BaseAddress, Length, FinalAttributes));
// MU_CHANGE START: Update verbosity to reduce excessive debug output
// DEBUG ((DEBUG_INFO, "SetUefiImageMemoryAttributes - 0x%016lx - 0x%016lx (0x%016lx)\n", BaseAddress, Length, FinalAttributes));
DEBUG ((DEBUG_VERBOSE, "SetUefiImageMemoryAttributes - 0x%016lx - 0x%016lx (0x%016lx)\n", BaseAddress, Length, FinalAttributes));
// MU_CHANGE END

ASSERT (gCpu != NULL);
gCpu->SetMemoryAttributes (gCpu, BaseAddress, Length, FinalAttributes);
// MU_CHANGE START: Don't dereference if gCpu is NULL
if (gCpu != NULL) {
gCpu->SetMemoryAttributes (gCpu, BaseAddress, Length, FinalAttributes);
}

// MU_CHANGE END
}

/**
Expand Down

0 comments on commit 1ffd459

Please sign in to comment.