summaryrefslogtreecommitdiff
path: root/src/cpu/intel/hyperthreading
diff options
context:
space:
mode:
authorSven Schnelle <svens@stackframe.org>2012-06-17 10:32:55 +0200
committerRonald G. Minnich <rminnich@gmail.com>2012-07-02 19:39:08 +0200
commit042c1461fb777e583e5de48edf9326e47ee5595f (patch)
tree489bf29958a39f8a0169e451c7f080e99d25eadd /src/cpu/intel/hyperthreading
parent9ed1456eff73d1a268eabb84176dd2a2107bf2d7 (diff)
downloadcoreboot-042c1461fb777e583e5de48edf9326e47ee5595f.tar.xz
Use broadcast SIPI to startup siblings
The current code for initializing AP cpus has several shortcomings: - it assumes APIC IDs are sequential - it uses only the BSP for determining the AP count, which is bad if there's more than one physical CPU, and CPUs are of different type Note that the new code call cpu->ops->init() in parallel, and therefore some CPU code needs to be changed to address that. One example are old Intel HT enabled CPUs which can't do microcode update in parallel. Change-Id: Ic48a1ebab6a7c52aa76765f497268af09fa38c25 Signed-off-by: Sven Schnelle <svens@stackframe.org> Reviewed-on: http://review.coreboot.org/1139 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/cpu/intel/hyperthreading')
-rw-r--r--src/cpu/intel/hyperthreading/intel_sibling.c65
1 files changed, 0 insertions, 65 deletions
diff --git a/src/cpu/intel/hyperthreading/intel_sibling.c b/src/cpu/intel/hyperthreading/intel_sibling.c
index b9a9ae7bb1..8377cd0130 100644
--- a/src/cpu/intel/hyperthreading/intel_sibling.c
+++ b/src/cpu/intel/hyperthreading/intel_sibling.c
@@ -7,13 +7,6 @@
#include <smp/spinlock.h>
#include <assert.h>
-#if !CONFIG_SERIAL_CPU_INIT
-#error Intel hyper-threading requires serialized cpu init
-#endif
-
-static int first_time = 1;
-static int disable_siblings = !CONFIG_LOGICAL_CPUS;
-
/* Return true if running thread does not have the smallest lapic ID
* within a CPU core.
*/
@@ -34,61 +27,3 @@ int intel_ht_sibling(void)
threads = (apic_ids / core_ids);
return !!(lapicid() & (threads-1));
}
-
-void intel_sibling_init(device_t cpu)
-{
- unsigned i, siblings;
- struct cpuid_result result;
-
- /* On the bootstrap processor see if I want sibling cpus enabled */
- if (first_time) {
- first_time = 0;
- get_option(&disable_siblings, "hyper_threading");
- }
- result = cpuid(1);
- /* Is hyperthreading supported */
- if (!(result.edx & (1 << 28))) {
- return;
- }
- /* See how many sibling cpus we have */
- siblings = (result.ebx >> 16) & 0xff;
- if (siblings < 1) {
- siblings = 1;
- }
-
- printk(BIOS_DEBUG, "CPU: %u %d siblings\n",
- cpu->path.apic.apic_id,
- siblings);
-
- /* See if I am a sibling cpu */
- if (cpu->path.apic.apic_id & (siblings -1)) {
- if (disable_siblings) {
- cpu->enabled = 0;
- }
- return;
- }
-
- /* I am the primary cpu start up my siblings */
- for(i = 1; i < siblings; i++) {
- struct device_path cpu_path;
- device_t new;
- /* Build the cpu device path */
- cpu_path.type = DEVICE_PATH_APIC;
- cpu_path.apic.apic_id = cpu->path.apic.apic_id + i;
-
-
- /* Allocate new cpu device structure iff sibling CPU
- * was not in static device tree.
- */
- new = alloc_find_dev(cpu->bus, &cpu_path);
-
- if (!new) {
- continue;
- }
-
- printk(BIOS_DEBUG, "CPU: %u has sibling %u\n",
- cpu->path.apic.apic_id,
- new->path.apic.apic_id);
- }
-}
-