Alexey Buyanov has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/44050 )
Change subject: soc/intel/tigerlake: Clean up report_cpu_info() function ......................................................................
soc/intel/tigerlake: Clean up report_cpu_info() function
This patch uses the fill_processor_name function in order to fetch the CPU Name.
BUG=none TEST=successfully built and booted TGLRVP
Signed-off-by: Alexey Buyanov alexey.buyanov@intel.com Change-Id: I97be5d6b0a6fc5785c10ace3b78a1bc9c9f31230 --- M src/soc/intel/tigerlake/bootblock/report_platform.c 1 file changed, 4 insertions(+), 24 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/50/44050/1
diff --git a/src/soc/intel/tigerlake/bootblock/report_platform.c b/src/soc/intel/tigerlake/bootblock/report_platform.c index 6acc0c3..d715725 100644 --- a/src/soc/intel/tigerlake/bootblock/report_platform.c +++ b/src/soc/intel/tigerlake/bootblock/report_platform.c @@ -10,6 +10,7 @@ #include <device/pci_ops.h> #include <console/console.h> #include <cpu/x86/msr.h> +#include <cpu/x86/name.h> #include <device/pci.h> #include <device/pci_ids.h> #include <intelblocks/mp_init.h> @@ -99,35 +100,14 @@
static void report_cpu_info(void) { - struct cpuid_result cpuidr; - u32 i, index, cpu_id, cpu_feature_flag; - const char cpu_not_found[] = "Platform info not available"; - const char *cpu_name = cpu_not_found; /* 48 bytes are reported */ + 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"; - u32 p[13];
- index = 0x80000000; - cpuidr = cpuid(index); - if (cpuidr.eax >= 0x80000004) { - int j = 0; - - for (i = 2; i <= 4; i++) { - cpuidr = cpuid(index + i); - p[j++] = cpuidr.eax; - p[j++] = cpuidr.ebx; - p[j++] = cpuidr.ecx; - p[j++] = cpuidr.edx; - } - p[12] = 0; - cpu_name = (char *)p; - - /* Skip leading spaces in CPU name string */ - while (cpu_name[0] == ' ' && strlen(cpu_name) > 0) - cpu_name++; - } + fill_processor_name(cpu_name);
microcode_ver.lo = 0; microcode_ver.hi = 0;