summaryrefslogtreecommitdiffstats
path: root/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c
diff options
context:
space:
mode:
Diffstat (limited to 'StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c')
-rw-r--r--StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c
index 2087748053..2313d3f9b3 100644
--- a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c
+++ b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c
@@ -65,8 +65,8 @@ PiMmStandaloneArmTfCpuDriverEntry (
IN UINTN NsCommBufferAddr
)
{
- EFI_MM_COMMUNICATE_HEADER *GuidedEventContext = NULL;
- EFI_MM_ENTRY_CONTEXT MmEntryPointContext = {0};
+ EFI_MM_COMMUNICATE_HEADER *GuidedEventContext;
+ EFI_MM_ENTRY_CONTEXT MmEntryPointContext;
EFI_STATUS Status;
UINTN NsCommBufferSize;
@@ -107,6 +107,7 @@ PiMmStandaloneArmTfCpuDriverEntry (
return EFI_ACCESS_DENIED;
}
+ GuidedEventContext = NULL;
// Now that the secure world can see the normal world buffer, allocate
// memory to copy the communication buffer to the secure world.
Status = mMmst->MmAllocatePool (
@@ -127,6 +128,8 @@ PiMmStandaloneArmTfCpuDriverEntry (
// Stash the pointer to the allocated Event Context for this CPU
PerCpuGuidedEventContext[CpuNumber] = GuidedEventContext;
+ ZeroMem (&MmEntryPointContext, sizeof (EFI_MM_ENTRY_CONTEXT));
+
MmEntryPointContext.CurrentlyExecutingCpu = CpuNumber;
MmEntryPointContext.NumberOfCpus = mMpInformationHobData->NumberOfProcessors;