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 <lersek@redhat.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
xor ecx, ecx ; ecx = 0\r
xor edx, edx ; edx = 0\r
monitor\r
xor ecx, ecx ; ecx = 0\r
xor edx, edx ; edx = 0\r
monitor\r
mov eax, ebx ; Mwait Cx, Target C-State per eax[7:4]\r
mov eax, ebx ; Mwait Cx, Target C-State per eax[7:4]\r
mwait\r
jmp MwaitLoop\r
HltLoop:\r
mwait\r
jmp MwaitLoop\r
HltLoop:\r