summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cpu/amd/family_10h-family_15h/init_cpus.c6
-rw-r--r--src/northbridge/amd/amdfam10/northbridge.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/src/cpu/amd/family_10h-family_15h/init_cpus.c b/src/cpu/amd/family_10h-family_15h/init_cpus.c
index 1794072a64..5a676015ee 100644
--- a/src/cpu/amd/family_10h-family_15h/init_cpus.c
+++ b/src/cpu/amd/family_10h-family_15h/init_cpus.c
@@ -127,13 +127,17 @@ uint32_t get_boot_apic_id(uint8_t node, uint32_t core) {
}
} else {
if (fam15h) {
- ap_apicid = (node * (siblings + 1)) + core;
+ ap_apicid = 0;
+ ap_apicid |= (node & 0x7) << 4; /* Node ID */
+ ap_apicid |= core & 0xf; /* Core ID */
} else {
ap_apicid = node * (nb_cfg_54 ? (siblings + 1) : 1) +
core * (nb_cfg_54 ? 1 : 64);
}
}
+ printk(BIOS_DEBUG, "%s: using %d as APIC ID for node %d, core %d\n", __func__, ap_apicid, node, core);
+
return ap_apicid;
}
diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c
index 563f21b107..3b747bd5ec 100644
--- a/src/northbridge/amd/amdfam10/northbridge.c
+++ b/src/northbridge/amd/amdfam10/northbridge.c
@@ -1637,7 +1637,9 @@ static void cpu_bus_scan(device_t dev)
}
} else {
if (fam15h) {
- apic_id = (i * (siblings + 1)) + j;
+ apic_id = 0;
+ apic_id |= (i & 0x7) << 4; /* Node ID */
+ apic_id |= j & 0xf; /* Core ID */
} else {
apic_id = i * (nb_cfg_54?(siblings+1):1) + j * (nb_cfg_54?1:64); // ?
}