diff --git a/ArmPkg/Drivers/CpuDxe/MemoryAttribute.c b/ArmPkg/Drivers/CpuDxe/MemoryAttribute.c index 16cc4ef474..c77feb848c 100644 --- a/ArmPkg/Drivers/CpuDxe/MemoryAttribute.c +++ b/ArmPkg/Drivers/CpuDxe/MemoryAttribute.c @@ -82,6 +82,13 @@ GetMemoryAttributes ( EFI_STATUS Status; if ((Length == 0) || (Attributes == NULL)) { + DEBUG (( + DEBUG_ERROR, + "%a: BaseAddress 0x%llx Length 0x%llx is zero or Attributes is NULL\n", + __func__, + BaseAddress, + Length + )); return EFI_INVALID_PARAMETER; } @@ -195,6 +202,13 @@ SetMemoryAttributes ( if ((Length == 0) || ((Attributes & ~(EFI_MEMORY_RO | EFI_MEMORY_RP | EFI_MEMORY_XP)) != 0)) { + DEBUG (( + DEBUG_ERROR, + "%a: BaseAddress 0x%llx Length is zero or Attributes (0x%llx) is invalid\n", + __func__, + BaseAddress, + Attributes + )); return EFI_INVALID_PARAMETER; } @@ -256,6 +270,13 @@ ClearMemoryAttributes ( if ((Length == 0) || ((Attributes & ~(EFI_MEMORY_RO | EFI_MEMORY_RP | EFI_MEMORY_XP)) != 0)) { + DEBUG (( + DEBUG_ERROR, + "%a: BaseAddress 0x%llx Length is zero or Attributes (0x%llx) is invalid\n", + __func__, + BaseAddress, + Attributes + )); return EFI_INVALID_PARAMETER; }