diff options
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r-- | UefiCpuPkg/CpuMpPei/CpuMpPei.c | 1 | ||||
-rw-r--r-- | UefiCpuPkg/CpuMpPei/CpuMpPei.h | 9 | ||||
-rw-r--r-- | UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm | 6 | ||||
-rw-r--r-- | UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.nasm | 6 | ||||
-rw-r--r-- | UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm | 6 | ||||
-rw-r--r-- | UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm | 6 |
6 files changed, 34 insertions, 0 deletions
diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.c b/UefiCpuPkg/CpuMpPei/CpuMpPei.c index 7b75d354dd..40e62e0405 100644 --- a/UefiCpuPkg/CpuMpPei/CpuMpPei.c +++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.c @@ -169,6 +169,7 @@ ApCFunction ( // InterlockedIncrement ((UINT32 *)&PeiCpuMpData->FinishedCount); + AsmCliHltLoop (); } /** diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.h b/UefiCpuPkg/CpuMpPei/CpuMpPei.h index 97d52bf563..c241349a97 100644 --- a/UefiCpuPkg/CpuMpPei/CpuMpPei.h +++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.h @@ -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. diff --git a/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm b/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm index 63c80489f4..060f4670e0 100644 --- a/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm +++ b/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm @@ -144,6 +144,12 @@ CProcedureInvoke: RendezvousFunnelProc ENDP RendezvousFunnelProcEnd:: +AsmCliHltLoop PROC near C PUBLIC + cli + hlt + jmp $-2 +AsmCliHltLoop ENDP + ;------------------------------------------------------------------------------------- ; AsmGetAddressMap (&AddressMap); ;------------------------------------------------------------------------------------- diff --git a/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.nasm b/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.nasm index fe45cf1f9f..3a8e91fe74 100644 --- a/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.nasm +++ b/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.nasm @@ -132,6 +132,12 @@ CProcedureInvoke: jmp $ ; never reach here RendezvousFunnelProcEnd: +global ASM_PFX(AsmCliHltLoop) +ASM_PFX(AsmCliHltLoop): + cli + hlt + jmp $-2 + ;------------------------------------------------------------------------------------- ; AsmGetAddressMap (&AddressMap); ;------------------------------------------------------------------------------------- diff --git a/UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm b/UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm index 6622c43fcf..18c8b72a34 100644 --- a/UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm +++ b/UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm @@ -181,6 +181,12 @@ CProcedureInvoke: RendezvousFunnelProc ENDP RendezvousFunnelProcEnd:: +AsmCliHltLoop PROC + cli + hlt + jmp $-2 +AsmCliHltLoop ENDP + ;------------------------------------------------------------------------------------- ; AsmGetAddressMap (&AddressMap); ;------------------------------------------------------------------------------------- diff --git a/UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm b/UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm index 8b93c0d1f7..4683543e3c 100644 --- a/UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm +++ b/UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm @@ -175,6 +175,12 @@ CProcedureInvoke: RendezvousFunnelProcEnd: +global ASM_PFX(AsmCliHltLoop) +ASM_PFX(AsmCliHltLoop): + cli + hlt + jmp $-2 + ;------------------------------------------------------------------------------------- ; AsmGetAddressMap (&AddressMap); ;------------------------------------------------------------------------------------- |