From bc8c996608e68cb30d968796b0359a922ec66828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Tue, 10 Jul 2012 10:19:40 +0300 Subject: Fix APIC cpu_index MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: http://review.coreboot.org/1199 Tested-by: build bot (Jenkins) Reviewed-by: Sven Schnelle --- src/arch/x86/lib/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/arch/x86/lib/cpu.c') diff --git a/src/arch/x86/lib/cpu.c b/src/arch/x86/lib/cpu.c index 5214abeb7d..7cd955ebb3 100644 --- a/src/arch/x86/lib/cpu.c +++ b/src/arch/x86/lib/cpu.c @@ -249,9 +249,10 @@ void cpu_initialize(struct bus *cpu_bus, int index) cpu_path.type = DEVICE_PATH_APIC; cpu_path.apic.apic_id = id; - cpu_path.apic.index = index; cpu = alloc_find_dev(cpu_bus, &cpu_path); + cpu->path.apic.index = index; + printk(BIOS_DEBUG, "Initializing CPU #%d\n", id); /* Find what type of cpu we are dealing with */ -- cgit v1.2.3