ArmPkg: ArmMmuLib: Add AARCH64 Memory Attribute Update Failure Log

This adds logging in failure cases of SetMemoryAttributes. This
is useful generally as if an attribute update fails, code will
typically break, but is added in particular to make debugging
incorrect bootloader usage of the Memory Attribute Protocol. This
patch updates the AARCH64 UpdateRegionMapping.

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
This commit is contained in:
Oliver Smith-Denny 2024-07-19 12:40:18 -07:00 committed by mergify[bot]
parent 74833ca459
commit e10de1cb03
1 changed files with 7 additions and 0 deletions

View File

@ -382,6 +382,13 @@ UpdateRegionMapping (
UINTN T0SZ;
if (((RegionStart | RegionLength) & EFI_PAGE_MASK) != 0) {
DEBUG ((
DEBUG_ERROR,
"%a RegionStart: 0x%llx or RegionLength: 0x%llx are not page aligned!\n",
__func__,
RegionStart,
RegionLength
));
return EFI_INVALID_PARAMETER;
}