audk/UefiCpuPkg/Library/MpInitLib
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
..
Ia32 UefiCpuPkg/MpInitLib: Disable interrupt at ExitBootServices AP Mwait 2018-03-20 15:53:25 +08:00
X64 UefiCpuPkg/MpInitLib: Disable interrupt at ExitBootServices AP Mwait 2018-03-20 15:53:25 +08:00
DxeMpInitLib.inf UefiCpuPkg/MpInitLib: Add missing Guard page setup for APs 2017-12-22 14:16:51 +08:00
DxeMpInitLib.uni
DxeMpLib.c UefiCpuPkg/MpInitLib: put mReservedApLoopFunc in executable memory 2018-03-08 17:07:14 +08:00
Microcode.c UefiCpuPkg/MpInitLib: Avoid call PcdGet* in Ap & Bsp. 2017-10-20 10:30:46 +08:00
MpLib.c UefiCpuPkg/MpInitLib: force flushing TLB for AP in mwait loop mode 2018-01-29 09:37:41 +08:00
MpLib.h UefiCpuPkg/MpInitLib: fix issue in wakeup buffer initialization 2018-01-25 10:24:21 +08:00
PeiMpInitLib.inf UefiCpuPkg/MpInitLib: needn't to allocate AP reset vector 2017-04-26 08:55:44 +08:00
PeiMpInitLib.uni
PeiMpLib.c UefiCpuPkg/PeiMpLib: Fix a system hang-in-pei issue. 2018-01-24 11:07:22 +08:00