i386 GNU Mach hangs during SMP startup when the firmware exposes more CPUs
than NCPUS.  NCPUS is already capped while building the CPU list; the hang
is that the broadcast INIT/STARTUP IPI starts every exposed AP, including
the ones the parser rejected, and the zero-initialised cpu_id_lut made those
APs alias kernel ID 0 and corrupt the BSP's per-CPU and GDT state.

These patches apply to gnumach c5701c1c ("Raise NET_MAX_FILTER").

The series bounds cpu_lapic_list at insertion, keeps the BSP and skips
unusable MADT entries, parks rejected APs, panics with a reason on APIC
failure, and clarifies --enable-ncpus.  A topology that exposes more CPUs
than NCPUS now boots with min(eligible, NCPUS).


David Bidner (5):
  apic: Bound cpu_lapic_list by NCPUS
  acpi_parse_apic: Keep the BSP and skip unusable MADT entries
  cpuboot: Park processors not accepted into the CPU list
  model_dep: Panic on APIC initialization failure
  configfrag-first: Clarify --enable-ncpus help

 configfrag-first.ac           |   3 +-
 i386/i386/apic.c              |  29 ++++++++--
 i386/i386/apic.h              |   3 +-
 i386/i386/cpuboot.S           |  13 +++++
 i386/i386at/acpi_parse_apic.c | 105 +++++++++++++++++++++++++++-------
 i386/i386at/acpi_parse_apic.h |   4 +-
 i386/i386at/model_dep.c       |   6 +-
 7 files changed, 132 insertions(+), 31 deletions(-)


base-commit: c5701c1c1c8f330f7a790a4a0bc6b3434213722b

Reply via email to