summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/device/cpu_device.c15
-rw-r--r--src/include/device/device.h1
-rw-r--r--src/northbridge/amd/amdfam10/northbridge.c15
-rw-r--r--src/northbridge/amd/amdk8/northbridge.c15
4 files changed, 30 insertions, 16 deletions
diff --git a/src/device/cpu_device.c b/src/device/cpu_device.c
index 255cbc70f8..613f1b9d3c 100644
--- a/src/device/cpu_device.c
+++ b/src/device/cpu_device.c
@@ -22,21 +22,6 @@
#include <console/console.h>
#include <cpu/x86/lapic.h>
-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;
- }
-}
-
device_t add_cpu_device(struct bus *cpu_bus, unsigned apic_id, int enabled)
{
struct device_path cpu_path;
diff --git a/src/include/device/device.h b/src/include/device/device.h
index f63a05caae..62460aea6a 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -198,7 +198,6 @@ device_t dev_find_slot_pnp(u16 port, u16 device);
device_t dev_find_lapic(unsigned apic_id);
int dev_count_cpu(void);
-void remap_bsp_lapic(struct bus *cpu_bus);
device_t add_cpu_device(struct bus *cpu_bus, unsigned apic_id, int enabled);
void set_cpu_topology(device_t cpu, unsigned node, unsigned package, unsigned core, unsigned thread);
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;
diff --git a/src/northbridge/amd/amdk8/northbridge.c b/src/northbridge/amd/amdk8/northbridge.c
index 55f3c4dc7e..c4fd3fdcee 100644
--- a/src/northbridge/amd/amdk8/northbridge.c
+++ b/src/northbridge/amd/amdk8/northbridge.c
@@ -1102,6 +1102,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;