mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/CpuMpPei: Add AsmHltLoop ()
Add AsmHltLoop () in assembly code, it will not be copied into AP wakeup buffer and invoked at end of ApCFunction (). To make sure AP work in case AP wakeup buffer is restored to original data. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18013 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
e35d034736
commit
fcc82734bf
|
@ -169,6 +169,7 @@ ApCFunction (
|
|||
//
|
||||
InterlockedIncrement ((UINT32 *)&PeiCpuMpData->FinishedCount);
|
||||
|
||||
AsmCliHltLoop ();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -166,6 +166,15 @@ AsmInitializeGdt (
|
|||
IN IA32_DESCRIPTOR *Gdtr
|
||||
);
|
||||
|
||||
/**
|
||||
Assembly code to do CLI-HALT loop.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
AsmCliHltLoop (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
This function will be called by BSP to wakeup AP.
|
||||
|
|
|
@ -144,6 +144,12 @@ CProcedureInvoke:
|
|||
RendezvousFunnelProc ENDP
|
||||
RendezvousFunnelProcEnd::
|
||||
|
||||
AsmCliHltLoop PROC near C PUBLIC
|
||||
cli
|
||||
hlt
|
||||
jmp $-2
|
||||
AsmCliHltLoop ENDP
|
||||
|
||||
;-------------------------------------------------------------------------------------
|
||||
; AsmGetAddressMap (&AddressMap);
|
||||
;-------------------------------------------------------------------------------------
|
||||
|
|
|
@ -132,6 +132,12 @@ CProcedureInvoke:
|
|||
jmp $ ; never reach here
|
||||
RendezvousFunnelProcEnd:
|
||||
|
||||
global ASM_PFX(AsmCliHltLoop)
|
||||
ASM_PFX(AsmCliHltLoop):
|
||||
cli
|
||||
hlt
|
||||
jmp $-2
|
||||
|
||||
;-------------------------------------------------------------------------------------
|
||||
; AsmGetAddressMap (&AddressMap);
|
||||
;-------------------------------------------------------------------------------------
|
||||
|
|
|
@ -181,6 +181,12 @@ CProcedureInvoke:
|
|||
RendezvousFunnelProc ENDP
|
||||
RendezvousFunnelProcEnd::
|
||||
|
||||
AsmCliHltLoop PROC
|
||||
cli
|
||||
hlt
|
||||
jmp $-2
|
||||
AsmCliHltLoop ENDP
|
||||
|
||||
;-------------------------------------------------------------------------------------
|
||||
; AsmGetAddressMap (&AddressMap);
|
||||
;-------------------------------------------------------------------------------------
|
||||
|
|
|
@ -175,6 +175,12 @@ CProcedureInvoke:
|
|||
|
||||
RendezvousFunnelProcEnd:
|
||||
|
||||
global ASM_PFX(AsmCliHltLoop)
|
||||
ASM_PFX(AsmCliHltLoop):
|
||||
cli
|
||||
hlt
|
||||
jmp $-2
|
||||
|
||||
;-------------------------------------------------------------------------------------
|
||||
; AsmGetAddressMap (&AddressMap);
|
||||
;-------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue