audk/UefiCpuPkg
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
..
Application/Cpuid UefiCpuPkg/Cpuid.h: Update CPUID definitions with SDM (Sep.2016) 2016-12-16 11:48:21 +08:00
CpuDxe UefiCpuPkg/CpuDxe: remove all code to flush TLB for APs 2018-01-29 09:37:41 +08:00
CpuFeatures UefiCpuPkg/CpuFeatures: Export HOB if CPU initialized in PEI 2017-10-27 09:34:37 +08:00
CpuIo2Dxe UefiCpuPkg: Refine casting expression result to bigger size 2017-03-06 14:33:26 +08:00
CpuIo2Smm UefiCpuPkg: Refine casting expression result to bigger size 2017-03-06 14:33:26 +08:00
CpuIoPei UefiCpuPkg: Modify CpuIoPei to support new IoLib library 2017-01-17 10:10:32 +08:00
CpuMpPei UefiCpuPkg CpuMpPei: Update return status to follow spec. 2017-07-07 08:54:11 +08:00
CpuS3DataDxe UefiCpuPkg/CpuS3DataDxe: Consume the existing PcdCpuS3DataAddress 2017-03-22 10:11:25 +08:00
Include UefiCpuPkg/MtrrLib: Add comments to recommend to use batch-set API 2018-01-24 11:13:17 +08:00
Library UefiCpuPkg/MpInitLib: Disable interrupt at ExitBootServices AP Mwait 2018-03-20 15:53:25 +08:00
PiSmmCommunication UefiCpuPkg PiSmmCommunicationSmm: Deprecate SMM Communication ACPI Table 2017-07-27 14:08:09 +08:00
PiSmmCpuDxeSmm UefiCpuPkg/PiSmmCpuDxeSmm: fix infinite loop issue in SMM profile 2018-02-08 12:47:17 +08:00
ResetVector UefiCpuPkg/ResetVector/Vtf0: document segment register setup 2017-11-17 18:11:58 +01:00
SecCore UefiCpuPkg: Remove the unused file ResetVec.asm16 2018-02-01 09:24:53 +08:00
Universal/Acpi/S3Resume2Pei UefiCpuPkg S3ResumePei: Signal S3SmmInitDone 2018-03-03 14:20:57 +08:00
UefiCpuPkg.dec UefiCpuPkg: Update package version. 2018-01-22 19:23:56 +08:00
UefiCpuPkg.dsc UefiCpuPkg: Update package version. 2018-01-22 19:23:56 +08:00
UefiCpuPkg.uni UefiCpuPkg/UefiCpuPkg.uni: Add missing string definition for new PCDs 2017-12-26 09:44:14 +08:00
UefiCpuPkgExtra.uni UefiCpuPkg: Convert all .uni files to utf-8 2015-12-15 04:59:14 +00:00