mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
OcCpuLib: Fix trashing EBX register in AsmReadIntelMicrocodeRevision
This register is callee-preserved in MSABI.
This commit is contained in:
parent
74a5326b4a
commit
e7989ef64f
@ -34,6 +34,7 @@ ASM_PFX(AsmReadIntelMicrocodeRevision):
|
||||
; Several Intel CPUs, notably Westmere, require a certain assembly
|
||||
; sequence to retrieve microcode revision.
|
||||
; Reference: https://github.com/acidanthera/bugtracker/issues/621.
|
||||
push ebx
|
||||
mov ecx, MSR_IA32_BIOS_SIGN_ID
|
||||
xor eax, eax
|
||||
xor edx, edx
|
||||
@ -43,4 +44,5 @@ ASM_PFX(AsmReadIntelMicrocodeRevision):
|
||||
mov ecx, MSR_IA32_BIOS_SIGN_ID
|
||||
rdmsr
|
||||
mov eax, edx
|
||||
pop ebx
|
||||
ret
|
||||
|
||||
@ -34,6 +34,7 @@ ASM_PFX(AsmReadIntelMicrocodeRevision):
|
||||
; Several Intel CPUs, notably Westmere, require a certain assembly
|
||||
; sequence to retrieve microcode revision.
|
||||
; Reference: https://github.com/acidanthera/bugtracker/issues/621.
|
||||
push rbx
|
||||
mov ecx, MSR_IA32_BIOS_SIGN_ID
|
||||
xor eax, eax
|
||||
xor edx, edx
|
||||
@ -43,4 +44,5 @@ ASM_PFX(AsmReadIntelMicrocodeRevision):
|
||||
mov ecx, MSR_IA32_BIOS_SIGN_ID
|
||||
rdmsr
|
||||
mov eax, edx
|
||||
pop rbx
|
||||
ret
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user