UefiCpuPkg/MpInitLib: Place APs in safe loop before hand-off to OS
Register Exit Boot Service callback function MpInitExitBootServicesCallback() to place AP one safe loop before hand-off to OS. Allocated one reserved memory and copy the AsmRellocateApLoop() code into it. It could avoid the CPU Dxe driver (located in Boot Service data range) crashed after Exit Boot Service event. Place AP into the target Cx-State (specified by PcdCpuApTargetCstate) could save power if Monitor-mwait feature supported. In long mode, switch AP into protected mode could let AP not require page table when executing this safe loop. Page Table (located in Boot Service data range) may crashed after Exit Boot Service event. v3: 1. Rename *RellocateAp* to *RelocateAp* Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Michael Kinney <michael.d.kinney@intel.com>
This commit is contained in:
@@ -519,6 +519,17 @@ MicrocodeDetect (
|
||||
IN CPU_MP_DATA *CpuMpData
|
||||
);
|
||||
|
||||
/**
|
||||
Detect whether Mwait-monitor feature is supported.
|
||||
|
||||
@retval TRUE Mwait-monitor feature is supported.
|
||||
@retval FALSE Mwait-monitor feature is not supported.
|
||||
**/
|
||||
BOOLEAN
|
||||
IsMwaitSupport (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
Notify function on End Of PEI PPI.
|
||||
|
||||
|
Reference in New Issue
Block a user