From 24635338335e30ebca94c7fe81b536622923481f Mon Sep 17 00:00:00 2001 From: Naresh G Solanki Date: Thu, 31 May 2018 23:13:18 +0530 Subject: cpu/x86/mp: Update CPU name in device structure Name the CPU device structure as per processor brand string. Before logs use to look like: APIC: 01 (unknown) Now logs looks like(depending on CPU on which it is tested): APIC: 01 (Intel(R) Core(TM) m3-7Y30 CPU @ 1.00GHz) BUG=None BRANCH=None TEST= Build & boot Soraka. Change-Id: I6af0e29bbbdb59406baeae32f7874ff9036a9c81 Signed-off-by: Naresh G Solanki Reviewed-on: https://review.coreboot.org/26740 Reviewed-by: Aaron Durbin Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) --- src/cpu/x86/mp_init.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c index a696cd0a5c..54b6d1571a 100644 --- a/src/cpu/x86/mp_init.c +++ b/src/cpu/x86/mp_init.c @@ -46,6 +46,8 @@ struct mp_callback { int logical_cpu_number; }; +static char processor_name[49]; + /* * A mp_flight_record details a sequence of calls for the APs to perform * along with the BSP to coordinate sequencing. Each flight record either @@ -403,6 +405,7 @@ static int allocate_cpu_devices(struct bus *cpu_bus, struct mp_params *p) printk(BIOS_CRIT, "Could not allocate CPU device\n"); max_cpus--; } + new->name = processor_name; cpus[i].dev = new; } @@ -560,7 +563,6 @@ static void init_bsp(struct bus *cpu_bus) { struct device_path cpu_path; struct cpu_info *info; - char processor_name[49]; /* Print processor name */ fill_processor_name(processor_name); @@ -576,6 +578,7 @@ static void init_bsp(struct bus *cpu_bus) /* Find the device structure for the boot CPU. */ info = cpu_info(); info->cpu = alloc_find_dev(cpu_bus, &cpu_path); + info->cpu->name = processor_name; if (info->index != 0) printk(BIOS_CRIT, "BSP index(%d) != 0!\n", info->index); -- cgit v1.2.3