summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Library/ArmMmuLib/AArch64
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2017-02-22 09:38:21 +0000
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2017-02-22 13:22:42 +0000
commit526f160f311c6d1540df68590712fdd70c2df0bc (patch)
treebaa4dc1145557da47cb6b954bae11686d3b8c769 /ArmPkg/Library/ArmMmuLib/AArch64
parent97f0d01d5df07c7a81e4c505494f43b4b46ffe6c (diff)
downloadedk2-526f160f311c6d1540df68590712fdd70c2df0bc.tar.gz
edk2-526f160f311c6d1540df68590712fdd70c2df0bc.tar.bz2
edk2-526f160f311c6d1540df68590712fdd70c2df0bc.zip
ArmPkg/ArmMmuLib: AARCH64: enable stack alignment checking
Enable the hardware stack alignment check, as mandated by the UEFI spec. This ensures that the stack pointer is 16 byte aligned at each instance where it is used as the base address in a load/store operation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'ArmPkg/Library/ArmMmuLib/AArch64')
-rw-r--r--ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
index 9e0593ce59..2f8f99d44a 100644
--- a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
+++ b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
@@ -734,6 +734,7 @@ ArmConfigureMmu (
MAIR_ATTR(TT_ATTR_INDX_MEMORY_WRITE_BACK, MAIR_ATTR_NORMAL_MEMORY_WRITE_BACK)); // mapped to EFI_MEMORY_WB
ArmDisableAlignmentCheck ();
+ ArmEnableStackAlignmentCheck ();
ArmEnableInstructionCache ();
ArmEnableDataCache ();