diff options
author | Subrata Banik <subrata.banik@intel.com> | 2019-05-10 12:35:42 +0530 |
---|---|---|
committer | Subrata Banik <subrata.banik@intel.com> | 2019-05-13 02:07:09 +0000 |
commit | e091d0efc40581ce789fdef5f44a327b75adc999 (patch) | |
tree | bfa523fa0cd37676e70bd10bf46895a56951fb5f /src/cpu | |
parent | 095c931cf12924da9011b47aa64f4a6f11d89f13 (diff) |
lapic/lapic_cpu_init: Add cpu_add_map_entry() to store default_apic_id
This patch ensures start_cpu() function to store default_apic_id using
common cpu_add_map_entry() function to make cpu_index() implementation
generic.
BRANCH=none
BUG=b:79562868
Change-Id: Iac4d6e9e6e6f9ba644335b4b70da8689c405f638
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32722
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/x86/lapic/lapic_cpu_init.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cpu/x86/lapic/lapic_cpu_init.c b/src/cpu/x86/lapic/lapic_cpu_init.c index 3ad1f0a055..0f73e71331 100644 --- a/src/cpu/x86/lapic/lapic_cpu_init.c +++ b/src/cpu/x86/lapic/lapic_cpu_init.c @@ -291,6 +291,7 @@ int start_cpu(struct device *cpu) info = (struct cpu_info *)stack_top; info->index = index; info->cpu = cpu; + cpu_add_map_entry(info->index); thread_init_cpu_info_non_bsp(info); /* Advertise the new stack and index to start_cpu */ @@ -549,6 +550,7 @@ void initialize_cpus(struct bus *cpu_bus) /* Find the device structure for the boot CPU */ info->cpu = alloc_find_dev(cpu_bus, &cpu_path); + cpu_add_map_entry(info->index); // why here? In case some day we can start core1 in amd_sibling_init if (is_smp_boot()) |