From e0d8627a7349102c8ec81dd2146063f4290a8f55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 17 Oct 2009 14:59:26 +0000 Subject: [PATCH] * When you pressed ctrl-alt-del during the boot process, interrupts are disabled when you enter arch_cpu_shutdown(), so you must not try to load the ACPI module to reboot. DaaT, that should fix the problem you showed me. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33617 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/arch/x86/arch_cpu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/system/kernel/arch/x86/arch_cpu.cpp b/src/system/kernel/arch/x86/arch_cpu.cpp index 57abd172be..ab6e64d16e 100644 --- a/src/system/kernel/arch/x86/arch_cpu.cpp +++ b/src/system/kernel/arch/x86/arch_cpu.cpp @@ -105,7 +105,7 @@ x86_optimized_functions gOptimizedFunctions = { static status_t acpi_shutdown(bool rebootSystem) { - if (debug_debugger_running()) + if (debug_debugger_running() || !are_interrupts_enabled()) return B_ERROR; acpi_module_info* acpi; @@ -829,10 +829,10 @@ arch_cpu_shutdown(bool rebootSystem) { if (acpi_shutdown(rebootSystem) == B_OK) return B_OK; - + if (!rebootSystem) return apm_shutdown(); - + cpu_status state = disable_interrupts(); // try to reset the system using the keyboard controller