summaryrefslogtreecommitdiff
path: root/src/cpu/intel/model_2065x
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2014-02-19 22:00:00 +0100
committerVladimir Serbinenko <phcoder@gmail.com>2014-02-20 14:03:56 +0100
commit10b3974811b7e851856f71f8e09e8c5c682326f6 (patch)
tree0fcec0ae9607801ae84f3063a59f5f1f48e82445 /src/cpu/intel/model_2065x
parente7f7d990df2da664a42d8bbb6f3a4f5c71731261 (diff)
downloadcoreboot-10b3974811b7e851856f71f8e09e8c5c682326f6.tar.xz
intel/model_2065x: Fix APICID generation.
APIC IDs always step by 4 on 2065x independently of number of threads. Change-Id: I5abd4005c8ce1740bb0862d952af66236b609aa8 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/5262 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/cpu/intel/model_2065x')
-rw-r--r--src/cpu/intel/model_2065x/model_2065x_init.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/cpu/intel/model_2065x/model_2065x_init.c b/src/cpu/intel/model_2065x/model_2065x_init.c
index 2cbe906e83..e73e237eb5 100644
--- a/src/cpu/intel/model_2065x/model_2065x_init.c
+++ b/src/cpu/intel/model_2065x/model_2065x_init.c
@@ -371,11 +371,8 @@ static void intel_cores_init(device_t cpu)
/* Build the cpu device path */
cpu_path.type = DEVICE_PATH_APIC;
cpu_path.apic.apic_id =
- cpu->path.apic.apic_id + (i & 1) + ((i & 2) << 1);
-
- /* Update APIC ID if no hyperthreading */
- if (threads_per_core == 1)
- cpu_path.apic.apic_id <<= 1;
+ cpu->path.apic.apic_id + (i % threads_per_core)
+ + ((i / threads_per_core) << 2);
/* Allocate the new cpu device structure */
new = alloc_dev(cpu->bus, &cpu_path);