mirror of https://github.com/acidanthera/audk.git
StandaloneMmPkg: Fix ECC error 5007 in StandaloneMmCpu
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>
This commit is contained in:
parent
7aa9d75211
commit
eda1ffacf1
|
@ -65,8 +65,8 @@ PiMmStandaloneArmTfCpuDriverEntry (
|
||||||
IN UINTN NsCommBufferAddr
|
IN UINTN NsCommBufferAddr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_MM_COMMUNICATE_HEADER *GuidedEventContext = NULL;
|
EFI_MM_COMMUNICATE_HEADER *GuidedEventContext;
|
||||||
EFI_MM_ENTRY_CONTEXT MmEntryPointContext = {0};
|
EFI_MM_ENTRY_CONTEXT MmEntryPointContext;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINTN NsCommBufferSize;
|
UINTN NsCommBufferSize;
|
||||||
|
|
||||||
|
@ -107,6 +107,7 @@ PiMmStandaloneArmTfCpuDriverEntry (
|
||||||
return EFI_ACCESS_DENIED;
|
return EFI_ACCESS_DENIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GuidedEventContext = NULL;
|
||||||
// Now that the secure world can see the normal world buffer, allocate
|
// Now that the secure world can see the normal world buffer, allocate
|
||||||
// memory to copy the communication buffer to the secure world.
|
// memory to copy the communication buffer to the secure world.
|
||||||
Status = mMmst->MmAllocatePool (
|
Status = mMmst->MmAllocatePool (
|
||||||
|
@ -127,6 +128,8 @@ PiMmStandaloneArmTfCpuDriverEntry (
|
||||||
// Stash the pointer to the allocated Event Context for this CPU
|
// Stash the pointer to the allocated Event Context for this CPU
|
||||||
PerCpuGuidedEventContext[CpuNumber] = GuidedEventContext;
|
PerCpuGuidedEventContext[CpuNumber] = GuidedEventContext;
|
||||||
|
|
||||||
|
ZeroMem (&MmEntryPointContext, sizeof (EFI_MM_ENTRY_CONTEXT));
|
||||||
|
|
||||||
MmEntryPointContext.CurrentlyExecutingCpu = CpuNumber;
|
MmEntryPointContext.CurrentlyExecutingCpu = CpuNumber;
|
||||||
MmEntryPointContext.NumberOfCpus = mMpInformationHobData->NumberOfProcessors;
|
MmEntryPointContext.NumberOfCpus = mMpInformationHobData->NumberOfProcessors;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue