ArmPkg: ArmMmuLib: Add ARM32 Memory Attribute Update Failure Logging
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 ARM32 SetMemoryAttributes. Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
This commit is contained in:
parent
37287bf9ad
commit
74833ca459
|
@ -377,6 +377,13 @@ SetMemoryAttributes (
|
|||
BOOLEAN FlushTlbs;
|
||||
|
||||
if (BaseAddress > (UINT64)MAX_ADDRESS) {
|
||||
DEBUG ((
|
||||
DEBUG_ERROR,
|
||||
"%a BaseAddress: 0x%llx is greater than MAX_ADDRESS: 0x%llx, fail to apply attributes!\n",
|
||||
__func__,
|
||||
BaseAddress,
|
||||
(UINT64)MAX_ADDRESS
|
||||
));
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
@ -437,6 +444,14 @@ SetMemoryAttributes (
|
|||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((
|
||||
DEBUG_ERROR,
|
||||
"%a failed to update attributes with status %r for BaseAddress 0x%llx of length 0x%llx\n",
|
||||
__func__,
|
||||
Status,
|
||||
BaseAddress,
|
||||
ChunkLength
|
||||
));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue