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>
This commit is contained in:
Stefan Reinauer 2015-06-13 11:01:54 +02:00
parent d862121fbe
commit 4d6db954e7
4 changed files with 30 additions and 16 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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;