]> git.proxmox.com Git - mirror_edk2.git/commit
UefiCpuPkg/CpuMp: Fix hang when StackGuard is enabled in 16-core cpu
authorRay Ni <ray.ni@intel.com>
Fri, 22 Jan 2021 02:45:02 +0000 (10:45 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 22 Jan 2021 03:23:53 +0000 (03:23 +0000)
commit3b769c5110384fb33bcfeddced80f721ec7838cc
tree1f9ba238dde98a79bc027e2dfaf73dff75e9ee6d
parent6c5801be6ef36e35f0b4ff906a4c99d68ca6f69a
UefiCpuPkg/CpuMp: Fix hang when StackGuard is enabled in 16-core cpu

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3167

When StackGuard is enabled, the CpuMp driver allocates
known good stacks for all CPUs for DF# and PF# exceptions.
It uses AllocatePool to do so.

The size needed equals to 64KB
= StackSize (2K) * ExceptionNumber (2) * NumberOfProcessors (16)

However, AllocatePool max allocation size is less than 64K.
To fix the issue, AllocatePages() is used.

Signed-off-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
UefiCpuPkg/CpuMpPei/CpuMpPei.c
UefiCpuPkg/CpuMpPei/CpuMpPei.h
UefiCpuPkg/CpuMpPei/CpuMpPei.inf