summaryrefslogtreecommitdiff
path: root/src/northbridge/amd/amdfam10
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2015-06-13 11:01:54 +0200
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-06-13 21:06:52 +0200
commit4d6db954e706b0a1038fb2eea166c9bbe5485980 (patch)
treeee8c2ab60b2b89bf0307d3e120b02ef28091f730 /src/northbridge/amd/amdfam10
parentd862121fbe6285be2f91a0c09058a22a775c0d19 (diff)
Move remap_bsp_lapic to AMD specific code
It's not used outside of very old AMD CPUs. Change-Id: Ide51ef1a526df50d88bf229432d7d36bc777f9eb Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10538 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Diffstat (limited to 'src/northbridge/amd/amdfam10')
-rw-r--r--src/northbridge/amd/amdfam10/northbridge.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c
index b3ad08bdfc..f6f2641135 100644
--- a/src/northbridge/amd/amdfam10/northbridge.c
+++ b/src/northbridge/amd/amdfam10/northbridge.c
@@ -1112,6 +1112,21 @@ static void add_more_links(device_t dev, unsigned total_links)
last->next = NULL;
}
+static void remap_bsp_lapic(struct bus *cpu_bus)
+{
+ struct device_path cpu_path;
+ device_t cpu;
+ u32 bsp_lapic_id = lapicid();
+
+ if (bsp_lapic_id) {
+ cpu_path.type = DEVICE_PATH_APIC;
+ cpu_path.apic.apic_id = 0;
+ cpu = find_dev_path(cpu_bus, &cpu_path);
+ if (cpu)
+ cpu->path.apic.apic_id = bsp_lapic_id;
+ }
+}
+
static void cpu_bus_scan(device_t dev)
{
struct bus *cpu_bus;