]> git.proxmox.com Git - mirror_edk2.git/commit - UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
UefiCpuPkg/MpInitLib: Don't allocate reset vector in Exit Boot Service
authorJeff Fan <jeff.fan@intel.com>
Wed, 24 Aug 2016 14:42:32 +0000 (22:42 +0800)
committerJeff Fan <jeff.fan@intel.com>
Thu, 25 Aug 2016 08:12:55 +0000 (16:12 +0800)
commit3ed4e502b5f23fbcef235b3a9d025c60c217272b
tree06567e583f4d36e07c424d24c396d1989cb13aaa
parent42c37b3b3322a597b62e14852bcb3030c86ea3c4
UefiCpuPkg/MpInitLib: Don't allocate reset vector in Exit Boot Service

In Exit Boot Services callback function, we cannot use allocate memory services
because it may change the memory map that has been gotten by OS.

This fix is not to allocate reset vector buffer after SaveRestoreFlag is set to
TRUE in MpInitExitBootServicesCallback(). Instead AllocateResetVector() will use
the previous allocated buffer address and save the contents before copying reset
vector code. At the same time, FreeResetVector() will restore original contents
after if SaveRestoreFlag is TRUE.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
UefiCpuPkg/Library/MpInitLib/DxeMpLib.c