diff options
author | Ray Ni <ray.ni@intel.com> | 2021-03-16 11:32:33 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-03-18 01:11:23 +0000 |
commit | 313d86c956d4599054a9dcd524668f67797d317a (patch) | |
tree | 609b756ae8870e84ee4e9b871b22a42ab384275f /BaseTools/Source/Python/Ecc/Database.py | |
parent | 773b0bc2838ede154c6de9d78401b91fafa91062 (diff) | |
download | edk2-313d86c956d4599054a9dcd524668f67797d317a.tar.gz edk2-313d86c956d4599054a9dcd524668f67797d317a.tar.bz2 edk2-313d86c956d4599054a9dcd524668f67797d317a.zip |
UefiCpuPkg/CpuDxe: Guarantee GDT is below 4GB
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3233
GDT needs to be allocated below 4GB in 64bit environment
because AP needs it for entering to protected mode.
CPU running in big real mode cannot access above 4GB GDT.
But CpuDxe driver contains below code:
gdt = AllocateRuntimePool (sizeof (GdtTemplate) + 8);
.....
gdtPtr.Base = (UINT32)(UINTN)(VOID*) gdt;
The AllocateRuntimePool() may allocate memory above 4GB.
Thus, we cannot use AllocateRuntimePool (), instead,
we should use AllocatePages() to make sure GDT is below 4GB space.
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>
Diffstat (limited to 'BaseTools/Source/Python/Ecc/Database.py')
0 files changed, 0 insertions, 0 deletions