]> git.proxmox.com Git - mirror_edk2.git/commit
UefiCpuPkg/CpuExceptionHandlerLib: always clear descriptor data in advance
authorJian J Wang <jian.j.wang@intel.com>
Wed, 17 Oct 2018 04:49:57 +0000 (12:49 +0800)
committerJian J Wang <jian.j.wang@intel.com>
Thu, 18 Oct 2018 05:19:14 +0000 (13:19 +0800)
commiteae7b476c2151141a43cc89d9629c47757f024f1
treed54bdadbfb298f8360ddf45e1fc5ff7f347fda22
parentfea5e28658c672ce2cbe38d0927ab27beb792097
UefiCpuPkg/CpuExceptionHandlerLib: always clear descriptor data in advance

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

Sometimes the memory will be contaminated by random data left in last
boot (warm reset). The code should not assume the allocated memory is
always filled with zero. This patch add code to clear data structure
used for stack switch to prevent such problem from happening.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
UefiCpuPkg/Library/CpuExceptionHandlerLib/Ia32/ArchExceptionHandler.c
UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ArchExceptionHandler.c