]> Zhao Yanbai Git Server - minix.git/commit
SMP - We boot APs
authorTomas Hruby <tom@minix3.org>
Wed, 15 Sep 2010 14:09:52 +0000 (14:09 +0000)
committerTomas Hruby <tom@minix3.org>
Wed, 15 Sep 2010 14:09:52 +0000 (14:09 +0000)
commit62c666566eb002ec293767af87e8a31dcfffec05
treeffc191f09c97b0f639e2add0a82914ae32ce867d
parent13a0d5fa5e95db451f990c057bf28fe130e93874
SMP - We boot APs

- kernel detects CPUs by searching ACPI tables for local apic nodes

- each CPU has its own TSS that points to its own stack. All cpus boot
  on the same boot stack (in sequence) but switch to its private stack
  as soon as they can.

- final booting code in main() placed in bsp_finish_booting() which is
  executed only after the BSP switches to its final stack

- apic functions to send startup interrupts

- assembler functions to handle CPU features not needed for single cpu
  mode like memory barries, HT detection etc.

- new files kernel/smp.[ch], kernel/arch/i386/arch_smp.c and
  kernel/arch/i386/include/arch_smp.h

- 16-bit trampoline code for the APs. It is executed by each AP after
  receiving startup IPIs it brings up the CPUs to 32bit mode and let
  them spin in an infinite loop so they don't do any damage.

- implementation of kernel spinlock

- CONFIG_SMP and CONFIG_MAX_CPUS set by the build system
35 files changed:
Makefile
include/arch/i386/archtypes.h
kernel/Makefile
kernel/arch/i386/Makefile.inc
kernel/arch/i386/acpi.c
kernel/arch/i386/acpi.h
kernel/arch/i386/apic.c
kernel/arch/i386/apic.h
kernel/arch/i386/apic_asm.S
kernel/arch/i386/arch_clock.c
kernel/arch/i386/arch_smp.c [new file with mode: 0644]
kernel/arch/i386/arch_system.c
kernel/arch/i386/arch_watchdog.c
kernel/arch/i386/glo.h
kernel/arch/i386/include/arch_proto.h
kernel/arch/i386/include/arch_smp.h [new file with mode: 0644]
kernel/arch/i386/include/archconst.h
kernel/arch/i386/klib.S
kernel/arch/i386/memory.c
kernel/arch/i386/mpx.S
kernel/arch/i386/protect.c
kernel/arch/i386/sconst.h
kernel/arch/i386/trampoline.S [new file with mode: 0644]
kernel/config.h
kernel/glo.h
kernel/kernel.h
kernel/main.c
kernel/proc.c
kernel/proto.h
kernel/smp.c [new file with mode: 0644]
kernel/smp.h [new file with mode: 0644]
kernel/spinlock.h [new file with mode: 0644]
kernel/start.c
kernel/watchdog.c
share/mk/bsd.own.mk