Attention is currently required from: Intel coreboot Reviewers.
Vladimir Serbinenko has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/86247?usp=email )
Change subject: intel/acpi: Put BSP as the first entry ......................................................................
intel/acpi: Put BSP as the first entry
Linux complains in dmesg as a firmware bug that BSP is not the first entry. NetBSD hangs and OpenBSD panics early on boot. With this patch I was able to boot NetBSD and OpenBSD on darp10-b when loaded in GRUB. Note: vanilla bootloaders for NetBSD and OpenBSD still result in an apparent hang for an unknown reason.
Change-Id: I520a2e080c9f07a5866729ae2283990d20c0d691 --- M src/soc/intel/common/block/acpi/cpu_hybrid.c 1 file changed, 9 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/47/86247/1
diff --git a/src/soc/intel/common/block/acpi/cpu_hybrid.c b/src/soc/intel/common/block/acpi/cpu_hybrid.c index ee4777a..a6b9c21 100644 --- a/src/soc/intel/common/block/acpi/cpu_hybrid.c +++ b/src/soc/intel/common/block/acpi/cpu_hybrid.c @@ -48,10 +48,17 @@ int32_t eff_apic_ids[CONFIG_MAX_CPUS] = {0}; extern struct cpu_info cpu_infos[]; uint32_t i, j = 0; + u32 bsp_lapicid = lapicid(); + + /* As per spec first comes BSP. */ + cpu_apic_info.apic_ids[0] = bsp_lapicid; + perf_core_cnt = 1;
for (i = 0; i < ARRAY_SIZE(cpu_apic_info.apic_ids); i++) { if (!cpu_infos[i].cpu) continue; + if (cpu_infos[i].cpu->path.apic.apic_id == bsp_lapicid) + continue; if (cpu_infos[i].cpu->path.apic.core_type == CPU_TYPE_PERF) cpu_apic_info.apic_ids[perf_core_cnt++] = cpu_infos[i].cpu->path.apic.apic_id; @@ -60,8 +67,8 @@ cpu_infos[i].cpu->path.apic.apic_id; }
- if (perf_core_cnt > 1) - bubblesort(cpu_apic_info.apic_ids, perf_core_cnt, NUM_ASCENDING); + if (perf_core_cnt > 2) + bubblesort(cpu_apic_info.apic_ids + 1, perf_core_cnt - 1, NUM_ASCENDING);
for (i = perf_core_cnt; j < eff_core_cnt; i++, j++) cpu_apic_info.apic_ids[i] = eff_apic_ids[j];