1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

Disable probing of HTT CPUs by default for the MP Table case. HTT CPUs

should only be used if they are enabled in the BIOS.  Now that we support
enumerating CPUs using the ACPI MADT, any HTT machine using ACPI should
respect the BIOS setting.  For HTT machines with ACPI disabled in the
kernel, the MPTABLE_FORCE_HTT kernel option can be used to try to probe HTT
CPUs like have done in the past for the MP Table case.  This option should
only be enabled if HTT is enabled in the BIOS.
This commit is contained in:
John Baldwin 2003-11-11 17:14:26 +00:00
parent bda1672356
commit f9dbba5c4e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=122490
5 changed files with 29 additions and 0 deletions

View File

@ -27,6 +27,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mptable_force_htt.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
@ -159,7 +160,9 @@ static u_char intentry_trigger(int_entry_ptr intr);
static int lookup_bus_type(char *name);
static void mptable_count_items(void);
static void mptable_count_items_handler(u_char *entry, void *arg);
#ifdef MPTABLE_FORCE_HTT
static void mptable_hyperthread_fixup(u_int id_mask);
#endif
static void mptable_parse_apics_and_busses(void);
static void mptable_parse_apics_and_busses_handler(u_char *entry,
void *arg);
@ -297,7 +300,9 @@ mptable_probe_cpus(void)
} else {
cpu_mask = 0;
mptable_walk_table(mptable_probe_cpus_handler, &cpu_mask);
#ifdef MPTABLE_FORCE_HTT
mptable_hyperthread_fixup(cpu_mask);
#endif
}
return (0);
}
@ -781,6 +786,7 @@ mptable_parse_ints(void)
mptable_walk_table(mptable_parse_ints_handler, NULL);
}
#ifdef MPTABLE_FORCE_HTT
/*
* Perform a hyperthreading "fix-up" to enumerate any logical CPU's
* that aren't already listed in the table.
@ -837,6 +843,7 @@ mptable_hyperthread_fixup(u_int id_mask)
id_mask &= ~(1 << id);
}
}
#endif /* MPTABLE_FORCE_HTT */
/*
* Support code for routing PCI interrupts using the MP Table.

View File

@ -7,6 +7,7 @@ BROKEN_KEYBOARD_RESET opt_reset.h
COMPAT_OLDISA
I586_PMC_GUPROF opt_i586_guprof.h
MAXMEM
MPTABLE_FORCE_HTT
NO_MIXED_MODE
PERFMON
DISABLE_PSE opt_pmap.h

View File

@ -7,6 +7,7 @@ BROKEN_KEYBOARD_RESET opt_reset.h
COMPAT_OLDISA
I586_PMC_GUPROF opt_i586_guprof.h
MAXMEM
MPTABLE_FORCE_HTT
NO_MIXED_MODE
PERFMON
DISABLE_PSE opt_pmap.h

View File

@ -39,9 +39,22 @@ profile 2
# MP table or MADT may claim to do so. That is why mixed mode is
# enabled by default.
#
# HTT CPUs should only be used if they are enabled in the BIOS. For
# the ACPI case, ACPI only correctly tells us about any HTT CPUs if
# they are enabled. However, most HTT systems do not list HTT CPUs
# in the MP Table if they are enabled, thus we guess at the HTT CPUs
# for the MP Table case. However, we shouldn't try to guess and use
# these CPUs if HTTT is disabled. Thus, HTT guessing is only enabled
# for the MP Table if the user explicitly asks for it via the
# MPTABLE_FORCE_HTT option. Do NOT use this option if you have HTT
# disabled in your BIOS.
#
# Mandatory:
device apic # I/O apic
# Optional:
options MPTABLE_FORCE_HTT # Enable HTT CPUs with the MP Table
options NO_MIXED_MODE # Disable use of mixed mode

View File

@ -27,6 +27,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mptable_force_htt.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
@ -159,7 +160,9 @@ static u_char intentry_trigger(int_entry_ptr intr);
static int lookup_bus_type(char *name);
static void mptable_count_items(void);
static void mptable_count_items_handler(u_char *entry, void *arg);
#ifdef MPTABLE_FORCE_HTT
static void mptable_hyperthread_fixup(u_int id_mask);
#endif
static void mptable_parse_apics_and_busses(void);
static void mptable_parse_apics_and_busses_handler(u_char *entry,
void *arg);
@ -297,7 +300,9 @@ mptable_probe_cpus(void)
} else {
cpu_mask = 0;
mptable_walk_table(mptable_probe_cpus_handler, &cpu_mask);
#ifdef MPTABLE_FORCE_HTT
mptable_hyperthread_fixup(cpu_mask);
#endif
}
return (0);
}
@ -781,6 +786,7 @@ mptable_parse_ints(void)
mptable_walk_table(mptable_parse_ints_handler, NULL);
}
#ifdef MPTABLE_FORCE_HTT
/*
* Perform a hyperthreading "fix-up" to enumerate any logical CPU's
* that aren't already listed in the table.
@ -837,6 +843,7 @@ mptable_hyperthread_fixup(u_int id_mask)
id_mask &= ~(1 << id);
}
}
#endif /* MPTABLE_FORCE_HTT */
/*
* Support code for routing PCI interrupts using the MP Table.