audk/UefiCpuPkg
Jeff Fan e78a2a49ee UefiCpuPkg/PiSmmCpuDxeSmm: SMM_CPU_DATA_BLOCK is not cleared
The commit 8b9311 changed the zeroing of mSmmMpSyncData of type
SMM_DISPATCHER_MP_SYNC_DATA by the following patch.
 -    ZeroMem (mSmmMpSyncData, mSmmMpSyncDataSize);
 +    mSmmMpSyncData->SwitchBsp = FALSE;

mSmmMpSyncDataSize not only includes SMM_DISPATCHER_MP_SYNC_DATA, but
also includes the SMM_CPU_DATA_BLOCK array and one BOOLEAN variable
array as shown here:

  mSmmMpSyncDataSize = sizeof (SMM_DISPATCHER_MP_SYNC_DATA) +
       (sizeof (SMM_CPU_DATA_BLOCK) + sizeof (BOOLEAN)) *
       gSmmCpuPrivate->SmmCoreEntryContext.NumberOfCpus;

This patch restores the original ZeroMem() to clear all CPU Sync data.
The commit 8b9311 may cause unexpected behavior.

v2:
  Mentioned CandidateBsp array in comments to make it more accurate.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
2016-07-20 18:50:53 -07:00
..
Application/Cpuid UefiCpuPkg/Cpuid.h: Display Intel SGX Resource Enumeration Leaves 2016-03-30 08:29:56 +08:00
CpuDxe UefiCpuPkg/CpuDxe: StartupAllAPs in parallel mode 2016-07-20 11:13:25 +08:00
CpuIo2Dxe UefiCpuPkg CpuIo2Dxe: Update INF to refer to NASM source file 2016-07-11 13:20:22 +08:00
CpuIo2Smm UefiCpuPkg: Convert all .uni files to utf-8 2015-12-15 04:59:14 +00:00
CpuIoPei UefiCpuPkg: Convert all .uni files to utf-8 2015-12-15 04:59:14 +00:00
CpuMpPei UefiCpuPkg/CpuMpPei: Remove PmodeOffset and LmodeOffset 2016-07-14 09:44:09 +08:00
CpuS3DataDxe UefiCpuPkg: Add the missing module uni for CpuS3DataDxe 2015-12-24 02:30:43 +00:00
Include UefiCpuPkg/Cpuid.h: Add CPUID defines and structures for Intel SGX 2016-03-30 08:29:49 +08:00
Library UefiCpuPkg/MtrrLib: Add notes for usage by BSP/APs 2016-07-20 11:13:02 +08:00
PiSmmCommunication UefiCpuPkg: Convert all .uni files to utf-8 2015-12-15 04:59:14 +00:00
PiSmmCpuDxeSmm UefiCpuPkg/PiSmmCpuDxeSmm: SMM_CPU_DATA_BLOCK is not cleared 2016-07-20 18:50:53 -07:00
ResetVector UefiCpuPkg: Convert all .uni files to utf-8 2015-12-15 04:59:14 +00:00
SecCore UefiCpuPkg SecCore: Update SecCore inf to refer to nasmb source 2016-07-11 13:20:21 +08:00
Universal/Acpi/S3Resume2Pei UefiCpuPkg S3Resume2Pei: Report status code when allocate memory is failed 2016-07-02 12:22:55 +08:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
License.txt
UefiCpuPkg.dec UefiCpuPkg: change PcdCpuSmmStackGuard default to TRUE 2016-06-06 10:58:24 +02:00
UefiCpuPkg.dsc UefiCpuPkg/ExceptionLib: Import PeiCpuExceptionHandlerLib module 2016-06-01 15:36:14 +08:00
UefiCpuPkg.uni UefiCpuPkg: Add PCD PcdCpuApTargetCstate 2015-12-18 03:23:53 +00:00
UefiCpuPkgExtra.uni UefiCpuPkg: Convert all .uni files to utf-8 2015-12-15 04:59:14 +00:00