Fix APIC cpu_index

If a CPU was pre-allocated, cpu_path is not copied and thus
index would not be updated. This breaks cpu_index() and AMD
model_fxx is possibly broken without this patch.

Change-Id: I77483181cf0bca31423c655942c022bffab3c7ea
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/1199
Tested-by: build bot (Jenkins)
Reviewed-by: Sven Schnelle <svens@stackframe.org>
This commit is contained in:
Kyösti Mälkki 2012-07-10 10:19:40 +03:00 committed by Stefan Reinauer
parent a5650a4b4a
commit bc8c996608
1 changed files with 2 additions and 1 deletions

View File

@ -249,9 +249,10 @@ void cpu_initialize(struct bus *cpu_bus, int index)
cpu_path.type = DEVICE_PATH_APIC; cpu_path.type = DEVICE_PATH_APIC;
cpu_path.apic.apic_id = id; cpu_path.apic.apic_id = id;
cpu_path.apic.index = index;
cpu = alloc_find_dev(cpu_bus, &cpu_path); cpu = alloc_find_dev(cpu_bus, &cpu_path);
cpu->path.apic.index = index;
printk(BIOS_DEBUG, "Initializing CPU #%d\n", id); printk(BIOS_DEBUG, "Initializing CPU #%d\n", id);
/* Find what type of cpu we are dealing with */ /* Find what type of cpu we are dealing with */