cpu/x86/sipi_vector.S: Fix reading MCU revision

Writing 0 to MSR IA32_BIOS_SIGN_ID before fetching this MSRs content
is required. This is how things are done in
cpu/intel/microcode/microcode.c.

The "Intel® 64 and IA-32 Architectures Software Developer’s Manual"
also recommends this: "It is recommended that this field be preloaded
with 0 prior to executing CPUID" (this field being %edx).

Change-Id: I24a87aff9a699ed8ab2598007c8b8562d0555ac5
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49670
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
This commit is contained in:
Arthur Heymans 2021-01-18 19:50:26 +01:00 committed by Patrick Georgi
parent fc63f8d5a9
commit 193aac8835
1 changed files with 4 additions and 0 deletions

View File

@ -115,6 +115,10 @@ _start:
jz microcode_done /* Bypass if no microde exists. */ jz microcode_done /* Bypass if no microde exists. */
/* Get the Microcode version. */ /* Get the Microcode version. */
xorl %eax, %eax
xorl %edx, %edx
movl $IA32_BIOS_SIGN_ID, %ecx
wrmsr
mov $1, %eax mov $1, %eax
cpuid cpuid
mov $IA32_BIOS_SIGN_ID, %ecx mov $IA32_BIOS_SIGN_ID, %ecx