Part III of YhLu's patch from January 18th
Signed-off-by: Yinghai Lu <yinghai.lu at amd.com> Signed-off-by: Ed Swierk <eswierk at arastra.com> Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Ward Vandewege <ward at gnu.org> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2590 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
a3cf00e4ba
commit
30b4abeedc
|
@ -265,7 +265,7 @@ gdt:
|
||||||
|
|
||||||
/* selgdt 0x10, flat code segment */
|
/* selgdt 0x10, flat code segment */
|
||||||
.word 0xffff, 0x0000
|
.word 0xffff, 0x0000
|
||||||
.byte 0x00, 0x9b, 0xcf, 0x00
|
.byte 0x00, 0x9b, 0xcf, 0x00 /* G=1 and 0x0f, So we get 4Gbytes for limit */
|
||||||
|
|
||||||
/* selgdt 0x18, flat data segment */
|
/* selgdt 0x18, flat data segment */
|
||||||
.word 0xffff, 0x0000
|
.word 0xffff, 0x0000
|
||||||
|
|
|
@ -9,11 +9,15 @@ static void __console_tx_byte(unsigned char byte)
|
||||||
#include "console_print.c"
|
#include "console_print.c"
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* CONFIG_USE_INIT == 1 */
|
/* CONFIG_USE_PRINTK_IN_CAR == 1 */
|
||||||
|
|
||||||
#include "console_printk.c"
|
#include "console_printk.c"
|
||||||
|
|
||||||
#endif /* CONFIG_USE_INIT */
|
// do_printk
|
||||||
|
#include "../../../console/vtxprintf.c"
|
||||||
|
#include "printk_init.c"
|
||||||
|
|
||||||
|
#endif /* CONFIG_USE_PRINTK_IN_CAR */
|
||||||
|
|
||||||
#ifndef LINUXBIOS_EXTRA_VERSION
|
#ifndef LINUXBIOS_EXTRA_VERSION
|
||||||
#define LINUXBIOS_EXTRA_VERSION ""
|
#define LINUXBIOS_EXTRA_VERSION ""
|
||||||
|
|
|
@ -207,7 +207,6 @@ static void set_cpu_ops(struct device *cpu)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
die("Unknown cpu");
|
|
||||||
return;
|
return;
|
||||||
found:
|
found:
|
||||||
cpu->ops = driver->ops;
|
cpu->ops = driver->ops;
|
||||||
|
@ -233,16 +232,6 @@ void cpu_initialize(void)
|
||||||
die("CPU: missing cpu device structure");
|
die("CPU: missing cpu device structure");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check that we haven't been passed bad information as the result of a race
|
|
||||||
// (i.e. BSP timed out while waiting for us to load secondary_stack)
|
|
||||||
|
|
||||||
#if CONFIG_SMP || CONFIG_IOPIC
|
|
||||||
if (cpu->path.u.apic.apic_id != lapicid()) {
|
|
||||||
printk_err("CPU #%d Initialization FAILED: APIC ID mismatch (%u != %u)\n",
|
|
||||||
info->index, cpu->path.u.apic.apic_id, lapicid());
|
|
||||||
// return without setting initialized flag
|
|
||||||
} else {
|
|
||||||
#endif
|
|
||||||
/* Find what type of cpu we are dealing with */
|
/* Find what type of cpu we are dealing with */
|
||||||
identify_cpu(cpu);
|
identify_cpu(cpu);
|
||||||
printk_debug("CPU: vendor %s device %x\n",
|
printk_debug("CPU: vendor %s device %x\n",
|
||||||
|
@ -252,10 +241,19 @@ void cpu_initialize(void)
|
||||||
|
|
||||||
printk_debug("CPU: family %02x, model %02x, stepping %02x\n", c.x86, c.x86_model, c.x86_mask);
|
printk_debug("CPU: family %02x, model %02x, stepping %02x\n", c.x86, c.x86_model, c.x86_mask);
|
||||||
|
|
||||||
|
|
||||||
/* Lookup the cpu's operations */
|
/* Lookup the cpu's operations */
|
||||||
set_cpu_ops(cpu);
|
set_cpu_ops(cpu);
|
||||||
|
|
||||||
|
if(!cpu->ops) {
|
||||||
|
/* mask out the stepping and try again */
|
||||||
|
cpu->device -= c.x86_mask;
|
||||||
|
set_cpu_ops(cpu);
|
||||||
|
cpu->device += c.x86_mask;
|
||||||
|
if(!cpu->ops) die("Unknown cpu");
|
||||||
|
printk_debug("WARNING: Using generic cpu ops\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Initialize the cpu */
|
/* Initialize the cpu */
|
||||||
if (cpu->ops && cpu->ops->init) {
|
if (cpu->ops && cpu->ops->init) {
|
||||||
cpu->enabled = 1;
|
cpu->enabled = 1;
|
||||||
|
@ -264,10 +262,7 @@ void cpu_initialize(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
printk_info("CPU #%d Initialized\n", info->index);
|
printk_info("CPU #%d Initialized\n", info->index);
|
||||||
#if CONFIG_SMP || CONFIG_IOPIC
|
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue