From b7db12bf7e094d812f8f0d39dce0a6f43c03b11d Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Tue, 4 Aug 2020 18:01:27 +0530 Subject: {nb,soc}/intel: Use get_current_microcode_rev() for ucode version This patch removes all redundant read microcode version implementation from SoC directory and refer from cpu/intel/microcode/microcode.c file. TEST=Able to get correct microcode version. Change-Id: Icb905b18d85f1c5b68fac6905f3c65e95bffa2da Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/44175 Reviewed-by: Arthur Heymans Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/soc/intel/skylake/bootblock/report_platform.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/soc/intel/skylake/bootblock') diff --git a/src/soc/intel/skylake/bootblock/report_platform.c b/src/soc/intel/skylake/bootblock/report_platform.c index d306879ae8..957b4c2a5d 100644 --- a/src/soc/intel/skylake/bootblock/report_platform.c +++ b/src/soc/intel/skylake/bootblock/report_platform.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -153,17 +154,11 @@ static void report_cpu_info(void) u32 i, cpu_id, cpu_feature_flag; char cpu_name[49]; int vt, txt, aes; - msr_t microcode_ver; static const char *const mode[] = {"NOT ", ""}; const char *cpu_type = "Unknown"; fill_processor_name(cpu_name); - - microcode_ver.lo = 0; - microcode_ver.hi = 0; - wrmsr(IA32_BIOS_SIGN_ID, microcode_ver); cpu_id = cpu_get_cpuid(); - microcode_ver = rdmsr(IA32_BIOS_SIGN_ID); /* Look for string to match the name */ for (i = 0; i < ARRAY_SIZE(cpu_table); i++) { @@ -175,7 +170,7 @@ static void report_cpu_info(void) printk(BIOS_DEBUG, "CPU: %s\n", cpu_name); printk(BIOS_DEBUG, "CPU: ID %x, %s, ucode: %08x\n", - cpu_id, cpu_type, microcode_ver.hi); + cpu_id, cpu_type, get_current_microcode_rev()); cpu_feature_flag = cpu_get_feature_flags_ecx(); aes = (cpu_feature_flag & CPUID_AES) ? 1 : 0; -- cgit v1.2.3