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 UefiCpuPkg: Move StandardSignatureIsAuthenticAMD to BaseUefiCpuLib 2020-07-07 23:25:16 +00:00
BaseXApicLib UefiCpuPkg: Move StandardSignatureIsAuthenticAMD to BaseUefiCpuLib 2020-07-07 23:25:16 +00:00
BaseXApicX2ApicLib UefiCpuPkg: Move StandardSignatureIsAuthenticAMD to BaseUefiCpuLib 2020-07-07 23:25:16 +00:00
CpuCacheInfoLib UefiCpuPkg/CpuCacheInfoLib: Collect cache associative type 2021-03-17 11:27:39 +00:00
CpuCommonFeaturesLib UefiCpuPkg/CpuCommonFeaturesLib: Fix spelling mistake 2020-08-03 16:31:36 +00:00
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 UefiCpuPkg/MpInitLibUp: Add MpInitLibStartupAllCPUs API. 2019-07-29 09:25:20 +08:00
MtrrLib UefiCpuPkg/MtrrLibUnitTest: Change to use static array for CI test 2020-08-12 11:38:37 +00:00
PlatformSecLibNull UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
RegisterCpuFeaturesLib UefiCpuPkg RegisterCpuFeaturesLib: NumberOfCpus may be uninitialized 2021-01-21 14:30:06 +00:00
SecPeiDxeTimerLibUefiCpu UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
SmmCpuFeaturesLib UefiCpuPkg/SmmCpuFeaturesLib: Add Standalone MM support 2021-03-08 18:07:32 +00:00
SmmCpuPlatformHookLibNull UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
VmgExitLibNull UefiCpuPkg, OvmfPkg: Disable interrupts when using the GHCB 2020-11-10 19:07:55 +00:00