summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUsha P <usha.p@intel.com>2020-07-15 14:25:14 +0530
committerPatrick Georgi <pgeorgi@google.com>2020-07-29 09:35:19 +0000
commita5f9a4ae91e93471587f44a29e416da4354a7c2f (patch)
tree3bd7ca68da2aaffa66dc92b2c74ddc722e6235d8 /src
parentce036bd1769d018af88df95c0e871d8da1f30556 (diff)
soc/intel/jasperlake: Clean up report_cpu_info() function
This patch uses the fill_processor_name function in order to fetch the CPU Name. TEST = Successfully able to build boot Waddledoo and verify the cpu_name from CPU log "CPU: Genuine Intel(R) CPU 0000 @ 1.10GHz". Signed-off-by: Usha P <usha.p@intel.com> Change-Id: I532e05d9bb71fdff24e086e81ec72ffe8dc2c22d Reviewed-on: https://review.coreboot.org/c/coreboot/+/43480 Reviewed-by: Subrata Banik <subrata.banik@intel.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/soc/intel/jasperlake/bootblock/report_platform.c28
1 files changed, 4 insertions, 24 deletions
diff --git a/src/soc/intel/jasperlake/bootblock/report_platform.c b/src/soc/intel/jasperlake/bootblock/report_platform.c
index 4f667aa0dc..10d7b0da1d 100644
--- a/src/soc/intel/jasperlake/bootblock/report_platform.c
+++ b/src/soc/intel/jasperlake/bootblock/report_platform.c
@@ -4,6 +4,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>
@@ -58,35 +59,14 @@ static inline 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;
- 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;