edk2/UefiCpuPkg/CpuDxe
Oliver Smith-Denny 924780f2cc UefiCpuPkg: x86 CpuDxe: Allocate AP Exception Stack Below 4GB
When setting up the APs' exception stacks, the x86 CpuDxe allocates
any range and then copies over the existing GDT and IDT and adds the
appropriate new entries for this AP, then installs them.

This can cause an issue if the allocated buffer is over 4GB because
the next time the AP is started, it goes through an INIT-SIPI-SIPI,
stepping through real mode -> protected mode -> long mode and when it
is in protected mode it needs a 32 code segment descriptor or else it
will fault when trying to execute. If the GDT lives above 4GB, it
cannot be accessed by the protected mode code and the triple fault
is seen.

This patch updates CpuDxe's MP management code to allocate the
exception stacks for all APs below 4GB explicitly to avoid this
problem, such as it does with the BSP's GDT that first gets
populated to the APs.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2024-12-17 10:55:59 +00:00
..
Ia32 UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
LoongArch64 UefiCpuPkg: Remove macro MAX_LOONGARCH_EXCEPTION 2024-12-12 04:57:03 +00:00
X64 UefiCpuPkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
CpuDxe.c UefiCpuPkg/CpuDxe: Eliminate the unused variable. 2023-10-12 07:30:46 +00:00
CpuDxe.h UefiCpuPkg/CpuDxe: Refactor to use CPUID definitions 2023-04-01 01:08:34 +00:00
CpuDxe.inf UefiCpuPkg: Add CpuDxe driver for LoongArch64 2024-04-16 06:00:32 +00:00
CpuDxe.uni UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
CpuDxeExtra.uni UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
CpuGdt.c UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuGdt.h UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuMp.c UefiCpuPkg: x86 CpuDxe: Allocate AP Exception Stack Below 4GB 2024-12-17 10:55:59 +00:00
CpuMp.h UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuPageTable.c UefiCpuPkg: CpuDxe: Set RW and P Attributes on Split Pages 2022-06-23 06:36:56 +00:00
CpuPageTable.h UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00