diff options
author | Usha P <usha.p@intel.com> | 2019-11-14 11:58:53 +0530 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-11-27 13:50:33 +0000 |
commit | 65a8c2e076bc2e200e8a4d6fcaa91a0eab51740b (patch) | |
tree | f85470eb1d70c2429dc9cd2cf49b49b6f516d061 /src/soc/intel/skylake/bootblock | |
parent | d367503147125210fbc09fa43628d233840f2c65 (diff) |
soc/intel/skylake: Clean up report_cpu_info() function
This patch makes below clean-up for report_cpu_info()
function.
1. Remove unused variables.
2. Make fill_processor_name function available in bootblock.
3. Reuse fill_processor_name.
TEST= Succesfully able to boot soraka and verify the
cpu_name "CPU: Intel(R) Pentium(R) CPU 4415Y @ 1.60GHz"
Change-Id: Idf7b04edc3fce147f7856591ce7e5a0cd05f43fe
Signed-off-by: Usha P <usha.p@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36840
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/skylake/bootblock')
-rw-r--r-- | src/soc/intel/skylake/bootblock/report_platform.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/soc/intel/skylake/bootblock/report_platform.c b/src/soc/intel/skylake/bootblock/report_platform.c index 0bd65c3def..b0b416e1a0 100644 --- a/src/soc/intel/skylake/bootblock/report_platform.c +++ b/src/soc/intel/skylake/bootblock/report_platform.c @@ -18,6 +18,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> @@ -164,31 +165,14 @@ static uint16_t get_dev_id(pci_devfn_t dev) static void report_cpu_info(void) { - struct cpuid_result cpuidr; - u32 i, index, cpu_id, cpu_feature_flag; - char cpu_string[50], *cpu_name = cpu_string; /* 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"; - index = 0x80000000; - cpuidr = cpuid(index); - if (cpuidr.eax < 0x80000004) { - strcpy(cpu_string, "Platform info not available"); - } else { - u32 *p = (u32 *) cpu_string; - for (i = 2; i <= 4; i++) { - cpuidr = cpuid(index + i); - *p++ = cpuidr.eax; - *p++ = cpuidr.ebx; - *p++ = cpuidr.ecx; - *p++ = cpuidr.edx; - } - } - /* Skip leading spaces in CPU name string */ - while (cpu_name[0] == ' ') - cpu_name++; + fill_processor_name(cpu_name); microcode_ver.lo = 0; microcode_ver.hi = 0; |