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>
This commit is contained in:
Vladimir Serbinenko 2014-02-19 22:00:00 +01:00
parent e7f7d990df
commit 10b3974811
1 changed files with 2 additions and 5 deletions

View File

@ -371,11 +371,8 @@ static void intel_cores_init(device_t cpu)
/* Build the cpu device path */ /* Build the cpu device path */
cpu_path.type = DEVICE_PATH_APIC; cpu_path.type = DEVICE_PATH_APIC;
cpu_path.apic.apic_id = cpu_path.apic.apic_id =
cpu->path.apic.apic_id + (i & 1) + ((i & 2) << 1); cpu->path.apic.apic_id + (i % threads_per_core)
+ ((i / threads_per_core) << 2);
/* Update APIC ID if no hyperthreading */
if (threads_per_core == 1)
cpu_path.apic.apic_id <<= 1;
/* Allocate the new cpu device structure */ /* Allocate the new cpu device structure */
new = alloc_dev(cpu->bus, &cpu_path); new = alloc_dev(cpu->bus, &cpu_path);