Attention is currently required from: Kyösti Mälkki.
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/64341 )
Change subject: cpu/x86/mp_init.c: Use existing code to create cpu struct device ......................................................................
Patch Set 9:
(1 comment)
Patchset:
PS9:
verified that this works on amd/mandolin
out of scope for this patch, but when looking at the patch i wondered if changing struct device *new = add_cpu_device(cpu_bus, info->cpu->path.apic.apic_id + i, 1); to struct device *new = add_cpu_device(cpu_bus, i, 1); and changing struct device *bsp = add_cpu_device(cpu_bus, lapicid(), 1); to struct device *bsp = add_cpu_device(cpu_bus, 0, 1); would result in the same behavior with the code being a bit clearer. verified that this works on mandolin, but haven't 100% traced the code, so i'm not certain if that would be correct in all cases
BSP isn't always lapicid 0 which is why it's done like that to avoid collision between the bsp lapicid and the AP ones. Maybe it's worth a comment?