audk/UefiCpuPkg
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
..
Application/Cpuid UefiCpuPkg: strip trailing whitespace 2019-10-04 11:18:32 +01:00
CpuDxe UefiCpuPkg/CpuDxe: Guarantee GDT is below 4GB 2021-03-18 01:11:23 +00:00
CpuFeatures UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
CpuIo2Dxe UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
CpuIo2Smm UefiCpuPkg: CpuIo2Smm: Support of CpuIo driver under StandaloneMm 2021-02-01 10:04:42 -08:00
CpuIoPei UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
CpuMpPei UefiCpuPkg: Move MigrateGdt from DiscoverMemory to TempRamDone. (CVE-2019-11098) 2021-02-04 01:30:05 +00:00
CpuS3DataDxe UefiCpuPkg/CpuS3DataDxe: do not allocate useless register tables 2021-01-20 18:20:14 +00:00
Include UefiCpuPkg: Add MicrocodeLib for loading microcode 2021-04-09 01:43:18 +00:00
Library UefiCpuPkg/MpInitLib: Allocate a separate SEV-ES AP reset stack area 2021-05-29 11:33:16 +00:00
PiSmmCommunication UefiCpuPkg/SmmCommunication: Remove out-dated comments 2021-03-25 02:34:29 +00:00
PiSmmCpuDxeSmm UefiCpuPkg/PiSmmCpu: Remove hardcode 48 address size limitation 2021-05-18 08:07:57 +00:00
ResetVector UefiCpuPkg: Add a 16-bit protected mode code segment descriptor 2020-08-17 02:46:39 +00:00
SecCore UefiCpuPkg: Move MigrateGdt from DiscoverMemory to TempRamDone. (CVE-2019-11098) 2021-02-04 01:30:05 +00:00
SecMigrationPei UefiCpuPkg/SecMigrationPei: Add initial PEIM (CVE-2019-11098) 2020-07-28 01:43:16 +00:00
Test UefiCpuPkg/MtrrLib/UnitTest: Add host based unit test 2020-08-12 11:38:37 +00:00
Universal/Acpi/S3Resume2Pei UefiCpuPkg: Remove PcdFrameworkCompatibilitySupport usage 2019-05-09 09:42:55 +08:00
UefiCpuPkg.ci.yaml UefiCpuPkg/UefiCpuPkg.ci.yaml: Add configuration for Ecc check 2020-08-17 03:28:09 +00:00
UefiCpuPkg.dec UefiCpuPkg: Add MicrocodeLib for loading microcode 2021-04-09 01:43:18 +00:00
UefiCpuPkg.dsc UefiCpuPkg: Add MicrocodeLib for loading microcode 2021-04-09 01:43:18 +00:00
UefiCpuPkg.uni UefiCpuPkg: Create an SEV-ES workarea PCD 2020-08-17 02:46:39 +00:00
UefiCpuPkgExtra.uni UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00