{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 <subrata.banik@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/44175 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <arch/cpu.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <console/console.h>
|
||||
#include <cpu/intel/microcode.h>
|
||||
#include <cpu/x86/msr.h>
|
||||
#include <device/pci.h>
|
||||
#include <device/pci_ids.h>
|
||||
@@ -18,8 +19,6 @@
|
||||
#include <soc/pci_devs.h>
|
||||
#include <string.h>
|
||||
|
||||
#define BIOS_SIGN_ID 0x8B
|
||||
|
||||
static struct {
|
||||
u32 cpuid;
|
||||
const char *name;
|
||||
@@ -104,7 +103,6 @@ static void report_cpu_info(void)
|
||||
const char cpu_not_found[] = "Platform info not available";
|
||||
const char *cpu_name = cpu_not_found; /* 48 bytes are reported */
|
||||
int vt, txt, aes;
|
||||
msr_t microcode_ver;
|
||||
static const char *const mode[] = {"NOT ", ""};
|
||||
const char *cpu_type = "Unknown";
|
||||
u32 p[13];
|
||||
@@ -129,11 +127,7 @@ static void report_cpu_info(void)
|
||||
cpu_name++;
|
||||
}
|
||||
|
||||
microcode_ver.lo = 0;
|
||||
microcode_ver.hi = 0;
|
||||
wrmsr(BIOS_SIGN_ID, microcode_ver);
|
||||
cpu_id = cpu_get_cpuid();
|
||||
microcode_ver = rdmsr(BIOS_SIGN_ID);
|
||||
|
||||
/* Look for string to match the name */
|
||||
for (i = 0; i < ARRAY_SIZE(cpu_table); i++) {
|
||||
@@ -145,7 +139,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;
|
||||
|
Reference in New Issue
Block a user