audk/UefiCpuPkg/Library
Lendacky, Thomas dbc22a1785 UefiCpuPkg/MpInitLib: Allocate a separate SEV-ES AP reset stack area
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3324

The SEV-ES stacks currently share a page with the reset code and data.
Separate the SEV-ES stacks from the reset vector code and data to avoid
possible stack overflows from overwriting the code and/or data.

When SEV-ES is enabled, invoke the GetWakeupBuffer() routine a second time
to allocate a new area, below the reset vector and data.

Both the PEI and DXE versions of GetWakeupBuffer() are changed so that
when PcdSevEsIsEnabled is true, they will track the previous reset buffer
allocation in order to ensure that the new buffer allocation is below the
previous allocation. When PcdSevEsIsEnabled is false, the original logic
is followed.

Fixes: 7b7508ad78
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Marvin Häuser <mhaeuser@posteo.de>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Message-Id: <3cae2ac836884b131725866264e0a0e1897052de.1621024125.git.thomas.lendacky@amd.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
2021-05-29 11:33:16 +00:00
..
BaseUefiCpuLib
BaseXApicLib
BaseXApicX2ApicLib
CpuCacheInfoLib UefiCpuPkg/CpuCacheInfoLib: Collect cache associative type 2021-03-17 11:27:39 +00:00
CpuCommonFeaturesLib
CpuExceptionHandlerLib UefiCpuPkg/CpuExceptionHandler: Add missing comma to exception name array 2021-05-14 11:26:17 +00:00
CpuTimerLib UefiCpuPkg/CpuTimerLib: Update LIBRARY_CLASS of Base instance. 2021-04-12 03:20:24 +00:00
MicrocodeLib UefiCpuPkg: Add MicrocodeLib for loading microcode 2021-04-09 01:43:18 +00:00
MpInitLib UefiCpuPkg/MpInitLib: Allocate a separate SEV-ES AP reset stack area 2021-05-29 11:33:16 +00:00
MpInitLibUp
MtrrLib
PlatformSecLibNull
RegisterCpuFeaturesLib UefiCpuPkg RegisterCpuFeaturesLib: NumberOfCpus may be uninitialized 2021-01-21 14:30:06 +00:00
SecPeiDxeTimerLibUefiCpu
SmmCpuFeaturesLib UefiCpuPkg/SmmCpuFeaturesLib: Add Standalone MM support 2021-03-08 18:07:32 +00:00
SmmCpuPlatformHookLibNull
VmgExitLibNull UefiCpuPkg, OvmfPkg: Disable interrupts when using the GHCB 2020-11-10 19:07:55 +00:00