diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2012-07-10 10:19:40 +0300 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2012-07-10 19:53:43 +0200 |
commit | bc8c996608e68cb30d968796b0359a922ec66828 (patch) | |
tree | 9e11173289fea1e65c9282a0e9d32dac8080c52e /src | |
parent | a5650a4b4ac85722d772083761ffea32557774b4 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/x86/lib/cpu.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 */ |