Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68892 )
Change subject: cpu/mp_init.c: Only enable CPUs once they execute code ......................................................................
cpu/mp_init.c: Only enable CPUs once they execute code
On some systems the BSP cannot know how many CPUs are present in the system. A typical use case is a multi socket system. Setting the enable flag only on CPUs that actually exist makes it more flexible.
Change-Id: I6c8042b4d6127239175924f996f735bf9c83c6e8 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/cpu/x86/mp_init.c 1 file changed, 16 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/92/68892/1
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c index 2f16db6..12f0bf6 100644 --- a/src/cpu/x86/mp_init.c +++ b/src/cpu/x86/mp_init.c @@ -195,6 +195,7 @@ /* Fix up APIC id with reality. */ dev->path.apic.apic_id = lapicid(); dev->path.apic.initial_lapicid = initial_lapicid(); + dev->enabled = 1;
if (cpu_is_intel()) printk(BIOS_INFO, "AP: slot %zu apic_id %x, MCU rev: 0x%08x\n", info->index, @@ -373,7 +374,7 @@ /* Assuming linear APIC space allocation. AP will set its own APIC id in the ap_init() path above. */ struct device *new = add_cpu_device(cpu_bus, info->cpu->path.apic.apic_id + i, - 1); + 0); if (new == NULL) { printk(BIOS_CRIT, "Could not allocate CPU device\n"); max_cpus--;