audk/UefiCpuPkg/Library
Hao Wu a7bbe9d20b UefiCpuPkg/MpInitLib: Disable interrupt at ExitBootServices AP Mwait
Within function ApWakeupFunction():

When source level debugger is enabled, AP interrupts will be enabled by
EnableDebugAgent(). Then the AP function will be executed by:

Procedure (Parameter);

After the AP function returns, AP interrupts will be disabled when the
APs are placed in loop mode (both HltLoop and MwaiLoop).

However, at ExitBootServices, ApWakeupFunction() is called with
'Procedure' equals to RelocateApLoop().

(ExitBootServices callback registered within InitMpGlobalData())

RelocateApLoop() never returns, so it has to disable the AP interrupts by
itself. However, we find that interrupts are only disabled for the
HltLoop case, but not for the MwaitLoop case (within file MpFuncs.nasm).

This commit adds the missing disabling of AP interrupts for MwaitLoop.

Also, for X64, this commit will disable the interrupts before switching to
32-bit mode.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jeff Fan <vanjeff_919@hotmail.com>
2018-03-20 15:53:25 +08:00
..
BaseUefiCpuLib UefiCpuPkg/BaseUefiCpuLib.inf: Remove unnecessary library class. 2017-08-16 16:16:18 +08:00
BaseXApicLib UefiCpuPkg: ApicLib 2017-09-05 13:03:22 +08:00
BaseXApicX2ApicLib UefiCpuPkg: ApicLib 2017-09-05 13:03:22 +08:00
CpuCommonFeaturesLib UefiCpuPkg/CpuCommonFeaturesLib: Fix coding style issue 2018-03-08 08:58:48 +08:00
CpuExceptionHandlerLib UefiCpuPkg CpuExceptionHandlerLib: use FixedPcdGetSize() as the macro value 2018-03-16 14:34:44 +08:00
MpInitLib UefiCpuPkg/MpInitLib: Disable interrupt at ExitBootServices AP Mwait 2018-03-20 15:53:25 +08:00
MtrrLib UefiCpuPkg/MtrrLib: Add comments to recommend to use batch-set API 2018-01-24 11:13:17 +08:00
PlatformSecLibNull UefiCpuPkg: Convert all .uni files to utf-8 2015-12-15 04:59:14 +00:00
RegisterCpuFeaturesLib UefiCpuPkg: Delete redundant PcdGetSize PcdCpuFeaturesSupport 2017-12-27 15:31:33 +08:00
SecPeiDxeTimerLibUefiCpu UefiCpuPkg: Convert all .uni files to utf-8 2015-12-15 04:59:14 +00:00
SmmCpuFeaturesLib UefiCpuPkg: Update SmmCpuFeatureLib pass XCODE5 tool chain 2018-01-16 23:42:58 +08:00
SmmCpuPlatformHookLibNull UefiCpuPkg: Convert all .uni files to utf-8 2015-12-15 04:59:14 +00:00