Ignore calls to ArmSetMemoryAttributes () when the region described
is outside of the 32-bit addressable range. This memory is not
mapped in the first place, and the current code does not deal with
the high bits correctly, resulting in hangs.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
UINT64 ChunkLength;\r
BOOLEAN FlushTlbs;\r
\r
+ if (BaseAddress > (UINT64)MAX_ADDRESS - Length + 1) {\r
+ return EFI_UNSUPPORTED;\r
+ }\r
+\r
if (Length == 0) {\r
return EFI_SUCCESS;\r
}\r