From: Achin Gupta <[email protected]>

On AArch64, Standalone MM during the SEC phase runs in S-EL0 with
SCTLR_EL1.A=1. This patch adds the -mstrict-align compiler flag to
ensure that the generated code is compliant with the runtime
alignment checks.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Achin Gupta <[email protected]>
Signed-off-by: Sughosh Ganu <[email protected]>
---
 StandaloneMmPkg/StandaloneMmPkg.dsc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/StandaloneMmPkg/StandaloneMmPkg.dsc 
b/StandaloneMmPkg/StandaloneMmPkg.dsc
index 84de1ab0f13a..3470e1102cc3 100644
--- a/StandaloneMmPkg/StandaloneMmPkg.dsc
+++ b/StandaloneMmPkg/StandaloneMmPkg.dsc
@@ -128,4 +128,5 @@ [Components.AARCH64]
 #
 
###################################################################################################
 [BuildOptions.AARCH64]
-GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 -march=armv8-a+nofp
+GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 -march=armv8-a+nofp 
-mstrict-align
+GCC:*_*_*_CC_FLAGS = -mstrict-align
-- 
2.7.4

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to