]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/ArmMmuLib: AARCH64: enable stack alignment checking
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 22 Feb 2017 09:38:21 +0000 (09:38 +0000)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 22 Feb 2017 13:22:42 +0000 (13:22 +0000)
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>
ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c

index 9e0593ce598bd74aa37ddf446efe2088af27b61e..2f8f99d44a31cd6b4d4ec3dd3d47469899430fee 100644 (file)
@@ -734,6 +734,7 @@ ArmConfigureMmu (
               MAIR_ATTR(TT_ATTR_INDX_MEMORY_WRITE_BACK, MAIR_ATTR_NORMAL_MEMORY_WRITE_BACK));       // mapped to EFI_MEMORY_WB\r
 \r
   ArmDisableAlignmentCheck ();\r
+  ArmEnableStackAlignmentCheck ();\r
   ArmEnableInstructionCache ();\r
   ArmEnableDataCache ();\r
 \r