From f56379f3610e51a01a18c00e4a0d5fded3af0657 Mon Sep 17 00:00:00 2001 From: Jeff Fan Date: Fri, 25 Nov 2016 12:58:36 +0800 Subject: [PATCH] UefiCpuPkg/DxeMpLib: Fix bug when getting target C-State from eax AP will get target C-State from eax[7:4]. We do shift in ebx firstly before set to eax. It will lead ebx is incorrect in the next time. The fix is to set ebx to eax firstly and does shift in eax. Thus, ebx could keep original value. Reported-by: Laszlo Ersek Cc: Laszlo Ersek Cc: Feng Tian Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan Reviewed-by: Laszlo Ersek Tested-by: Laszlo Ersek --- UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm index f8f471233e..34c07a6d51 100644 --- a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm +++ b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm @@ -266,8 +266,8 @@ MwaitLoop: xor ecx, ecx ; ecx = 0 xor edx, edx ; edx = 0 monitor - shl ebx, 4 mov eax, ebx ; Mwait Cx, Target C-State per eax[7:4] + shl eax, 4 mwait jmp MwaitLoop HltLoop: -- 2.39.2