audk/UefiCpuPkg/PiSmmCpuDxeSmm
Lou, Yun 89f7ed8b29 UefiCpuPkg: Prevent from re-initializing CPU features during S3 resume
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3621
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3631

Current CPU feature initialization design:
During normal boot, CpuFeaturesPei module (inside FSP) initializes the
CPU features. During S3 boot, CpuFeaturesPei module does nothing, and
CpuSmm driver (in SMRAM) initializes CPU features instead.

This code change prevents CpuSmm driver from re-initializing CPU
features during S3 resume if CpuFeaturesPei module has done the same
initialization.

In addition, EDK2 contains DxeIpl PEIM that calls S3RestoreConfig2 PPI
during S3 boot and this PPI eventually calls CpuSmm driver (in SMRAM) to
initialize the CPU features, so "EDK2 + FSP" does not have the CPU
feature initialization issue during S3 boot. But "coreboot" does not
contain DxeIpl PEIM and the issue appears, unless
"PcdCpuFeaturesInitOnS3Resume" is set to TRUE.

Signed-off-by: Jason Lou <yun.lou@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
2021-09-16 12:50:06 +00:00
..
Ia32 UefiCpuPkg/PiSmmCpuDxeSmm: Reflect page table depth with page table address 2020-11-18 04:52:26 +00:00
X64 UefiCpuPkg/ExceptionLib: Conditionally clear shadow stack token busy bit 2021-07-06 08:18:21 +00:00
CpuS3.c UefiCpuPkg: Prevent from re-initializing CPU features during S3 resume 2021-09-16 12:50:06 +00:00
CpuService.c
CpuService.h
MpService.c UefiCpuPkg/PiSmmCpu: Remove hardcode 48 address size limitation 2021-05-18 08:07:57 +00:00
PiSmmCpuDxeSmm.c UefiCpuPkg/PiSmmCpuDxeSmm: Update mPatchCetSupported set condition 2021-09-01 03:38:06 +00:00
PiSmmCpuDxeSmm.h UefiCpuPkg: PiSmmCpuDxeSmm: Check buffer size before accessing 2021-04-12 17:23:54 +00:00
PiSmmCpuDxeSmm.inf UefiCpuPkg: Prevent from re-initializing CPU features during S3 resume 2021-09-16 12:50:06 +00:00
PiSmmCpuDxeSmm.uni
PiSmmCpuDxeSmmExtra.uni
SmmCpuMemoryManagement.c UefiCpuPkg/PiSmmCpuDxeSmm: Reflect page table depth with page table address 2020-11-18 04:52:26 +00:00
SmmMp.c UefiCpuPkg/PiSmmCpuDxeSmm: Enable MM MP Protocol 2019-07-16 11:54:55 +08:00
SmmMp.h UefiCpuPkg/PiSmmCpuDxeSmm: Keep function comment and declaration adjacent 2019-08-02 14:19:13 +08:00
SmmProfile.c UefiCpuPkg/PiSmmCpuDxeSmm: Update mPatchCetSupported set condition 2021-09-01 03:38:06 +00:00
SmmProfile.h
SmmProfileInternal.h UefiCpuPkg: PiSmmCpuDxeSmm skip MSR_IA32_MISC_ENABLE manipulation on AMD 2020-07-07 23:25:16 +00:00
SmramSaveState.c UefiCpuPkg: Clean up save state boundary checks and comments. 2021-09-01 06:07:56 +00:00
SyncTimer.c