Bugzilla: 3150 (https://bugzilla.tianocore.org/show_bug.cgi?id=3150)
Fix ECC error "[5007] There should be no initialization of a variable
as part of its declaration Variable."
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
IN UINTN NsCommBufferAddr\r
)\r
{\r
IN UINTN NsCommBufferAddr\r
)\r
{\r
- EFI_MM_COMMUNICATE_HEADER *GuidedEventContext = NULL;\r
- EFI_MM_ENTRY_CONTEXT MmEntryPointContext = {0};\r
+ EFI_MM_COMMUNICATE_HEADER *GuidedEventContext;\r
+ EFI_MM_ENTRY_CONTEXT MmEntryPointContext;\r
EFI_STATUS Status;\r
UINTN NsCommBufferSize;\r
\r
EFI_STATUS Status;\r
UINTN NsCommBufferSize;\r
\r
return EFI_ACCESS_DENIED;\r
}\r
\r
return EFI_ACCESS_DENIED;\r
}\r
\r
+ GuidedEventContext = NULL;\r
// Now that the secure world can see the normal world buffer, allocate\r
// memory to copy the communication buffer to the secure world.\r
Status = mMmst->MmAllocatePool (\r
// Now that the secure world can see the normal world buffer, allocate\r
// memory to copy the communication buffer to the secure world.\r
Status = mMmst->MmAllocatePool (\r
// Stash the pointer to the allocated Event Context for this CPU\r
PerCpuGuidedEventContext[CpuNumber] = GuidedEventContext;\r
\r
// Stash the pointer to the allocated Event Context for this CPU\r
PerCpuGuidedEventContext[CpuNumber] = GuidedEventContext;\r
\r
+ ZeroMem (&MmEntryPointContext, sizeof (EFI_MM_ENTRY_CONTEXT));\r
+\r
MmEntryPointContext.CurrentlyExecutingCpu = CpuNumber;\r
MmEntryPointContext.NumberOfCpus = mMpInformationHobData->NumberOfProcessors;\r
\r
MmEntryPointContext.CurrentlyExecutingCpu = CpuNumber;\r
MmEntryPointContext.NumberOfCpus = mMpInformationHobData->NumberOfProcessors;\r
\r