[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:
Justin C. Miller
2023-08-31 19:43:26 -07:00
parent 97433fc7d1
commit 337b8bb36b

View File

@@ -30,7 +30,7 @@ void panic_handler(const cpu_state *regs)
// If we're not running on the CPU that panicked, wait
// for it to finish
if (!panic) {
while (!main_cpu_done);
while (!main_cpu_done) asm ("pause");
} else {
new (&com1) panicking::serial_port {panicking::COM1};
new (&syms) panicking::symbol_table {panic->symbol_data};