Installing the FreeBSD SMP Kernel

Important facts:

The FreeBSD Symmetric MultiProcessor kernel is now a stardard part of 3.x/4.x/5.0. For the latest kernel config options refer to src/sys/i386/conf/LINT. There is a ready-made file for creating a generic SMP kernel: src/sys/i386/conf/SMP-GENERIC.

For general information on building new kernels refer to the FreeBSD Handbook and other documentation.

Currently the permissible options for an SMP kernel include:

# Enables building of a Symmetric MultiProcessor kernel:
options SMP
options APIC_IO

# Optional:

# The number of CPUs on the motherboard, defaults to 2:
options NCPU=2

# The number of busses, defaults to 4:
options NBUS=4

# The number of IO APICs on the motherboard, defaults to 1.
options NAPIC=1

# The total number of INTs provided by the motherboard, defaults to 24:
options NINTR=24

You can get a concise list of the appropriate options for your hardware by running /usr/sbin/mptable on your SMP capable system. Note that this can be run from a UP (ie non SMP) kernel. Do 'man mptable' for details.

It is possible to set kern.smp_active to 1 after starting the APs if you want to throttle down to the main processor.