summaryrefslogtreecommitdiffstats
path: root/StandaloneMmPkg
diff options
context:
space:
mode:
authorAchin Gupta <achin.gupta@arm.com>2018-12-03 12:50:54 +0530
committerAchin Gupta <achin.gupta@arm.com>2018-12-09 16:01:27 +0000
commitd4951425063b06014e4125779ac91222b931478e (patch)
tree2841ba14c62b4dbd31de064e26121b29ec79b94a /StandaloneMmPkg
parentf8943176f09518c86275e6228d7ebd0a7748d0dc (diff)
downloadedk2-d4951425063b06014e4125779ac91222b931478e.tar.gz
edk2-d4951425063b06014e4125779ac91222b931478e.tar.bz2
edk2-d4951425063b06014e4125779ac91222b931478e.zip
StandaloneMmPkg: Zero data structure explicitly
Introduction of the -mstrict-align flag results in GCC attempting to use memset to zero out the InitMmFoundationSvcArgs structure. In the absence of this C library function, this patch explicitly zeroes this data structure prior to use. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Achin Gupta <achin.gupta@arm.com> Signed-off-by: Sughosh Ganu <sughosh.ganu@arm.com> Reviewed-by: Achin Gupta <achin.gupta@arm.com>
Diffstat (limited to 'StandaloneMmPkg')
-rw-r--r--StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
index 20fd0d1f34..05ed6c8dd0 100644
--- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
+++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
@@ -224,7 +224,7 @@ _ModuleEntryPoint (
{
PE_COFF_LOADER_IMAGE_CONTEXT ImageContext;
EFI_SECURE_PARTITION_BOOT_INFO *PayloadBootInfo;
- ARM_SVC_ARGS InitMmFoundationSvcArgs = {0};
+ ARM_SVC_ARGS InitMmFoundationSvcArgs;
EFI_STATUS Status;
UINT32 SectionHeaderOffset;
UINT16 NumberOfSections;
@@ -299,6 +299,7 @@ _ModuleEntryPoint (
DEBUG ((DEBUG_INFO, "Shared Cpu Driver EP 0x%lx\n", (UINT64) CpuDriverEntryPoint));
finish:
+ ZeroMem (&InitMmFoundationSvcArgs, sizeof(InitMmFoundationSvcArgs));
InitMmFoundationSvcArgs.Arg0 = ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64;
InitMmFoundationSvcArgs.Arg1 = Status;
DelegatedEventLoop (&InitMmFoundationSvcArgs);