[panic] Don't spin the CPU in panic
While waiting for the main panicing CPU to finish, don't spin the CPU
without using `asm("pause")` to lower power consumption. Some panics can
get stuck in this state and oh man do my fans spin up.
This commit is contained in:
@@ -30,7 +30,7 @@ void panic_handler(const cpu_state *regs)
|
|||||||
// If we're not running on the CPU that panicked, wait
|
// If we're not running on the CPU that panicked, wait
|
||||||
// for it to finish
|
// for it to finish
|
||||||
if (!panic) {
|
if (!panic) {
|
||||||
while (!main_cpu_done);
|
while (!main_cpu_done) asm ("pause");
|
||||||
} else {
|
} else {
|
||||||
new (&com1) panicking::serial_port {panicking::COM1};
|
new (&com1) panicking::serial_port {panicking::COM1};
|
||||||
new (&syms) panicking::symbol_table {panic->symbol_data};
|
new (&syms) panicking::symbol_table {panic->symbol_data};
|
||||||
|
|||||||
Reference in New Issue
Block a user