提交 63d38198 编写于 作者: A Alok Kataria 提交者: Ingo Molnar

x86: fix paranoia about using BIOS quickboot mechanism.

> > Make sure that we clear the "shutdown status flag" in the CMOS
> > register after each CPU is brought up.  This fixes a problem where the
> > "shutdown status flag" may remain set when a CPU is brought up after
> > booting.
>
> btw., what problem does this result in, exactly?

The shutdown status flag set to "0xA", corresponds to "JMP double word
request without INT init".

This JMP at reboot time is at an unintended location. And results in
Triple faults in our case.
Though this error at reboot can be safely ignored in a VM environment,
am not sure what the effect would be on a physical system. May be it
will result in a triple fault and an eventual hardware reset thus
masking this BUG in the kernel.

This fix just makes sure that we reset that status flag after
initialization is done.

Fix paranoia about using BIOS quickboot mechanism.

Make sure that we clear the "shutdown status flag" in the CMOS register
after each CPU is brought up.  This fixes a problem where the "shutdown
status flag" may remain set when a CPU is brought up after booting.
Signed-off-by: NAlok N Kataria <akataria@vmware.com>
Signed-off-by: NDan Arai <arai@vmware.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 711554db
...@@ -1001,6 +1001,11 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu) ...@@ -1001,6 +1001,11 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu)
/* mark "stuck" area as not stuck */ /* mark "stuck" area as not stuck */
*((volatile unsigned long *)trampoline_base) = 0; *((volatile unsigned long *)trampoline_base) = 0;
/*
* Cleanup possible dangling ends...
*/
smpboot_restore_warm_reset_vector();
return boot_error; return boot_error;
} }
...@@ -1254,11 +1259,6 @@ void __init native_smp_prepare_boot_cpu(void) ...@@ -1254,11 +1259,6 @@ void __init native_smp_prepare_boot_cpu(void)
void __init native_smp_cpus_done(unsigned int max_cpus) void __init native_smp_cpus_done(unsigned int max_cpus)
{ {
/*
* Cleanup possible dangling ends...
*/
smpboot_restore_warm_reset_vector();
Dprintk("Boot done.\n"); Dprintk("Boot done.\n");
impress_friends(); impress_friends();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册